diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/CHANGELOG.md b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/CHANGELOG.md index e412244ea315..af296aa1bd52 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/CHANGELOG.md +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/CHANGELOG.md @@ -1,14 +1,63 @@ # Release History -## 1.1.0-beta.1 (Unreleased) +## 1.1.0-beta.1 (2024-03-15) -### Features Added +- Azure Resource Manager CosmosDBForPostgreSql client library for Java. This package contains Microsoft Azure SDK for CosmosDBForPostgreSql Management SDK. Azure Cosmos DB for PostgreSQL database service resource provider REST APIs. Package tag package-preview-2023-03. 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.Clusters` was modified + +* `promoteReadReplica(java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed + +#### `models.Cluster` was modified + +* `promoteReadReplica(com.azure.core.util.Context)` was removed + +### Features Added + +* `models.PrincipalType` was added + +* `models.RoleType` was added + +* `models.AuthConfig` was added + +* `models.PasswordAuth` was added + +* `models.PromoteRequest` was added + +* `models.ActiveDirectoryAuth` was added + +#### `models.Cluster$Definition` was modified + +* `withAuthConfig(models.AuthConfig)` was added +* `withEnableGeoBackup(java.lang.Boolean)` was added +* `withDatabaseName(java.lang.String)` was added + +#### `models.Clusters` was modified + +* `promoteReadReplica(java.lang.String,java.lang.String,models.PromoteRequest,com.azure.core.util.Context)` was added + +#### `models.Cluster` was modified + +* `promoteReadReplica(models.PromoteRequest,com.azure.core.util.Context)` was added +* `enableGeoBackup()` was added +* `databaseName()` was added +* `authConfig()` was added + +#### `models.Role$Definition` was modified + +* `withPrincipalType(models.PrincipalType)` was added +* `withObjectId(java.lang.String)` was added +* `withTenantId(java.lang.String)` was added +* `withRoleType(models.RoleType)` was added + +#### `models.Role` was modified -### Other Changes +* `principalType()` was added +* `roleType()` was added +* `objectId()` was added +* `tenantId()` was added ## 1.0.0 (2023-09-22) diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/README.md b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/README.md index 107256a1b76f..d48f734800a8 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/README.md +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/README.md @@ -2,7 +2,7 @@ Azure Resource Manager CosmosDBForPostgreSql client library for Java. -This package contains Microsoft Azure SDK for CosmosDBForPostgreSql Management SDK. Azure Cosmos DB for PostgreSQL database service resource provider REST APIs. Package tag package-2022-11-08. 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 CosmosDBForPostgreSql Management SDK. Azure Cosmos DB for PostgreSQL database service resource provider REST APIs. Package tag package-preview-2023-03. 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-cosmosdbforpostgresql - 1.0.0 + 1.1.0-beta.1 ``` [//]: # ({x-version-update-end}) @@ -45,7 +45,7 @@ Azure Management Libraries require a `TokenCredential` implementation for authen ### Authentication -By default, Azure Active Directory token authentication depends on correct configuration of the following environment variables. +By default, Microsoft Entra ID token authentication depends on correct configuration of the following environment variables. - `AZURE_CLIENT_ID` for Azure client ID. - `AZURE_TENANT_ID` for Azure tenant ID. @@ -74,6 +74,33 @@ See [API design][design] for general introduction on design and key concepts on ## Examples +```java +cluster = cosmosDBForPostgreSqlManager + .clusters() + .define(clusterName) + .withRegion(REGION) + .withExistingResourceGroup(resourceGroupName) + .withAdministratorLoginPassword(adminPwd) + .withPostgresqlVersion("15") + .withCitusVersion("12.1") + .withMaintenanceWindow(new MaintenanceWindow() + .withCustomWindow("Disabled") + .withDayOfWeek(0) + .withStartHour(0) + .withStartMinute(0)) + .withEnableShardsOnCoordinator(true) + .withEnableHa(false) + .withCoordinatorServerEdition("GeneralPurpose") + .withNodeServerEdition("MemoryOptimized") + .withCoordinatorStorageQuotaInMb(131072) + .withNodeStorageQuotaInMb(524288) + .withCoordinatorVCores(2) + .withNodeVCores(4) + .withCoordinatorEnablePublicIpAccess(true) + .withNodeEnablePublicIpAccess(true) + .withNodeCount(0) + .create(); +``` [Code snippets and samples](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/SAMPLE.md) @@ -94,7 +121,7 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m [survey]: https://microsoft.qualtrics.com/jfe/form/SV_ehN0lIk2FKEBkwd?Q_CHL=DOCS [docs]: https://azure.github.io/azure-sdk-for-java/ -[jdk]: https://docs.microsoft.com/java/azure/jdk/ +[jdk]: https://learn.microsoft.com/azure/developer/java/fundamentals/ [azure_subscription]: https://azure.microsoft.com/free/ [azure_identity]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/identity/azure-identity [azure_core_http_netty]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/core/azure-core-http-netty diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/SAMPLE.md b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/SAMPLE.md index d8bd27119f74..e09890835f7c 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/SAMPLE.md +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/SAMPLE.md @@ -64,22 +64,24 @@ ```java import com.azure.resourcemanager.cosmosdbforpostgresql.models.NameAvailabilityRequest; -/** Samples for Clusters CheckNameAvailability. */ +/** + * Samples for Clusters CheckNameAvailability. + */ public final class ClustersCheckNameAvailabilitySamples { /* - * x-ms-original-file: specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/CheckNameAvailability.json + * x-ms-original-file: + * specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-02-preview/examples/ + * CheckNameAvailability.json */ /** * Sample code: Check name availability. - * + * * @param manager Entry point to CosmosDBForPostgreSqlManager. */ - public static void checkNameAvailability( - com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager manager) { - manager - .clusters() - .checkNameAvailabilityWithResponse( - new NameAvailabilityRequest().withName("name1"), com.azure.core.util.Context.NONE); + public static void + checkNameAvailability(com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager manager) { + manager.clusters().checkNameAvailabilityWithResponse(new NameAvailabilityRequest().withName("name1"), + com.azure.core.util.Context.NONE); } } ``` @@ -91,173 +93,124 @@ import java.time.OffsetDateTime; import java.util.HashMap; import java.util.Map; -/** Samples for Clusters Create. */ +/** + * Samples for Clusters Create. + */ public final class ClustersCreateSamples { /* - * x-ms-original-file: specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/ClusterCreateSingleNode.json + * x-ms-original-file: + * specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-02-preview/examples/ + * ClusterCreateSingleNode.json */ /** * Sample code: Create a new single node cluster. - * + * * @param manager Entry point to CosmosDBForPostgreSqlManager. */ public static void createANewSingleNodeCluster( com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager manager) { - manager - .clusters() - .define("testcluster-singlenode") - .withRegion("westus") - .withExistingResourceGroup("TestGroup") - .withTags(mapOf("owner", "JohnDoe")) - .withAdministratorLoginPassword("password") - .withPostgresqlVersion("15") - .withCitusVersion("11.3") - .withPreferredPrimaryZone("1") - .withEnableShardsOnCoordinator(true) - .withEnableHa(true) - .withCoordinatorServerEdition("GeneralPurpose") - .withCoordinatorStorageQuotaInMb(131072) - .withCoordinatorVCores(8) - .withCoordinatorEnablePublicIpAccess(true) - .withNodeCount(0) - .create(); + manager.clusters().define("testcluster-singlenode").withRegion("westus").withExistingResourceGroup("TestGroup") + .withTags(mapOf("owner", "JohnDoe")).withAdministratorLoginPassword("password").withPostgresqlVersion("15") + .withCitusVersion("11.3").withPreferredPrimaryZone("1").withEnableShardsOnCoordinator(true) + .withEnableHa(true).withCoordinatorServerEdition("GeneralPurpose").withCoordinatorStorageQuotaInMb(131072) + .withCoordinatorVCores(8).withCoordinatorEnablePublicIpAccess(true).withNodeCount(0).create(); } /* - * x-ms-original-file: specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/ClusterCreateBurstablev1.json + * x-ms-original-file: + * specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-02-preview/examples/ + * ClusterCreateBurstablev1.json */ /** * Sample code: Create a new single node Burstable 1 vCore cluster. - * + * * @param manager Entry point to CosmosDBForPostgreSqlManager. */ public static void createANewSingleNodeBurstable1VCoreCluster( com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager manager) { - manager - .clusters() - .define("testcluster-burstablev1") - .withRegion("westus") - .withExistingResourceGroup("TestGroup") - .withTags(mapOf("owner", "JohnDoe")) - .withAdministratorLoginPassword("password") - .withPostgresqlVersion("15") - .withCitusVersion("11.3") - .withPreferredPrimaryZone("1") - .withEnableShardsOnCoordinator(true) - .withEnableHa(false) - .withCoordinatorServerEdition("BurstableMemoryOptimized") - .withCoordinatorStorageQuotaInMb(131072) - .withCoordinatorVCores(1) - .withCoordinatorEnablePublicIpAccess(true) - .withNodeCount(0) - .create(); + manager.clusters().define("testcluster-burstablev1").withRegion("westus").withExistingResourceGroup("TestGroup") + .withTags(mapOf("owner", "JohnDoe")).withAdministratorLoginPassword("password").withPostgresqlVersion("15") + .withCitusVersion("11.3").withPreferredPrimaryZone("1").withEnableShardsOnCoordinator(true) + .withEnableHa(false).withCoordinatorServerEdition("BurstableMemoryOptimized") + .withCoordinatorStorageQuotaInMb(131072).withCoordinatorVCores(1).withCoordinatorEnablePublicIpAccess(true) + .withNodeCount(0).create(); } /* - * x-ms-original-file: specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/ClusterCreateBurstablev2.json + * x-ms-original-file: + * specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-02-preview/examples/ + * ClusterCreateBurstablev2.json */ /** * Sample code: Create a new single node Burstable 2 vCores cluster. - * + * * @param manager Entry point to CosmosDBForPostgreSqlManager. */ public static void createANewSingleNodeBurstable2VCoresCluster( com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager manager) { - manager - .clusters() - .define("testcluster-burstablev2") - .withRegion("westus") - .withExistingResourceGroup("TestGroup") - .withTags(mapOf("owner", "JohnDoe")) - .withAdministratorLoginPassword("password") - .withPostgresqlVersion("15") - .withCitusVersion("11.3") - .withPreferredPrimaryZone("1") - .withEnableShardsOnCoordinator(true) - .withEnableHa(false) - .withCoordinatorServerEdition("BurstableGeneralPurpose") - .withCoordinatorStorageQuotaInMb(131072) - .withCoordinatorVCores(2) - .withCoordinatorEnablePublicIpAccess(true) - .withNodeCount(0) - .create(); + manager.clusters().define("testcluster-burstablev2").withRegion("westus").withExistingResourceGroup("TestGroup") + .withTags(mapOf("owner", "JohnDoe")).withAdministratorLoginPassword("password").withPostgresqlVersion("15") + .withCitusVersion("11.3").withPreferredPrimaryZone("1").withEnableShardsOnCoordinator(true) + .withEnableHa(false).withCoordinatorServerEdition("BurstableGeneralPurpose") + .withCoordinatorStorageQuotaInMb(131072).withCoordinatorVCores(2).withCoordinatorEnablePublicIpAccess(true) + .withNodeCount(0).create(); } /* - * x-ms-original-file: specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/ClusterCreateMultiNode.json + * x-ms-original-file: + * specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-02-preview/examples/ + * ClusterCreateMultiNode.json */ /** * Sample code: Create a new multi-node cluster. - * + * * @param manager Entry point to CosmosDBForPostgreSqlManager. */ public static void createANewMultiNodeCluster( com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager manager) { - manager - .clusters() - .define("testcluster-multinode") - .withRegion("westus") - .withExistingResourceGroup("TestGroup") - .withTags(mapOf()) - .withAdministratorLoginPassword("password") - .withPostgresqlVersion("15") - .withCitusVersion("11.1") - .withPreferredPrimaryZone("1") - .withEnableShardsOnCoordinator(false) - .withEnableHa(true) - .withCoordinatorServerEdition("GeneralPurpose") - .withCoordinatorStorageQuotaInMb(524288) - .withCoordinatorVCores(4) - .withCoordinatorEnablePublicIpAccess(true) - .withNodeServerEdition("MemoryOptimized") - .withNodeCount(3) - .withNodeStorageQuotaInMb(524288) - .withNodeVCores(8) - .withNodeEnablePublicIpAccess(false) + manager.clusters().define("testcluster-multinode").withRegion("westus").withExistingResourceGroup("TestGroup") + .withTags(mapOf()).withAdministratorLoginPassword("password").withPostgresqlVersion("15") + .withCitusVersion("11.1").withPreferredPrimaryZone("1").withEnableShardsOnCoordinator(false) + .withEnableHa(true).withCoordinatorServerEdition("GeneralPurpose").withCoordinatorStorageQuotaInMb(524288) + .withCoordinatorVCores(4).withCoordinatorEnablePublicIpAccess(true).withNodeServerEdition("MemoryOptimized") + .withNodeCount(3).withNodeStorageQuotaInMb(524288).withNodeVCores(8).withNodeEnablePublicIpAccess(false) .create(); } /* - * x-ms-original-file: specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/ClusterCreateReadReplica.json + * x-ms-original-file: + * specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-02-preview/examples/ + * ClusterCreateReadReplica.json */ /** * Sample code: Create a new cluster as a read replica. - * + * * @param manager Entry point to CosmosDBForPostgreSqlManager. */ public static void createANewClusterAsAReadReplica( com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager manager) { - manager - .clusters() - .define("testcluster") - .withRegion("westus") - .withExistingResourceGroup("TestGroup") + manager.clusters().define("testcluster").withRegion("westus").withExistingResourceGroup("TestGroup") .withSourceResourceId( "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestResourceGroup/providers/Microsoft.DBforPostgreSQL/serverGroupsv2/sourcecluster") - .withSourceLocation("westus") - .create(); + .withSourceLocation("westus").create(); } /* - * x-ms-original-file: specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/ClusterCreatePITR.json + * x-ms-original-file: + * specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-02-preview/examples/ + * ClusterCreatePITR.json */ /** * Sample code: Create a new cluster as a point in time restore. - * + * * @param manager Entry point to CosmosDBForPostgreSqlManager. */ public static void createANewClusterAsAPointInTimeRestore( com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager manager) { - manager - .clusters() - .define("testcluster") - .withRegion("westus") - .withExistingResourceGroup("TestGroup") + manager.clusters().define("testcluster").withRegion("westus").withExistingResourceGroup("TestGroup") .withSourceResourceId( "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestResourceGroup/providers/Microsoft.DBforPostgreSQL/serverGroupsv2/source-cluster") - .withSourceLocation("westus") - .withPointInTimeUtc(OffsetDateTime.parse("2017-12-14T00:00:37.467Z")) - .create(); + .withSourceLocation("westus").withPointInTimeUtc(OffsetDateTime.parse("2017-12-14T00:00:37.467Z")).create(); } // Use "Map.of" if available @@ -277,18 +230,22 @@ public final class ClustersCreateSamples { ### Clusters_Delete ```java -/** Samples for Clusters Delete. */ +/** + * Samples for Clusters Delete. + */ public final class ClustersDeleteSamples { /* - * x-ms-original-file: specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/ClusterDelete.json + * x-ms-original-file: + * specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-02-preview/examples/ + * ClusterDelete.json */ /** * Sample code: Delete the cluster. - * + * * @param manager Entry point to CosmosDBForPostgreSqlManager. */ - public static void deleteTheCluster( - com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager manager) { + public static void + deleteTheCluster(com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager manager) { manager.clusters().delete("TestGroup", "testcluster", com.azure.core.util.Context.NONE); } } @@ -297,21 +254,24 @@ public final class ClustersDeleteSamples { ### Clusters_GetByResourceGroup ```java -/** Samples for Clusters GetByResourceGroup. */ +/** + * Samples for Clusters GetByResourceGroup. + */ public final class ClustersGetByResourceGroupSamples { /* - * x-ms-original-file: specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/ClusterGet.json + * x-ms-original-file: + * specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-02-preview/examples/ + * ClusterGet.json */ /** * Sample code: Get the cluster. - * + * * @param manager Entry point to CosmosDBForPostgreSqlManager. */ - public static void getTheCluster( - com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager manager) { - manager - .clusters() - .getByResourceGroupWithResponse("TestGroup", "testcluster1", com.azure.core.util.Context.NONE); + public static void + getTheCluster(com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager manager) { + manager.clusters().getByResourceGroupWithResponse("TestGroup", "testcluster1", + com.azure.core.util.Context.NONE); } } ``` @@ -319,18 +279,22 @@ public final class ClustersGetByResourceGroupSamples { ### Clusters_List ```java -/** Samples for Clusters List. */ +/** + * Samples for Clusters List. + */ public final class ClustersListSamples { /* - * x-ms-original-file: specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/ClusterList.json + * x-ms-original-file: + * specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-02-preview/examples/ + * ClusterList.json */ /** * Sample code: List all the clusters. - * + * * @param manager Entry point to CosmosDBForPostgreSqlManager. */ - public static void listAllTheClusters( - com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager manager) { + public static void + listAllTheClusters(com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager manager) { manager.clusters().list(com.azure.core.util.Context.NONE); } } @@ -339,14 +303,18 @@ public final class ClustersListSamples { ### Clusters_ListByResourceGroup ```java -/** Samples for Clusters ListByResourceGroup. */ +/** + * Samples for Clusters ListByResourceGroup. + */ public final class ClustersListByResourceGroupSamples { /* - * x-ms-original-file: specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/ClusterListByResourceGroup.json + * x-ms-original-file: + * specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-02-preview/examples/ + * ClusterListByResourceGroup.json */ /** * Sample code: List the clusters by resource group. - * + * * @param manager Entry point to CosmosDBForPostgreSqlManager. */ public static void listTheClustersByResourceGroup( @@ -359,19 +327,24 @@ public final class ClustersListByResourceGroupSamples { ### Clusters_PromoteReadReplica ```java -/** Samples for Clusters PromoteReadReplica. */ + +/** + * Samples for Clusters PromoteReadReplica. + */ public final class ClustersPromoteReadReplicaSamples { /* - * x-ms-original-file: specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/ClusterPromoteReadReplica.json + * x-ms-original-file: + * specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-02-preview/examples/ + * ClusterPromoteReadReplica.json */ /** * Sample code: Promote read replica cluster to an independent read-write cluster. - * + * * @param manager Entry point to CosmosDBForPostgreSqlManager. */ public static void promoteReadReplicaClusterToAnIndependentReadWriteCluster( com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager manager) { - manager.clusters().promoteReadReplica("TestGroup", "testcluster1", com.azure.core.util.Context.NONE); + manager.clusters().promoteReadReplica("TestGroup", "testcluster1", null, com.azure.core.util.Context.NONE); } } ``` @@ -379,14 +352,18 @@ public final class ClustersPromoteReadReplicaSamples { ### Clusters_Restart ```java -/** Samples for Clusters Restart. */ +/** + * Samples for Clusters Restart. + */ public final class ClustersRestartSamples { /* - * x-ms-original-file: specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/ClusterRestart.json + * x-ms-original-file: + * specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-02-preview/examples/ + * ClusterRestart.json */ /** * Sample code: Restart all servers in the cluster. - * + * * @param manager Entry point to CosmosDBForPostgreSqlManager. */ public static void restartAllServersInTheCluster( @@ -399,14 +376,18 @@ public final class ClustersRestartSamples { ### Clusters_Start ```java -/** Samples for Clusters Start. */ +/** + * Samples for Clusters Start. + */ public final class ClustersStartSamples { /* - * x-ms-original-file: specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/ClusterStart.json + * x-ms-original-file: + * specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-02-preview/examples/ + * ClusterStart.json */ /** * Sample code: Start all servers in the cluster. - * + * * @param manager Entry point to CosmosDBForPostgreSqlManager. */ public static void startAllServersInTheCluster( @@ -419,14 +400,18 @@ public final class ClustersStartSamples { ### Clusters_Stop ```java -/** Samples for Clusters Stop. */ +/** + * Samples for Clusters Stop. + */ public final class ClustersStopSamples { /* - * x-ms-original-file: specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/ClusterStop.json + * x-ms-original-file: + * specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-02-preview/examples/ + * ClusterStop.json */ /** * Sample code: Stop all servers in the cluster. - * + * * @param manager Entry point to CosmosDBForPostgreSqlManager. */ public static void stopAllServersInTheCluster( @@ -442,109 +427,95 @@ public final class ClustersStopSamples { import com.azure.resourcemanager.cosmosdbforpostgresql.models.Cluster; import com.azure.resourcemanager.cosmosdbforpostgresql.models.MaintenanceWindow; -/** Samples for Clusters Update. */ +/** + * Samples for Clusters Update. + */ public final class ClustersUpdateSamples { /* - * x-ms-original-file: specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/ClusterScaleStorage.json + * x-ms-original-file: + * specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-02-preview/examples/ + * ClusterScaleStorage.json */ /** * Sample code: Scale up storage. - * + * * @param manager Entry point to CosmosDBForPostgreSqlManager. */ - public static void scaleUpStorage( - com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager manager) { - Cluster resource = - manager - .clusters() - .getByResourceGroupWithResponse("TestGroup", "testcluster", com.azure.core.util.Context.NONE) - .getValue(); + public static void + scaleUpStorage(com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager manager) { + Cluster resource = manager.clusters() + .getByResourceGroupWithResponse("TestGroup", "testcluster", com.azure.core.util.Context.NONE).getValue(); resource.update().withNodeStorageQuotaInMb(2097152).apply(); } /* - * x-ms-original-file: specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/ClusterUpdate.json + * x-ms-original-file: + * specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-02-preview/examples/ + * ClusterUpdate.json */ /** * Sample code: Update multiple configuration settings of the cluster. - * + * * @param manager Entry point to CosmosDBForPostgreSqlManager. */ public static void updateMultipleConfigurationSettingsOfTheCluster( com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager manager) { - Cluster resource = - manager - .clusters() - .getByResourceGroupWithResponse("TestGroup", "testcluster", com.azure.core.util.Context.NONE) - .getValue(); - resource - .update() - .withAdministratorLoginPassword("newpassword") - .withCoordinatorVCores(16) - .withNodeCount(4) - .withNodeVCores(16) - .apply(); + Cluster resource = manager.clusters() + .getByResourceGroupWithResponse("TestGroup", "testcluster", com.azure.core.util.Context.NONE).getValue(); + resource.update().withAdministratorLoginPassword("newpassword").withCoordinatorVCores(16).withNodeCount(4) + .withNodeVCores(16).apply(); } /* - * x-ms-original-file: specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/ClusterScaleCompute.json + * x-ms-original-file: + * specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-02-preview/examples/ + * ClusterScaleCompute.json */ /** * Sample code: Scale compute up or down. - * + * * @param manager Entry point to CosmosDBForPostgreSqlManager. */ - public static void scaleComputeUpOrDown( - com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager manager) { - Cluster resource = - manager - .clusters() - .getByResourceGroupWithResponse("TestGroup", "testcluster", com.azure.core.util.Context.NONE) - .getValue(); + public static void + scaleComputeUpOrDown(com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager manager) { + Cluster resource = manager.clusters() + .getByResourceGroupWithResponse("TestGroup", "testcluster", com.azure.core.util.Context.NONE).getValue(); resource.update().withNodeVCores(16).apply(); } /* - * x-ms-original-file: specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/ClusterAddNode.json + * x-ms-original-file: + * specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-02-preview/examples/ + * ClusterAddNode.json */ /** * Sample code: Scale out: Add new worker nodes. - * + * * @param manager Entry point to CosmosDBForPostgreSqlManager. */ public static void scaleOutAddNewWorkerNodes( com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager manager) { - Cluster resource = - manager - .clusters() - .getByResourceGroupWithResponse("TestGroup", "testcluster", com.azure.core.util.Context.NONE) - .getValue(); + Cluster resource = manager.clusters() + .getByResourceGroupWithResponse("TestGroup", "testcluster", com.azure.core.util.Context.NONE).getValue(); resource.update().withNodeCount(2).apply(); } /* - * x-ms-original-file: specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/ClusterUpdateMaintenanceWindow.json + * x-ms-original-file: + * specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-02-preview/examples/ + * ClusterUpdateMaintenanceWindow.json */ /** * Sample code: Update or define maintenance window. - * + * * @param manager Entry point to CosmosDBForPostgreSqlManager. */ public static void updateOrDefineMaintenanceWindow( com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager manager) { - Cluster resource = - manager - .clusters() - .getByResourceGroupWithResponse("TestGroup", "testcluster", com.azure.core.util.Context.NONE) - .getValue(); - resource - .update() - .withMaintenanceWindow( - new MaintenanceWindow() - .withCustomWindow("Enabled") - .withStartHour(8) - .withStartMinute(0) - .withDayOfWeek(0)) + Cluster resource = manager.clusters() + .getByResourceGroupWithResponse("TestGroup", "testcluster", com.azure.core.util.Context.NONE).getValue(); + resource.update().withMaintenanceWindow( + new MaintenanceWindow().withCustomWindow("Enabled").withStartHour(8).withStartMinute(0).withDayOfWeek(0)) .apply(); } } @@ -553,21 +524,24 @@ public final class ClustersUpdateSamples { ### Configurations_Get ```java -/** Samples for Configurations Get. */ +/** + * Samples for Configurations Get. + */ public final class ConfigurationsGetSamples { /* - * x-ms-original-file: specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/ConfigurationGet.json + * x-ms-original-file: + * specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-02-preview/examples/ + * ConfigurationGet.json */ /** * Sample code: Get configuration details. - * + * * @param manager Entry point to CosmosDBForPostgreSqlManager. */ - public static void getConfigurationDetails( - com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager manager) { - manager - .configurations() - .getWithResponse("TestResourceGroup", "testcluster", "client_encoding", com.azure.core.util.Context.NONE); + public static void + getConfigurationDetails(com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager manager) { + manager.configurations().getWithResponse("TestResourceGroup", "testcluster", "client_encoding", + com.azure.core.util.Context.NONE); } } ``` @@ -575,22 +549,24 @@ public final class ConfigurationsGetSamples { ### Configurations_GetCoordinator ```java -/** Samples for Configurations GetCoordinator. */ +/** + * Samples for Configurations GetCoordinator. + */ public final class ConfigurationsGetCoordinatorSamples { /* - * x-ms-original-file: specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/ConfigurationGetCoordinator.json + * x-ms-original-file: + * specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-02-preview/examples/ + * ConfigurationGetCoordinator.json */ /** * Sample code: Get configuration details for coordinator. - * + * * @param manager Entry point to CosmosDBForPostgreSqlManager. */ public static void getConfigurationDetailsForCoordinator( com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager manager) { - manager - .configurations() - .getCoordinatorWithResponse( - "TestResourceGroup", "testcluster", "array_nulls", com.azure.core.util.Context.NONE); + manager.configurations().getCoordinatorWithResponse("TestResourceGroup", "testcluster", "array_nulls", + com.azure.core.util.Context.NONE); } } ``` @@ -598,21 +574,24 @@ public final class ConfigurationsGetCoordinatorSamples { ### Configurations_GetNode ```java -/** Samples for Configurations GetNode. */ +/** + * Samples for Configurations GetNode. + */ public final class ConfigurationsGetNodeSamples { /* - * x-ms-original-file: specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/ConfigurationGetNode.json + * x-ms-original-file: + * specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-02-preview/examples/ + * ConfigurationGetNode.json */ /** * Sample code: Get configuration details for node. - * + * * @param manager Entry point to CosmosDBForPostgreSqlManager. */ public static void getConfigurationDetailsForNode( com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager manager) { - manager - .configurations() - .getNodeWithResponse("TestResourceGroup", "testcluster", "array_nulls", com.azure.core.util.Context.NONE); + manager.configurations().getNodeWithResponse("TestResourceGroup", "testcluster", "array_nulls", + com.azure.core.util.Context.NONE); } } ``` @@ -620,14 +599,18 @@ public final class ConfigurationsGetNodeSamples { ### Configurations_ListByCluster ```java -/** Samples for Configurations ListByCluster. */ +/** + * Samples for Configurations ListByCluster. + */ public final class ConfigurationsListByClusterSamples { /* - * x-ms-original-file: specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/ConfigurationListByCluster.json + * x-ms-original-file: + * specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-02-preview/examples/ + * ConfigurationListByCluster.json */ /** * Sample code: List configurations of the cluster. - * + * * @param manager Entry point to CosmosDBForPostgreSqlManager. */ public static void listConfigurationsOfTheCluster( @@ -640,21 +623,24 @@ public final class ConfigurationsListByClusterSamples { ### Configurations_ListByServer ```java -/** Samples for Configurations ListByServer. */ +/** + * Samples for Configurations ListByServer. + */ public final class ConfigurationsListByServerSamples { /* - * x-ms-original-file: specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/ConfigurationListByServer.json + * x-ms-original-file: + * specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-02-preview/examples/ + * ConfigurationListByServer.json */ /** * Sample code: List configurations of the server that in the cluster. - * + * * @param manager Entry point to CosmosDBForPostgreSqlManager. */ public static void listConfigurationsOfTheServerThatInTheCluster( com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager manager) { - manager - .configurations() - .listByServer("TestResourceGroup", "testcluster", "testserver", com.azure.core.util.Context.NONE); + manager.configurations().listByServer("TestResourceGroup", "testcluster", "testserver", + com.azure.core.util.Context.NONE); } } ``` @@ -664,26 +650,24 @@ public final class ConfigurationsListByServerSamples { ```java import com.azure.resourcemanager.cosmosdbforpostgresql.fluent.models.ServerConfigurationInner; -/** Samples for Configurations UpdateOnCoordinator. */ +/** + * Samples for Configurations UpdateOnCoordinator. + */ public final class ConfigurationsUpdateOnCoordinatorSamples { /* - * x-ms-original-file: specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/ConfigurationUpdateCoordinator.json + * x-ms-original-file: + * specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-02-preview/examples/ + * ConfigurationUpdateCoordinator.json */ /** * Sample code: Update single configuration of coordinator. - * + * * @param manager Entry point to CosmosDBForPostgreSqlManager. */ public static void updateSingleConfigurationOfCoordinator( com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager manager) { - manager - .configurations() - .updateOnCoordinator( - "TestResourceGroup", - "testcluster", - "array_nulls", - new ServerConfigurationInner().withValue("on"), - com.azure.core.util.Context.NONE); + manager.configurations().updateOnCoordinator("TestResourceGroup", "testcluster", "array_nulls", + new ServerConfigurationInner().withValue("on"), com.azure.core.util.Context.NONE); } } ``` @@ -693,26 +677,24 @@ public final class ConfigurationsUpdateOnCoordinatorSamples { ```java import com.azure.resourcemanager.cosmosdbforpostgresql.fluent.models.ServerConfigurationInner; -/** Samples for Configurations UpdateOnNode. */ +/** + * Samples for Configurations UpdateOnNode. + */ public final class ConfigurationsUpdateOnNodeSamples { /* - * x-ms-original-file: specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/ConfigurationUpdateNode.json + * x-ms-original-file: + * specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-02-preview/examples/ + * ConfigurationUpdateNode.json */ /** * Sample code: Update single configuration of nodes. - * + * * @param manager Entry point to CosmosDBForPostgreSqlManager. */ public static void updateSingleConfigurationOfNodes( com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager manager) { - manager - .configurations() - .updateOnNode( - "TestResourceGroup", - "testcluster", - "array_nulls", - new ServerConfigurationInner().withValue("off"), - com.azure.core.util.Context.NONE); + manager.configurations().updateOnNode("TestResourceGroup", "testcluster", "array_nulls", + new ServerConfigurationInner().withValue("off"), com.azure.core.util.Context.NONE); } } ``` @@ -720,25 +702,24 @@ public final class ConfigurationsUpdateOnNodeSamples { ### FirewallRules_CreateOrUpdate ```java -/** Samples for FirewallRules CreateOrUpdate. */ +/** + * Samples for FirewallRules CreateOrUpdate. + */ public final class FirewallRulesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/FirewallRuleCreate.json + * x-ms-original-file: + * specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-02-preview/examples/ + * FirewallRuleCreate.json */ /** * Sample code: Create a firewall rule of the cluster. - * + * * @param manager Entry point to CosmosDBForPostgreSqlManager. */ public static void createAFirewallRuleOfTheCluster( com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager manager) { - manager - .firewallRules() - .define("rule1") - .withExistingServerGroupsv2("TestGroup", "pgtestsvc4") - .withStartIpAddress("0.0.0.0") - .withEndIpAddress("255.255.255.255") - .create(); + manager.firewallRules().define("rule1").withExistingServerGroupsv2("TestGroup", "pgtestsvc4") + .withStartIpAddress("0.0.0.0").withEndIpAddress("255.255.255.255").create(); } } ``` @@ -746,14 +727,18 @@ public final class FirewallRulesCreateOrUpdateSamples { ### FirewallRules_Delete ```java -/** Samples for FirewallRules Delete. */ +/** + * Samples for FirewallRules Delete. + */ public final class FirewallRulesDeleteSamples { /* - * x-ms-original-file: specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/FirewallRuleDelete.json + * x-ms-original-file: + * specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-02-preview/examples/ + * FirewallRuleDelete.json */ /** * Sample code: Delete the firewall rule of the cluster. - * + * * @param manager Entry point to CosmosDBForPostgreSqlManager. */ public static void deleteTheFirewallRuleOfTheCluster( @@ -766,14 +751,18 @@ public final class FirewallRulesDeleteSamples { ### FirewallRules_Get ```java -/** Samples for FirewallRules Get. */ +/** + * Samples for FirewallRules Get. + */ public final class FirewallRulesGetSamples { /* - * x-ms-original-file: specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/FirewallRuleGet.json + * x-ms-original-file: + * specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-02-preview/examples/ + * FirewallRuleGet.json */ /** * Sample code: Get the firewall rule of the cluster. - * + * * @param manager Entry point to CosmosDBForPostgreSqlManager. */ public static void getTheFirewallRuleOfTheCluster( @@ -786,14 +775,18 @@ public final class FirewallRulesGetSamples { ### FirewallRules_ListByCluster ```java -/** Samples for FirewallRules ListByCluster. */ +/** + * Samples for FirewallRules ListByCluster. + */ public final class FirewallRulesListByClusterSamples { /* - * x-ms-original-file: specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/FirewallRuleListByCluster.json + * x-ms-original-file: + * specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-02-preview/examples/ + * FirewallRuleListByCluster.json */ /** * Sample code: List firewall rules of the cluster. - * + * * @param manager Entry point to CosmosDBForPostgreSqlManager. */ public static void listFirewallRulesOfTheCluster( @@ -806,14 +799,18 @@ public final class FirewallRulesListByClusterSamples { ### Operations_List ```java -/** Samples for Operations List. */ +/** + * Samples for Operations List. + */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/OperationList.json + * x-ms-original-file: + * specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-02-preview/examples/ + * OperationList.json */ /** * Sample code: List all available operations. - * + * * @param manager Entry point to CosmosDBForPostgreSqlManager. */ public static void listAllAvailableOperations( @@ -829,25 +826,26 @@ public final class OperationsListSamples { import com.azure.resourcemanager.cosmosdbforpostgresql.models.PrivateEndpointServiceConnectionStatus; import com.azure.resourcemanager.cosmosdbforpostgresql.models.PrivateLinkServiceConnectionState; -/** Samples for PrivateEndpointConnections CreateOrUpdate. */ +/** + * Samples for PrivateEndpointConnections CreateOrUpdate. + */ public final class PrivateEndpointConnectionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/PrivateEndpointConnectionCreateOrUpdate.json + * x-ms-original-file: + * specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-02-preview/examples/ + * PrivateEndpointConnectionCreateOrUpdate.json */ /** * Sample code: Approves or Rejects a Private Endpoint Connection with a given name. - * + * * @param manager Entry point to CosmosDBForPostgreSqlManager. */ public static void approvesOrRejectsAPrivateEndpointConnectionWithAGivenName( com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager manager) { - manager - .privateEndpointConnections() - .define("private-endpoint-connection-name") + manager.privateEndpointConnections().define("private-endpoint-connection-name") .withExistingServerGroupsv2("TestGroup", "testcluster") .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionState() - .withStatus(PrivateEndpointServiceConnectionStatus.APPROVED) + new PrivateLinkServiceConnectionState().withStatus(PrivateEndpointServiceConnectionStatus.APPROVED) .withDescription("Approved by johndoe@contoso.com")) .create(); } @@ -857,21 +855,24 @@ public final class PrivateEndpointConnectionsCreateOrUpdateSamples { ### PrivateEndpointConnections_Delete ```java -/** Samples for PrivateEndpointConnections Delete. */ +/** + * Samples for PrivateEndpointConnections Delete. + */ public final class PrivateEndpointConnectionsDeleteSamples { /* - * x-ms-original-file: specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/PrivateEndpointConnectionsDelete.json + * x-ms-original-file: + * specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-02-preview/examples/ + * PrivateEndpointConnectionsDelete.json */ /** * Sample code: Deletes a private endpoint connection with a given name. - * + * * @param manager Entry point to CosmosDBForPostgreSqlManager. */ public static void deletesAPrivateEndpointConnectionWithAGivenName( com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager manager) { - manager - .privateEndpointConnections() - .delete("TestGroup", "testcluster", "private-endpoint-connection-name", com.azure.core.util.Context.NONE); + manager.privateEndpointConnections().delete("TestGroup", "testcluster", "private-endpoint-connection-name", + com.azure.core.util.Context.NONE); } } ``` @@ -879,22 +880,24 @@ public final class PrivateEndpointConnectionsDeleteSamples { ### PrivateEndpointConnections_Get ```java -/** Samples for PrivateEndpointConnections Get. */ +/** + * Samples for PrivateEndpointConnections Get. + */ public final class PrivateEndpointConnectionsGetSamples { /* - * x-ms-original-file: specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/PrivateEndpointConnectionsGet.json + * x-ms-original-file: + * specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-02-preview/examples/ + * PrivateEndpointConnectionsGet.json */ /** * Sample code: Gets private endpoint connection. - * + * * @param manager Entry point to CosmosDBForPostgreSqlManager. */ public static void getsPrivateEndpointConnection( com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager manager) { - manager - .privateEndpointConnections() - .getWithResponse( - "TestGroup", "testcluster", "private-endpoint-connection-name", com.azure.core.util.Context.NONE); + manager.privateEndpointConnections().getWithResponse("TestGroup", "testcluster", + "private-endpoint-connection-name", com.azure.core.util.Context.NONE); } } ``` @@ -902,21 +905,24 @@ public final class PrivateEndpointConnectionsGetSamples { ### PrivateEndpointConnections_ListByCluster ```java -/** Samples for PrivateEndpointConnections ListByCluster. */ +/** + * Samples for PrivateEndpointConnections ListByCluster. + */ public final class PrivateEndpointConnectionsListByClusterSamples { /* - * x-ms-original-file: specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/PrivateEndpointConnectionsListByCluster.json + * x-ms-original-file: + * specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-02-preview/examples/ + * PrivateEndpointConnectionsListByCluster.json */ /** * Sample code: Gets list of private endpoint connections on a cluster. - * + * * @param manager Entry point to CosmosDBForPostgreSqlManager. */ public static void getsListOfPrivateEndpointConnectionsOnACluster( com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager manager) { - manager - .privateEndpointConnections() - .listByCluster("TestResourceGroup", "testcluster", com.azure.core.util.Context.NONE); + manager.privateEndpointConnections().listByCluster("TestResourceGroup", "testcluster", + com.azure.core.util.Context.NONE); } } ``` @@ -924,21 +930,24 @@ public final class PrivateEndpointConnectionsListByClusterSamples { ### PrivateLinkResources_Get ```java -/** Samples for PrivateLinkResources Get. */ +/** + * Samples for PrivateLinkResources Get. + */ public final class PrivateLinkResourcesGetSamples { /* - * x-ms-original-file: specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/PrivateLinkResourcesGet.json + * x-ms-original-file: + * specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-02-preview/examples/ + * PrivateLinkResourcesGet.json */ /** * Sample code: Gets a private link resource for cluster. - * + * * @param manager Entry point to CosmosDBForPostgreSqlManager. */ public static void getsAPrivateLinkResourceForCluster( com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager manager) { - manager - .privateLinkResources() - .getWithResponse("TestGroup", "testcluster", "plr", com.azure.core.util.Context.NONE); + manager.privateLinkResources().getWithResponse("TestGroup", "testcluster", "plr", + com.azure.core.util.Context.NONE); } } ``` @@ -946,21 +955,24 @@ public final class PrivateLinkResourcesGetSamples { ### PrivateLinkResources_ListByCluster ```java -/** Samples for PrivateLinkResources ListByCluster. */ +/** + * Samples for PrivateLinkResources ListByCluster. + */ public final class PrivateLinkResourcesListByClusterSamples { /* - * x-ms-original-file: specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/PrivateLinkResourceListByCluster.json + * x-ms-original-file: + * specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-02-preview/examples/ + * PrivateLinkResourceListByCluster.json */ /** * Sample code: Gets the private link resources for cluster. - * + * * @param manager Entry point to CosmosDBForPostgreSqlManager. */ public static void getsThePrivateLinkResourcesForCluster( com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager manager) { - manager - .privateLinkResources() - .listByCluster("TestResourceGroup", "testcluster", com.azure.core.util.Context.NONE); + manager.privateLinkResources().listByCluster("TestResourceGroup", "testcluster", + com.azure.core.util.Context.NONE); } } ``` @@ -968,23 +980,23 @@ public final class PrivateLinkResourcesListByClusterSamples { ### Roles_Create ```java -/** Samples for Roles Create. */ +/** + * Samples for Roles Create. + */ public final class RolesCreateSamples { /* - * x-ms-original-file: specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/RoleCreate.json + * x-ms-original-file: + * specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-02-preview/examples/ + * RoleCreate.json */ /** * Sample code: RoleCreate. - * + * * @param manager Entry point to CosmosDBForPostgreSqlManager. */ - public static void roleCreate( - com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager manager) { - manager - .roles() - .define("role1") - .withExistingServerGroupsv2("TestGroup", "pgtestsvc4") - .withPassword("password") + public static void + roleCreate(com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager manager) { + manager.roles().define("role1").withExistingServerGroupsv2("TestGroup", "pgtestsvc4").withPassword("password") .create(); } } @@ -993,18 +1005,22 @@ public final class RolesCreateSamples { ### Roles_Delete ```java -/** Samples for Roles Delete. */ +/** + * Samples for Roles Delete. + */ public final class RolesDeleteSamples { /* - * x-ms-original-file: specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/RoleDelete.json + * x-ms-original-file: + * specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-02-preview/examples/ + * RoleDelete.json */ /** * Sample code: RoleDelete. - * + * * @param manager Entry point to CosmosDBForPostgreSqlManager. */ - public static void roleDelete( - com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager manager) { + public static void + roleDelete(com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager manager) { manager.roles().delete("TestGroup", "pgtestsvc4", "role1", com.azure.core.util.Context.NONE); } } @@ -1013,18 +1029,22 @@ public final class RolesDeleteSamples { ### Roles_Get ```java -/** Samples for Roles Get. */ +/** + * Samples for Roles Get. + */ public final class RolesGetSamples { /* - * x-ms-original-file: specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/RoleGet.json + * x-ms-original-file: + * specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-02-preview/examples/ + * RoleGet.json */ /** * Sample code: Get the role of the cluster. - * + * * @param manager Entry point to CosmosDBForPostgreSqlManager. */ - public static void getTheRoleOfTheCluster( - com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager manager) { + public static void + getTheRoleOfTheCluster(com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager manager) { manager.roles().getWithResponse("TestGroup", "pgtestsvc4", "role1", com.azure.core.util.Context.NONE); } } @@ -1033,14 +1053,18 @@ public final class RolesGetSamples { ### Roles_ListByCluster ```java -/** Samples for Roles ListByCluster. */ +/** + * Samples for Roles ListByCluster. + */ public final class RolesListByClusterSamples { /* - * x-ms-original-file: specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/RoleListByCluster.json + * x-ms-original-file: + * specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-02-preview/examples/ + * RoleListByCluster.json */ /** * Sample code: RoleList. - * + * * @param manager Entry point to CosmosDBForPostgreSqlManager. */ public static void roleList(com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager manager) { @@ -1052,21 +1076,24 @@ public final class RolesListByClusterSamples { ### Servers_Get ```java -/** Samples for Servers Get. */ +/** + * Samples for Servers Get. + */ public final class ServersGetSamples { /* - * x-ms-original-file: specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/ServerGet.json + * x-ms-original-file: + * specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-02-preview/examples/ + * ServerGet.json */ /** * Sample code: Get the server of cluster. - * + * * @param manager Entry point to CosmosDBForPostgreSqlManager. */ - public static void getTheServerOfCluster( - com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager manager) { - manager - .servers() - .getWithResponse("TestGroup", "testcluster1", "testcluster1-c", com.azure.core.util.Context.NONE); + public static void + getTheServerOfCluster(com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager manager) { + manager.servers().getWithResponse("TestGroup", "testcluster1", "testcluster1-c", + com.azure.core.util.Context.NONE); } } ``` @@ -1074,18 +1101,22 @@ public final class ServersGetSamples { ### Servers_ListByCluster ```java -/** Samples for Servers ListByCluster. */ +/** + * Samples for Servers ListByCluster. + */ public final class ServersListByClusterSamples { /* - * x-ms-original-file: specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/ServerListByCluster.json + * x-ms-original-file: + * specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-02-preview/examples/ + * ServerListByCluster.json */ /** * Sample code: List servers of the cluster. - * + * * @param manager Entry point to CosmosDBForPostgreSqlManager. */ - public static void listServersOfTheCluster( - com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager manager) { + public static void + listServersOfTheCluster(com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager manager) { manager.servers().listByCluster("TestGroup", "testcluster1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/pom.xml b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/pom.xml index d947f7b32385..2af9488f7c28 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/pom.xml +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/pom.xml @@ -18,7 +18,7 @@ jar Microsoft Azure SDK for CosmosDBForPostgreSql Management - This package contains Microsoft Azure SDK for CosmosDBForPostgreSql Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Azure Cosmos DB for PostgreSQL database service resource provider REST APIs. Package tag package-2022-11-08. + This package contains Microsoft Azure SDK for CosmosDBForPostgreSql Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Azure Cosmos DB for PostgreSQL database service resource provider REST APIs. Package tag package-preview-2023-03. https://github.com/Azure/azure-sdk-for-java @@ -45,6 +45,7 @@ UTF-8 0 0 + true @@ -69,12 +70,6 @@ 1.11.4 test - - com.azure.resourcemanager - azure-resourcemanager-resources - 2.36.0 - test - org.junit.jupiter junit-jupiter-api @@ -93,8 +88,6 @@ 4.11.0 test - - net.bytebuddy byte-buddy @@ -113,5 +106,11 @@ 1.7.36 test + + com.azure.resourcemanager + azure-resourcemanager-resources + 2.36.0 + test + diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/CosmosDBForPostgreSqlManager.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/CosmosDBForPostgreSqlManager.java index fcd5c8e88101..3a0b8d4fd6c8 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/CosmosDBForPostgreSqlManager.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/CosmosDBForPostgreSqlManager.java @@ -49,8 +49,8 @@ import java.util.stream.Collectors; /** - * Entry point to CosmosDBForPostgreSqlManager. Azure Cosmos DB for PostgreSQL database service resource provider REST - * APIs. + * Entry point to CosmosDBForPostgreSqlManager. + * Azure Cosmos DB for PostgreSQL database service resource provider REST APIs. */ public final class CosmosDBForPostgreSqlManager { private Clusters clusters; @@ -71,22 +71,18 @@ public final class CosmosDBForPostgreSqlManager { private final CosmosDBForPostgreSql clientObject; - private CosmosDBForPostgreSqlManager( - HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) { + private CosmosDBForPostgreSqlManager(HttpPipeline httpPipeline, AzureProfile profile, + Duration defaultPollInterval) { Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); Objects.requireNonNull(profile, "'profile' cannot be null."); - this.clientObject = - new CosmosDBForPostgreSqlBuilder() - .pipeline(httpPipeline) - .endpoint(profile.getEnvironment().getResourceManagerEndpoint()) - .subscriptionId(profile.getSubscriptionId()) - .defaultPollInterval(defaultPollInterval) - .buildClient(); + this.clientObject = new CosmosDBForPostgreSqlBuilder().pipeline(httpPipeline) + .endpoint(profile.getEnvironment().getResourceManagerEndpoint()).subscriptionId(profile.getSubscriptionId()) + .defaultPollInterval(defaultPollInterval).buildClient(); } /** * Creates an instance of CosmosDBForPostgreSql service API entry point. - * + * * @param credential the credential to use. * @param profile the Azure profile for client. * @return the CosmosDBForPostgreSql service API instance. @@ -99,7 +95,7 @@ public static CosmosDBForPostgreSqlManager authenticate(TokenCredential credenti /** * Creates an instance of CosmosDBForPostgreSql service API entry point. - * + * * @param httpPipeline the {@link HttpPipeline} configured with Azure authentication credential. * @param profile the Azure profile for client. * @return the CosmosDBForPostgreSql service API instance. @@ -112,14 +108,16 @@ public static CosmosDBForPostgreSqlManager authenticate(HttpPipeline httpPipelin /** * Gets a Configurable instance that can be used to create CosmosDBForPostgreSqlManager with optional configuration. - * + * * @return the Configurable instance allowing configurations. */ public static Configurable configure() { return new CosmosDBForPostgreSqlManager.Configurable(); } - /** The Configurable allowing configurations to be set. */ + /** + * The Configurable allowing configurations to be set. + */ public static final class Configurable { private static final ClientLogger LOGGER = new ClientLogger(Configurable.class); @@ -191,8 +189,8 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) { /** * Sets the retry options for the HTTP pipeline retry policy. - * - *

This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}. + *

+ * This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}. * * @param retryOptions the retry options for the HTTP pipeline retry policy. * @return the configurable object itself. @@ -209,8 +207,8 @@ public Configurable withRetryOptions(RetryOptions retryOptions) { * @return the configurable object itself. */ public Configurable withDefaultPollInterval(Duration defaultPollInterval) { - this.defaultPollInterval = - Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null."); + this.defaultPollInterval + = Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null."); if (this.defaultPollInterval.isNegative()) { throw LOGGER .logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative")); @@ -230,21 +228,12 @@ public CosmosDBForPostgreSqlManager authenticate(TokenCredential credential, Azu Objects.requireNonNull(profile, "'profile' cannot be null."); StringBuilder userAgentBuilder = new StringBuilder(); - userAgentBuilder - .append("azsdk-java") - .append("-") - .append("com.azure.resourcemanager.cosmosdbforpostgresql") - .append("/") - .append("1.0.0"); + userAgentBuilder.append("azsdk-java").append("-").append("com.azure.resourcemanager.cosmosdbforpostgresql") + .append("/").append("1.1.0-beta.1"); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { - userAgentBuilder - .append(" (") - .append(Configuration.getGlobalConfiguration().get("java.version")) - .append("; ") - .append(Configuration.getGlobalConfiguration().get("os.name")) - .append("; ") - .append(Configuration.getGlobalConfiguration().get("os.version")) - .append("; auto-generated)"); + userAgentBuilder.append(" (").append(Configuration.getGlobalConfiguration().get("java.version")) + .append("; ").append(Configuration.getGlobalConfiguration().get("os.name")).append("; ") + .append(Configuration.getGlobalConfiguration().get("os.version")).append("; auto-generated)"); } else { userAgentBuilder.append(" (auto-generated)"); } @@ -263,38 +252,25 @@ public CosmosDBForPostgreSqlManager authenticate(TokenCredential credential, Azu policies.add(new UserAgentPolicy(userAgentBuilder.toString())); policies.add(new AddHeadersFromContextPolicy()); policies.add(new RequestIdPolicy()); - policies - .addAll( - this - .policies - .stream() - .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) - .collect(Collectors.toList())); + policies.addAll(this.policies.stream().filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) + .collect(Collectors.toList())); HttpPolicyProviders.addBeforeRetryPolicies(policies); policies.add(retryPolicy); policies.add(new AddDatePolicy()); policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0]))); - policies - .addAll( - this - .policies - .stream() - .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) - .collect(Collectors.toList())); + policies.addAll(this.policies.stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY).collect(Collectors.toList())); HttpPolicyProviders.addAfterRetryPolicies(policies); policies.add(new HttpLoggingPolicy(httpLogOptions)); - HttpPipeline httpPipeline = - new HttpPipelineBuilder() - .httpClient(httpClient) - .policies(policies.toArray(new HttpPipelinePolicy[0])) - .build(); + HttpPipeline httpPipeline = new HttpPipelineBuilder().httpClient(httpClient) + .policies(policies.toArray(new HttpPipelinePolicy[0])).build(); return new CosmosDBForPostgreSqlManager(httpPipeline, profile, defaultPollInterval); } } /** * Gets the resource collection API of Clusters. It manages Cluster. - * + * * @return Resource collection API of Clusters. */ public Clusters clusters() { @@ -306,7 +282,7 @@ public Clusters clusters() { /** * Gets the resource collection API of Servers. - * + * * @return Resource collection API of Servers. */ public Servers servers() { @@ -318,7 +294,7 @@ public Servers servers() { /** * Gets the resource collection API of Configurations. - * + * * @return Resource collection API of Configurations. */ public Configurations configurations() { @@ -330,7 +306,7 @@ public Configurations configurations() { /** * Gets the resource collection API of FirewallRules. It manages FirewallRule. - * + * * @return Resource collection API of FirewallRules. */ public FirewallRules firewallRules() { @@ -342,7 +318,7 @@ public FirewallRules firewallRules() { /** * Gets the resource collection API of Roles. It manages Role. - * + * * @return Resource collection API of Roles. */ public Roles roles() { @@ -354,7 +330,7 @@ public Roles roles() { /** * Gets the resource collection API of Operations. - * + * * @return Resource collection API of Operations. */ public Operations operations() { @@ -366,20 +342,20 @@ public Operations operations() { /** * Gets the resource collection API of PrivateEndpointConnections. It manages PrivateEndpointConnection. - * + * * @return Resource collection API of PrivateEndpointConnections. */ public PrivateEndpointConnections privateEndpointConnections() { if (this.privateEndpointConnections == null) { - this.privateEndpointConnections = - new PrivateEndpointConnectionsImpl(clientObject.getPrivateEndpointConnections(), this); + this.privateEndpointConnections + = new PrivateEndpointConnectionsImpl(clientObject.getPrivateEndpointConnections(), this); } return privateEndpointConnections; } /** * Gets the resource collection API of PrivateLinkResources. - * + * * @return Resource collection API of PrivateLinkResources. */ public PrivateLinkResources privateLinkResources() { @@ -392,7 +368,7 @@ public PrivateLinkResources privateLinkResources() { /** * Gets wrapped service client CosmosDBForPostgreSql providing direct access to the underlying auto-generated API * implementation, based on Azure REST API. - * + * * @return Wrapped service client CosmosDBForPostgreSql. */ public CosmosDBForPostgreSql serviceClient() { diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/ClustersClient.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/ClustersClient.java index aa0aa2d81eef..339dc28865c4 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/ClustersClient.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/ClustersClient.java @@ -15,12 +15,15 @@ import com.azure.resourcemanager.cosmosdbforpostgresql.fluent.models.NameAvailabilityInner; import com.azure.resourcemanager.cosmosdbforpostgresql.models.ClusterForUpdate; import com.azure.resourcemanager.cosmosdbforpostgresql.models.NameAvailabilityRequest; +import com.azure.resourcemanager.cosmosdbforpostgresql.models.PromoteRequest; -/** An instance of this class provides access to all the operations defined in ClustersClient. */ +/** + * An instance of this class provides access to all the operations defined in ClustersClient. + */ public interface ClustersClient { /** * Lists all clusters in a subscription. - * + * * @throws com.azure.core.management.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 list of clusters as paginated response with {@link PagedIterable}. @@ -30,7 +33,7 @@ public interface ClustersClient { /** * Lists all clusters in a subscription. - * + * * @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. @@ -42,7 +45,7 @@ public interface ClustersClient { /** * Lists all clusters in a resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -54,7 +57,7 @@ public interface ClustersClient { /** * Lists all clusters in a resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -67,7 +70,7 @@ public interface ClustersClient { /** * Creates a new cluster with servers. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param parameters The required parameters for creating or updating a cluster. @@ -77,12 +80,12 @@ public interface ClustersClient { * @return the {@link SyncPoller} for polling of represents a cluster. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ClusterInner> beginCreate( - String resourceGroupName, String clusterName, ClusterInner parameters); + SyncPoller, ClusterInner> beginCreate(String resourceGroupName, String clusterName, + ClusterInner parameters); /** * Creates a new cluster with servers. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param parameters The required parameters for creating or updating a cluster. @@ -93,12 +96,12 @@ SyncPoller, ClusterInner> beginCreate( * @return the {@link SyncPoller} for polling of represents a cluster. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ClusterInner> beginCreate( - String resourceGroupName, String clusterName, ClusterInner parameters, Context context); + SyncPoller, ClusterInner> beginCreate(String resourceGroupName, String clusterName, + ClusterInner parameters, Context context); /** * Creates a new cluster with servers. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param parameters The required parameters for creating or updating a cluster. @@ -112,7 +115,7 @@ SyncPoller, ClusterInner> beginCreate( /** * Creates a new cluster with servers. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param parameters The required parameters for creating or updating a cluster. @@ -128,7 +131,7 @@ SyncPoller, ClusterInner> beginCreate( /** * Gets information about a cluster such as compute and storage configuration and cluster lifecycle metadata such as * cluster creation date and time. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param context The context to associate with this operation. @@ -136,30 +139,30 @@ SyncPoller, ClusterInner> beginCreate( * @throws com.azure.core.management.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 cluster such as compute and storage configuration and cluster lifecycle metadata such - * as cluster creation date and time along with {@link Response}. + * as cluster creation date and time along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse( - String resourceGroupName, String clusterName, Context context); + Response getByResourceGroupWithResponse(String resourceGroupName, String clusterName, + Context context); /** * Gets information about a cluster such as compute and storage configuration and cluster lifecycle metadata such as * cluster creation date and time. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.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 cluster such as compute and storage configuration and cluster lifecycle metadata such - * as cluster creation date and time. + * as cluster creation date and time. */ @ServiceMethod(returns = ReturnType.SINGLE) ClusterInner getByResourceGroup(String resourceGroupName, String clusterName); /** * Deletes a cluster together with servers in it. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -172,7 +175,7 @@ Response getByResourceGroupWithResponse( /** * Deletes a cluster together with servers in it. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param context The context to associate with this operation. @@ -186,7 +189,7 @@ Response getByResourceGroupWithResponse( /** * Deletes a cluster together with servers in it. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -198,7 +201,7 @@ Response getByResourceGroupWithResponse( /** * Deletes a cluster together with servers in it. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param context The context to associate with this operation. @@ -211,7 +214,7 @@ Response getByResourceGroupWithResponse( /** * Updates an existing cluster. The request body can contain one or several properties from the cluster definition. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param parameters The parameters for updating a cluster. @@ -221,12 +224,12 @@ Response getByResourceGroupWithResponse( * @return the {@link SyncPoller} for polling of represents a cluster. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ClusterInner> beginUpdate( - String resourceGroupName, String clusterName, ClusterForUpdate parameters); + SyncPoller, ClusterInner> beginUpdate(String resourceGroupName, String clusterName, + ClusterForUpdate parameters); /** * Updates an existing cluster. The request body can contain one or several properties from the cluster definition. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param parameters The parameters for updating a cluster. @@ -237,12 +240,12 @@ SyncPoller, ClusterInner> beginUpdate( * @return the {@link SyncPoller} for polling of represents a cluster. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ClusterInner> beginUpdate( - String resourceGroupName, String clusterName, ClusterForUpdate parameters, Context context); + SyncPoller, ClusterInner> beginUpdate(String resourceGroupName, String clusterName, + ClusterForUpdate parameters, Context context); /** * Updates an existing cluster. The request body can contain one or several properties from the cluster definition. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param parameters The parameters for updating a cluster. @@ -256,7 +259,7 @@ SyncPoller, ClusterInner> beginUpdate( /** * Updates an existing cluster. The request body can contain one or several properties from the cluster definition. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param parameters The parameters for updating a cluster. @@ -271,7 +274,7 @@ SyncPoller, ClusterInner> beginUpdate( /** * Restarts all nodes in the cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -284,7 +287,7 @@ SyncPoller, ClusterInner> beginUpdate( /** * Restarts all nodes in the cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param context The context to associate with this operation. @@ -298,7 +301,7 @@ SyncPoller, ClusterInner> beginUpdate( /** * Restarts all nodes in the cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -310,7 +313,7 @@ SyncPoller, ClusterInner> beginUpdate( /** * Restarts all nodes in the cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param context The context to associate with this operation. @@ -323,7 +326,7 @@ SyncPoller, ClusterInner> beginUpdate( /** * Starts stopped compute on all cluster nodes. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -336,7 +339,7 @@ SyncPoller, ClusterInner> beginUpdate( /** * Starts stopped compute on all cluster nodes. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param context The context to associate with this operation. @@ -350,7 +353,7 @@ SyncPoller, ClusterInner> beginUpdate( /** * Starts stopped compute on all cluster nodes. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -362,7 +365,7 @@ SyncPoller, ClusterInner> beginUpdate( /** * Starts stopped compute on all cluster nodes. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param context The context to associate with this operation. @@ -375,7 +378,7 @@ SyncPoller, ClusterInner> beginUpdate( /** * Stops compute on all cluster nodes. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -388,7 +391,7 @@ SyncPoller, ClusterInner> beginUpdate( /** * Stops compute on all cluster nodes. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param context The context to associate with this operation. @@ -402,7 +405,7 @@ SyncPoller, ClusterInner> beginUpdate( /** * Stops compute on all cluster nodes. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -414,7 +417,7 @@ SyncPoller, ClusterInner> beginUpdate( /** * Stops compute on all cluster nodes. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param context The context to associate with this operation. @@ -427,7 +430,7 @@ SyncPoller, ClusterInner> beginUpdate( /** * Promotes read replica cluster to an independent read-write cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -440,9 +443,10 @@ SyncPoller, ClusterInner> beginUpdate( /** * Promotes read replica cluster to an independent read-write cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. + * @param promoteRequest The parameter for enabling geo-redundant backup while promoting read replica. * @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. @@ -450,12 +454,12 @@ SyncPoller, ClusterInner> beginUpdate( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginPromoteReadReplica( - String resourceGroupName, String clusterName, Context context); + SyncPoller, Void> beginPromoteReadReplica(String resourceGroupName, String clusterName, + PromoteRequest promoteRequest, Context context); /** * Promotes read replica cluster to an independent read-write cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -467,22 +471,24 @@ SyncPoller, Void> beginPromoteReadReplica( /** * Promotes read replica cluster to an independent read-write cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. + * @param promoteRequest The parameter for enabling geo-redundant backup while promoting read replica. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void promoteReadReplica(String resourceGroupName, String clusterName, Context context); + void promoteReadReplica(String resourceGroupName, String clusterName, PromoteRequest promoteRequest, + Context context); /** * Checks availability of a cluster name. Cluster names should be globally unique; at least 3 characters and at most * 40 characters long; they must only contain lowercase letters, numbers, and hyphens; and must not start or end * with a hyphen. - * + * * @param nameAvailabilityRequest The required parameters for checking if cluster name is available. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -491,14 +497,14 @@ SyncPoller, Void> beginPromoteReadReplica( * @return represents cluster name availability along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response checkNameAvailabilityWithResponse( - NameAvailabilityRequest nameAvailabilityRequest, Context context); + Response checkNameAvailabilityWithResponse(NameAvailabilityRequest nameAvailabilityRequest, + Context context); /** * Checks availability of a cluster name. Cluster names should be globally unique; at least 3 characters and at most * 40 characters long; they must only contain lowercase letters, numbers, and hyphens; and must not start or end * with a hyphen. - * + * * @param nameAvailabilityRequest The required parameters for checking if cluster name is available. * @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/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/ConfigurationsClient.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/ConfigurationsClient.java index 61100fdfc3b7..9382cf8924d3 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/ConfigurationsClient.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/ConfigurationsClient.java @@ -14,11 +14,13 @@ import com.azure.resourcemanager.cosmosdbforpostgresql.fluent.models.ConfigurationInner; import com.azure.resourcemanager.cosmosdbforpostgresql.fluent.models.ServerConfigurationInner; -/** An instance of this class provides access to all the operations defined in ConfigurationsClient. */ +/** + * An instance of this class provides access to all the operations defined in ConfigurationsClient. + */ public interface ConfigurationsClient { /** * List all the configurations of a server in cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param serverName The name of the server. @@ -28,12 +30,12 @@ public interface ConfigurationsClient { * @return a list of server configurations as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByServer( - String resourceGroupName, String clusterName, String serverName); + PagedIterable listByServer(String resourceGroupName, String clusterName, + String serverName); /** * List all the configurations of a server in cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param serverName The name of the server. @@ -44,12 +46,12 @@ PagedIterable listByServer( * @return a list of server configurations as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByServer( - String resourceGroupName, String clusterName, String serverName, Context context); + PagedIterable listByServer(String resourceGroupName, String clusterName, + String serverName, Context context); /** * List all the configurations of a cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -62,7 +64,7 @@ PagedIterable listByServer( /** * List all the configurations of a cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param context The context to associate with this operation. @@ -76,7 +78,7 @@ PagedIterable listByServer( /** * Gets information of a configuration for coordinator and nodes. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param configurationName The name of the cluster configuration. @@ -87,12 +89,12 @@ PagedIterable listByServer( * @return information of a configuration for coordinator and nodes along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String clusterName, String configurationName, Context context); + Response getWithResponse(String resourceGroupName, String clusterName, String configurationName, + Context context); /** * Gets information of a configuration for coordinator and nodes. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param configurationName The name of the cluster configuration. @@ -106,7 +108,7 @@ Response getWithResponse( /** * Gets information of a configuration for coordinator. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param configurationName The name of the cluster configuration. @@ -117,12 +119,12 @@ Response getWithResponse( * @return information of a configuration for coordinator along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getCoordinatorWithResponse( - String resourceGroupName, String clusterName, String configurationName, Context context); + Response getCoordinatorWithResponse(String resourceGroupName, String clusterName, + String configurationName, Context context); /** * Gets information of a configuration for coordinator. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param configurationName The name of the cluster configuration. @@ -136,7 +138,7 @@ Response getCoordinatorWithResponse( /** * Updates configuration of coordinator in a cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param configurationName The name of the cluster configuration. @@ -152,7 +154,7 @@ SyncPoller, ServerConfigurationInner> begin /** * Updates configuration of coordinator in a cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param configurationName The name of the cluster configuration. @@ -165,15 +167,12 @@ SyncPoller, ServerConfigurationInner> begin */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ServerConfigurationInner> beginUpdateOnCoordinator( - String resourceGroupName, - String clusterName, - String configurationName, - ServerConfigurationInner parameters, + String resourceGroupName, String clusterName, String configurationName, ServerConfigurationInner parameters, Context context); /** * Updates configuration of coordinator in a cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param configurationName The name of the cluster configuration. @@ -184,12 +183,12 @@ SyncPoller, ServerConfigurationInner> begin * @return represents a configuration. */ @ServiceMethod(returns = ReturnType.SINGLE) - ServerConfigurationInner updateOnCoordinator( - String resourceGroupName, String clusterName, String configurationName, ServerConfigurationInner parameters); + ServerConfigurationInner updateOnCoordinator(String resourceGroupName, String clusterName, String configurationName, + ServerConfigurationInner parameters); /** * Updates configuration of coordinator in a cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param configurationName The name of the cluster configuration. @@ -201,16 +200,12 @@ ServerConfigurationInner updateOnCoordinator( * @return represents a configuration. */ @ServiceMethod(returns = ReturnType.SINGLE) - ServerConfigurationInner updateOnCoordinator( - String resourceGroupName, - String clusterName, - String configurationName, - ServerConfigurationInner parameters, - Context context); + ServerConfigurationInner updateOnCoordinator(String resourceGroupName, String clusterName, String configurationName, + ServerConfigurationInner parameters, Context context); /** * Gets information of a configuration for worker nodes. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param configurationName The name of the cluster configuration. @@ -221,12 +216,12 @@ ServerConfigurationInner updateOnCoordinator( * @return information of a configuration for worker nodes along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getNodeWithResponse( - String resourceGroupName, String clusterName, String configurationName, Context context); + Response getNodeWithResponse(String resourceGroupName, String clusterName, + String configurationName, Context context); /** * Gets information of a configuration for worker nodes. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param configurationName The name of the cluster configuration. @@ -240,7 +235,7 @@ Response getNodeWithResponse( /** * Updates configuration of worker nodes in a cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param configurationName The name of the cluster configuration. @@ -256,7 +251,7 @@ SyncPoller, ServerConfigurationInner> begin /** * Updates configuration of worker nodes in a cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param configurationName The name of the cluster configuration. @@ -269,15 +264,12 @@ SyncPoller, ServerConfigurationInner> begin */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ServerConfigurationInner> beginUpdateOnNode( - String resourceGroupName, - String clusterName, - String configurationName, - ServerConfigurationInner parameters, + String resourceGroupName, String clusterName, String configurationName, ServerConfigurationInner parameters, Context context); /** * Updates configuration of worker nodes in a cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param configurationName The name of the cluster configuration. @@ -288,12 +280,12 @@ SyncPoller, ServerConfigurationInner> begin * @return represents a configuration. */ @ServiceMethod(returns = ReturnType.SINGLE) - ServerConfigurationInner updateOnNode( - String resourceGroupName, String clusterName, String configurationName, ServerConfigurationInner parameters); + ServerConfigurationInner updateOnNode(String resourceGroupName, String clusterName, String configurationName, + ServerConfigurationInner parameters); /** * Updates configuration of worker nodes in a cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param configurationName The name of the cluster configuration. @@ -305,10 +297,6 @@ ServerConfigurationInner updateOnNode( * @return represents a configuration. */ @ServiceMethod(returns = ReturnType.SINGLE) - ServerConfigurationInner updateOnNode( - String resourceGroupName, - String clusterName, - String configurationName, - ServerConfigurationInner parameters, - Context context); + ServerConfigurationInner updateOnNode(String resourceGroupName, String clusterName, String configurationName, + ServerConfigurationInner parameters, Context context); } diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/CosmosDBForPostgreSql.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/CosmosDBForPostgreSql.java index a879f1f5c86f..389796e1efd1 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/CosmosDBForPostgreSql.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/CosmosDBForPostgreSql.java @@ -7,95 +7,97 @@ import com.azure.core.http.HttpPipeline; import java.time.Duration; -/** The interface for CosmosDBForPostgreSql class. */ +/** + * The interface for CosmosDBForPostgreSql class. + */ public interface CosmosDBForPostgreSql { /** * Gets The ID of the target subscription. The value must be an UUID. - * + * * @return the subscriptionId value. */ String getSubscriptionId(); /** * Gets server parameter. - * + * * @return the endpoint value. */ String getEndpoint(); /** * Gets Api Version. - * + * * @return the apiVersion value. */ String getApiVersion(); /** * Gets The HTTP pipeline to send requests through. - * + * * @return the httpPipeline value. */ HttpPipeline getHttpPipeline(); /** * Gets The default poll interval for long-running operation. - * + * * @return the defaultPollInterval value. */ Duration getDefaultPollInterval(); /** * Gets the ClustersClient object to access its operations. - * + * * @return the ClustersClient object. */ ClustersClient getClusters(); /** * Gets the ServersClient object to access its operations. - * + * * @return the ServersClient object. */ ServersClient getServers(); /** * Gets the ConfigurationsClient object to access its operations. - * + * * @return the ConfigurationsClient object. */ ConfigurationsClient getConfigurations(); /** * Gets the FirewallRulesClient object to access its operations. - * + * * @return the FirewallRulesClient object. */ FirewallRulesClient getFirewallRules(); /** * Gets the RolesClient object to access its operations. - * + * * @return the RolesClient object. */ RolesClient getRoles(); /** * Gets the OperationsClient object to access its operations. - * + * * @return the OperationsClient object. */ OperationsClient getOperations(); /** * Gets the PrivateEndpointConnectionsClient object to access its operations. - * + * * @return the PrivateEndpointConnectionsClient object. */ PrivateEndpointConnectionsClient getPrivateEndpointConnections(); /** * Gets the PrivateLinkResourcesClient object to access its operations. - * + * * @return the PrivateLinkResourcesClient object. */ PrivateLinkResourcesClient getPrivateLinkResources(); diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/FirewallRulesClient.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/FirewallRulesClient.java index e9de7d679aaf..791776360288 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/FirewallRulesClient.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/FirewallRulesClient.java @@ -13,11 +13,13 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.cosmosdbforpostgresql.fluent.models.FirewallRuleInner; -/** An instance of this class provides access to all the operations defined in FirewallRulesClient. */ +/** + * An instance of this class provides access to all the operations defined in FirewallRulesClient. + */ public interface FirewallRulesClient { /** * Creates a new cluster firewall rule or updates an existing cluster firewall rule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param firewallRuleName The name of the cluster firewall rule. @@ -28,12 +30,12 @@ public interface FirewallRulesClient { * @return the {@link SyncPoller} for polling of represents a cluster firewall rule. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, FirewallRuleInner> beginCreateOrUpdate( - String resourceGroupName, String clusterName, String firewallRuleName, FirewallRuleInner parameters); + SyncPoller, FirewallRuleInner> beginCreateOrUpdate(String resourceGroupName, + String clusterName, String firewallRuleName, FirewallRuleInner parameters); /** * Creates a new cluster firewall rule or updates an existing cluster firewall rule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param firewallRuleName The name of the cluster firewall rule. @@ -45,16 +47,12 @@ SyncPoller, FirewallRuleInner> beginCreateOrUpdate * @return the {@link SyncPoller} for polling of represents a cluster firewall rule. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, FirewallRuleInner> beginCreateOrUpdate( - String resourceGroupName, - String clusterName, - String firewallRuleName, - FirewallRuleInner parameters, - Context context); + SyncPoller, FirewallRuleInner> beginCreateOrUpdate(String resourceGroupName, + String clusterName, String firewallRuleName, FirewallRuleInner parameters, Context context); /** * Creates a new cluster firewall rule or updates an existing cluster firewall rule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param firewallRuleName The name of the cluster firewall rule. @@ -65,12 +63,12 @@ SyncPoller, FirewallRuleInner> beginCreateOrUpdate * @return represents a cluster firewall rule. */ @ServiceMethod(returns = ReturnType.SINGLE) - FirewallRuleInner createOrUpdate( - String resourceGroupName, String clusterName, String firewallRuleName, FirewallRuleInner parameters); + FirewallRuleInner createOrUpdate(String resourceGroupName, String clusterName, String firewallRuleName, + FirewallRuleInner parameters); /** * Creates a new cluster firewall rule or updates an existing cluster firewall rule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param firewallRuleName The name of the cluster firewall rule. @@ -82,16 +80,12 @@ FirewallRuleInner createOrUpdate( * @return represents a cluster firewall rule. */ @ServiceMethod(returns = ReturnType.SINGLE) - FirewallRuleInner createOrUpdate( - String resourceGroupName, - String clusterName, - String firewallRuleName, - FirewallRuleInner parameters, - Context context); + FirewallRuleInner createOrUpdate(String resourceGroupName, String clusterName, String firewallRuleName, + FirewallRuleInner parameters, Context context); /** * Deletes a cluster firewall rule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param firewallRuleName The name of the cluster firewall rule. @@ -101,12 +95,12 @@ FirewallRuleInner createOrUpdate( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String clusterName, String firewallRuleName); + SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, + String firewallRuleName); /** * Deletes a cluster firewall rule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param firewallRuleName The name of the cluster firewall rule. @@ -117,12 +111,12 @@ SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String clusterName, String firewallRuleName, Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, + String firewallRuleName, Context context); /** * Deletes a cluster firewall rule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param firewallRuleName The name of the cluster firewall rule. @@ -135,7 +129,7 @@ SyncPoller, Void> beginDelete( /** * Deletes a cluster firewall rule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param firewallRuleName The name of the cluster firewall rule. @@ -149,7 +143,7 @@ SyncPoller, Void> beginDelete( /** * Gets information about a cluster firewall rule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param firewallRuleName The name of the cluster firewall rule. @@ -160,12 +154,12 @@ SyncPoller, Void> beginDelete( * @return information about a cluster firewall rule along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String clusterName, String firewallRuleName, Context context); + Response getWithResponse(String resourceGroupName, String clusterName, String firewallRuleName, + Context context); /** * Gets information about a cluster firewall rule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param firewallRuleName The name of the cluster firewall rule. @@ -179,7 +173,7 @@ Response getWithResponse( /** * Lists all the firewall rules on cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -192,7 +186,7 @@ Response getWithResponse( /** * Lists all the firewall rules on cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param context The context to associate with this operation. diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/OperationsClient.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/OperationsClient.java index 102f95afee1f..a56b8ac543a0 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/OperationsClient.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/OperationsClient.java @@ -10,11 +10,13 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.cosmosdbforpostgresql.fluent.models.OperationInner; -/** An instance of this class provides access to all the operations defined in OperationsClient. */ +/** + * An instance of this class provides access to all the operations defined in OperationsClient. + */ public interface OperationsClient { /** * Lists all of the available REST API operations. - * + * * @throws com.azure.core.management.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 list of resource provider operations as paginated response with {@link PagedIterable}. @@ -24,7 +26,7 @@ public interface OperationsClient { /** * Lists all of the available REST API operations. - * + * * @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/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/PrivateEndpointConnectionsClient.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/PrivateEndpointConnectionsClient.java index 25de775f79cb..0a680045e803 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/PrivateEndpointConnectionsClient.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/PrivateEndpointConnectionsClient.java @@ -13,11 +13,13 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.cosmosdbforpostgresql.fluent.models.PrivateEndpointConnectionInner; -/** An instance of this class provides access to all the operations defined in PrivateEndpointConnectionsClient. */ +/** + * An instance of this class provides access to all the operations defined in PrivateEndpointConnectionsClient. + */ public interface PrivateEndpointConnectionsClient { /** * Gets list of private endpoint connections on a cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -30,7 +32,7 @@ public interface PrivateEndpointConnectionsClient { /** * Gets list of private endpoint connections on a cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param context The context to associate with this operation. @@ -40,12 +42,12 @@ public interface PrivateEndpointConnectionsClient { * @return list of private endpoint connections on a cluster as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByCluster( - String resourceGroupName, String clusterName, Context context); + PagedIterable listByCluster(String resourceGroupName, String clusterName, + Context context); /** * Gets private endpoint connection. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the cluster. @@ -56,12 +58,12 @@ PagedIterable listByCluster( * @return private endpoint connection along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String clusterName, String privateEndpointConnectionName, Context context); + Response getWithResponse(String resourceGroupName, String clusterName, + String privateEndpointConnectionName, Context context); /** * Gets private endpoint connection. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the cluster. @@ -71,12 +73,12 @@ Response getWithResponse( * @return private endpoint connection. */ @ServiceMethod(returns = ReturnType.SINGLE) - PrivateEndpointConnectionInner get( - String resourceGroupName, String clusterName, String privateEndpointConnectionName); + PrivateEndpointConnectionInner get(String resourceGroupName, String clusterName, + String privateEndpointConnectionName); /** * Approves or Rejects a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the cluster. @@ -88,14 +90,12 @@ PrivateEndpointConnectionInner get( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, PrivateEndpointConnectionInner> beginCreateOrUpdate( - String resourceGroupName, - String clusterName, - String privateEndpointConnectionName, + String resourceGroupName, String clusterName, String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters); /** * Approves or Rejects a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the cluster. @@ -108,15 +108,12 @@ SyncPoller, PrivateEndpointConnection */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, PrivateEndpointConnectionInner> beginCreateOrUpdate( - String resourceGroupName, - String clusterName, - String privateEndpointConnectionName, - PrivateEndpointConnectionInner parameters, - Context context); + String resourceGroupName, String clusterName, String privateEndpointConnectionName, + PrivateEndpointConnectionInner parameters, Context context); /** * Approves or Rejects a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the cluster. @@ -127,15 +124,12 @@ SyncPoller, PrivateEndpointConnection * @return the private endpoint connection resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - PrivateEndpointConnectionInner createOrUpdate( - String resourceGroupName, - String clusterName, - String privateEndpointConnectionName, - PrivateEndpointConnectionInner parameters); + PrivateEndpointConnectionInner createOrUpdate(String resourceGroupName, String clusterName, + String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters); /** * Approves or Rejects a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the cluster. @@ -147,16 +141,12 @@ PrivateEndpointConnectionInner createOrUpdate( * @return the private endpoint connection resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - PrivateEndpointConnectionInner createOrUpdate( - String resourceGroupName, - String clusterName, - String privateEndpointConnectionName, - PrivateEndpointConnectionInner parameters, - Context context); + PrivateEndpointConnectionInner createOrUpdate(String resourceGroupName, String clusterName, + String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters, Context context); /** * Deletes a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the cluster. @@ -166,12 +156,12 @@ PrivateEndpointConnectionInner createOrUpdate( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String clusterName, String privateEndpointConnectionName); + SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, + String privateEndpointConnectionName); /** * Deletes a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the cluster. @@ -182,12 +172,12 @@ SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String clusterName, String privateEndpointConnectionName, Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, + String privateEndpointConnectionName, Context context); /** * Deletes a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the cluster. @@ -200,7 +190,7 @@ SyncPoller, Void> beginDelete( /** * Deletes a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the cluster. diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/PrivateLinkResourcesClient.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/PrivateLinkResourcesClient.java index 233052a63481..bf025bf1132a 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/PrivateLinkResourcesClient.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/PrivateLinkResourcesClient.java @@ -11,11 +11,13 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.cosmosdbforpostgresql.fluent.models.PrivateLinkResourceInner; -/** An instance of this class provides access to all the operations defined in PrivateLinkResourcesClient. */ +/** + * An instance of this class provides access to all the operations defined in PrivateLinkResourcesClient. + */ public interface PrivateLinkResourcesClient { /** * Gets the private link resources for cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -28,7 +30,7 @@ public interface PrivateLinkResourcesClient { /** * Gets the private link resources for cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param context The context to associate with this operation. @@ -38,12 +40,12 @@ public interface PrivateLinkResourcesClient { * @return the private link resources for cluster as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByCluster( - String resourceGroupName, String clusterName, Context context); + PagedIterable listByCluster(String resourceGroupName, String clusterName, + Context context); /** * Gets a private link resource for cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param privateLinkResourceName The name of the private link resource. @@ -54,12 +56,12 @@ PagedIterable listByCluster( * @return a private link resource for cluster along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String clusterName, String privateLinkResourceName, Context context); + Response getWithResponse(String resourceGroupName, String clusterName, + String privateLinkResourceName, Context context); /** * Gets a private link resource for cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param privateLinkResourceName The name of the private link resource. diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/RolesClient.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/RolesClient.java index de639c8f6362..14fda54e9afd 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/RolesClient.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/RolesClient.java @@ -13,11 +13,13 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.cosmosdbforpostgresql.fluent.models.RoleInner; -/** An instance of this class provides access to all the operations defined in RolesClient. */ +/** + * An instance of this class provides access to all the operations defined in RolesClient. + */ public interface RolesClient { /** * Gets information about a cluster role. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param roleName The name of the cluster role. @@ -32,7 +34,7 @@ public interface RolesClient { /** * Gets information about a cluster role. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param roleName The name of the cluster role. @@ -46,7 +48,7 @@ public interface RolesClient { /** * Creates a new role or updates an existing role. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param roleName The name of the cluster role. @@ -57,12 +59,12 @@ public interface RolesClient { * @return the {@link SyncPoller} for polling of represents a cluster role. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, RoleInner> beginCreate( - String resourceGroupName, String clusterName, String roleName, RoleInner parameters); + SyncPoller, RoleInner> beginCreate(String resourceGroupName, String clusterName, + String roleName, RoleInner parameters); /** * Creates a new role or updates an existing role. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param roleName The name of the cluster role. @@ -74,12 +76,12 @@ SyncPoller, RoleInner> beginCreate( * @return the {@link SyncPoller} for polling of represents a cluster role. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, RoleInner> beginCreate( - String resourceGroupName, String clusterName, String roleName, RoleInner parameters, Context context); + SyncPoller, RoleInner> beginCreate(String resourceGroupName, String clusterName, + String roleName, RoleInner parameters, Context context); /** * Creates a new role or updates an existing role. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param roleName The name of the cluster role. @@ -94,7 +96,7 @@ SyncPoller, RoleInner> beginCreate( /** * Creates a new role or updates an existing role. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param roleName The name of the cluster role. @@ -106,12 +108,12 @@ SyncPoller, RoleInner> beginCreate( * @return represents a cluster role. */ @ServiceMethod(returns = ReturnType.SINGLE) - RoleInner create( - String resourceGroupName, String clusterName, String roleName, RoleInner parameters, Context context); + RoleInner create(String resourceGroupName, String clusterName, String roleName, RoleInner parameters, + Context context); /** * Deletes a cluster role. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param roleName The name of the cluster role. @@ -125,7 +127,7 @@ RoleInner create( /** * Deletes a cluster role. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param roleName The name of the cluster role. @@ -136,12 +138,12 @@ RoleInner create( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String clusterName, String roleName, Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, String roleName, + Context context); /** * Deletes a cluster role. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param roleName The name of the cluster role. @@ -154,7 +156,7 @@ SyncPoller, Void> beginDelete( /** * Deletes a cluster role. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param roleName The name of the cluster role. @@ -168,7 +170,7 @@ SyncPoller, Void> beginDelete( /** * List all the roles in a given cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -181,7 +183,7 @@ SyncPoller, Void> beginDelete( /** * List all the roles in a given cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param context The context to associate with this operation. diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/ServersClient.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/ServersClient.java index 7a4a96fdc9a2..42d27f49b4f7 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/ServersClient.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/ServersClient.java @@ -11,11 +11,13 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.cosmosdbforpostgresql.fluent.models.ClusterServerInner; -/** An instance of this class provides access to all the operations defined in ServersClient. */ +/** + * An instance of this class provides access to all the operations defined in ServersClient. + */ public interface ServersClient { /** * Lists servers of a cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -28,7 +30,7 @@ public interface ServersClient { /** * Lists servers of a cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param context The context to associate with this operation. @@ -42,7 +44,7 @@ public interface ServersClient { /** * Gets information about a server in cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param serverName The name of the server. @@ -53,12 +55,12 @@ public interface ServersClient { * @return information about a server in cluster along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String clusterName, String serverName, Context context); + Response getWithResponse(String resourceGroupName, String clusterName, String serverName, + Context context); /** * Gets information about a server in cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param serverName The name of the server. diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/models/ClusterInner.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/models/ClusterInner.java index 798a7869f1cd..7fc9612e4c22 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/models/ClusterInner.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/models/ClusterInner.java @@ -7,6 +7,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.Resource; import com.azure.core.management.SystemData; +import com.azure.resourcemanager.cosmosdbforpostgresql.models.AuthConfig; import com.azure.resourcemanager.cosmosdbforpostgresql.models.MaintenanceWindow; import com.azure.resourcemanager.cosmosdbforpostgresql.models.ServerNameItem; import com.azure.resourcemanager.cosmosdbforpostgresql.models.SimplePrivateEndpointConnection; @@ -15,7 +16,9 @@ import java.util.List; import java.util.Map; -/** Represents a cluster. */ +/** + * Represents a cluster. + */ @Fluent public final class ClusterInner extends Resource { /* @@ -30,13 +33,15 @@ public final class ClusterInner extends Resource { @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; - /** Creates an instance of ClusterInner class. */ + /** + * Creates an instance of ClusterInner class. + */ public ClusterInner() { } /** * Get the innerProperties property: Properties of the cluster. - * + * * @return the innerProperties value. */ private ClusterProperties innerProperties() { @@ -45,21 +50,25 @@ private ClusterProperties innerProperties() { /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * + * * @return the systemData value. */ public SystemData systemData() { return this.systemData; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ClusterInner withLocation(String location) { super.withLocation(location); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ClusterInner withTags(Map tags) { super.withTags(tags); @@ -68,7 +77,7 @@ public ClusterInner withTags(Map tags) { /** * Get the administratorLogin property: The administrator's login name of the servers in the cluster. - * + * * @return the administratorLogin value. */ public String administratorLogin() { @@ -77,7 +86,7 @@ public String administratorLogin() { /** * Get the administratorLoginPassword property: The password of the administrator login. Required for creation. - * + * * @return the administratorLoginPassword value. */ public String administratorLoginPassword() { @@ -86,7 +95,7 @@ public String administratorLoginPassword() { /** * Set the administratorLoginPassword property: The password of the administrator login. Required for creation. - * + * * @param administratorLoginPassword the administratorLoginPassword value to set. * @return the ClusterInner object itself. */ @@ -100,7 +109,7 @@ public ClusterInner withAdministratorLoginPassword(String administratorLoginPass /** * Get the provisioningState property: Provisioning state of the cluster. - * + * * @return the provisioningState value. */ public String provisioningState() { @@ -109,7 +118,7 @@ public String provisioningState() { /** * Get the state property: A state of a cluster/server that is visible to user. - * + * * @return the state value. */ public String state() { @@ -118,7 +127,7 @@ public String state() { /** * Get the postgresqlVersion property: The major PostgreSQL version on all cluster servers. - * + * * @return the postgresqlVersion value. */ public String postgresqlVersion() { @@ -127,7 +136,7 @@ public String postgresqlVersion() { /** * Set the postgresqlVersion property: The major PostgreSQL version on all cluster servers. - * + * * @param postgresqlVersion the postgresqlVersion value to set. * @return the ClusterInner object itself. */ @@ -141,7 +150,7 @@ public ClusterInner withPostgresqlVersion(String postgresqlVersion) { /** * Get the citusVersion property: The Citus extension version on all cluster servers. - * + * * @return the citusVersion value. */ public String citusVersion() { @@ -150,7 +159,7 @@ public String citusVersion() { /** * Set the citusVersion property: The Citus extension version on all cluster servers. - * + * * @param citusVersion the citusVersion value to set. * @return the ClusterInner object itself. */ @@ -164,7 +173,7 @@ public ClusterInner withCitusVersion(String citusVersion) { /** * Get the maintenanceWindow property: Maintenance window of a cluster. - * + * * @return the maintenanceWindow value. */ public MaintenanceWindow maintenanceWindow() { @@ -173,7 +182,7 @@ public MaintenanceWindow maintenanceWindow() { /** * Set the maintenanceWindow property: Maintenance window of a cluster. - * + * * @param maintenanceWindow the maintenanceWindow value to set. * @return the ClusterInner object itself. */ @@ -187,7 +196,7 @@ public ClusterInner withMaintenanceWindow(MaintenanceWindow maintenanceWindow) { /** * Get the preferredPrimaryZone property: Preferred primary availability zone (AZ) for all cluster servers. - * + * * @return the preferredPrimaryZone value. */ public String preferredPrimaryZone() { @@ -196,7 +205,7 @@ public String preferredPrimaryZone() { /** * Set the preferredPrimaryZone property: Preferred primary availability zone (AZ) for all cluster servers. - * + * * @param preferredPrimaryZone the preferredPrimaryZone value to set. * @return the ClusterInner object itself. */ @@ -209,9 +218,9 @@ public ClusterInner withPreferredPrimaryZone(String preferredPrimaryZone) { } /** - * Get the enableShardsOnCoordinator property: If distributed tables are placed on coordinator or not. Should be set - * to 'true' on single node clusters. Requires shard rebalancing after value is changed. - * + * Get the enableShardsOnCoordinator property: If distributed tables are placed on coordinator or not. Should be + * set to 'true' on single node clusters. Requires shard rebalancing after value is changed. + * * @return the enableShardsOnCoordinator value. */ public Boolean enableShardsOnCoordinator() { @@ -219,9 +228,9 @@ public Boolean enableShardsOnCoordinator() { } /** - * Set the enableShardsOnCoordinator property: If distributed tables are placed on coordinator or not. Should be set - * to 'true' on single node clusters. Requires shard rebalancing after value is changed. - * + * Set the enableShardsOnCoordinator property: If distributed tables are placed on coordinator or not. Should be + * set to 'true' on single node clusters. Requires shard rebalancing after value is changed. + * * @param enableShardsOnCoordinator the enableShardsOnCoordinator value to set. * @return the ClusterInner object itself. */ @@ -235,7 +244,7 @@ public ClusterInner withEnableShardsOnCoordinator(Boolean enableShardsOnCoordina /** * Get the enableHa property: If high availability (HA) is enabled or not for the cluster. - * + * * @return the enableHa value. */ public Boolean enableHa() { @@ -244,7 +253,7 @@ public Boolean enableHa() { /** * Set the enableHa property: If high availability (HA) is enabled or not for the cluster. - * + * * @param enableHa the enableHa value to set. * @return the ClusterInner object itself. */ @@ -259,7 +268,7 @@ public ClusterInner withEnableHa(Boolean enableHa) { /** * Get the coordinatorServerEdition property: The edition of a coordinator server (default: GeneralPurpose). * Required for creation. - * + * * @return the coordinatorServerEdition value. */ public String coordinatorServerEdition() { @@ -269,7 +278,7 @@ public String coordinatorServerEdition() { /** * Set the coordinatorServerEdition property: The edition of a coordinator server (default: GeneralPurpose). * Required for creation. - * + * * @param coordinatorServerEdition the coordinatorServerEdition value to set. * @return the ClusterInner object itself. */ @@ -284,7 +293,7 @@ public ClusterInner withCoordinatorServerEdition(String coordinatorServerEdition /** * Get the coordinatorStorageQuotaInMb property: The storage of a server in MB. Required for creation. See * https://learn.microsoft.com/azure/cosmos-db/postgresql/resources-compute for more information. - * + * * @return the coordinatorStorageQuotaInMb value. */ public Integer coordinatorStorageQuotaInMb() { @@ -294,7 +303,7 @@ public Integer coordinatorStorageQuotaInMb() { /** * Set the coordinatorStorageQuotaInMb property: The storage of a server in MB. Required for creation. See * https://learn.microsoft.com/azure/cosmos-db/postgresql/resources-compute for more information. - * + * * @param coordinatorStorageQuotaInMb the coordinatorStorageQuotaInMb value to set. * @return the ClusterInner object itself. */ @@ -309,7 +318,7 @@ public ClusterInner withCoordinatorStorageQuotaInMb(Integer coordinatorStorageQu /** * Get the coordinatorVCores property: The vCores count of a server (max: 96). Required for creation. See * https://learn.microsoft.com/azure/cosmos-db/postgresql/resources-compute for more information. - * + * * @return the coordinatorVCores value. */ public Integer coordinatorVCores() { @@ -319,7 +328,7 @@ public Integer coordinatorVCores() { /** * Set the coordinatorVCores property: The vCores count of a server (max: 96). Required for creation. See * https://learn.microsoft.com/azure/cosmos-db/postgresql/resources-compute for more information. - * + * * @param coordinatorVCores the coordinatorVCores value to set. * @return the ClusterInner object itself. */ @@ -333,7 +342,7 @@ public ClusterInner withCoordinatorVCores(Integer coordinatorVCores) { /** * Get the coordinatorEnablePublicIpAccess property: If public access is enabled on coordinator. - * + * * @return the coordinatorEnablePublicIpAccess value. */ public Boolean coordinatorEnablePublicIpAccess() { @@ -342,7 +351,7 @@ public Boolean coordinatorEnablePublicIpAccess() { /** * Set the coordinatorEnablePublicIpAccess property: If public access is enabled on coordinator. - * + * * @param coordinatorEnablePublicIpAccess the coordinatorEnablePublicIpAccess value to set. * @return the ClusterInner object itself. */ @@ -356,7 +365,7 @@ public ClusterInner withCoordinatorEnablePublicIpAccess(Boolean coordinatorEnabl /** * Get the nodeServerEdition property: The edition of a node server (default: MemoryOptimized). - * + * * @return the nodeServerEdition value. */ public String nodeServerEdition() { @@ -365,7 +374,7 @@ public String nodeServerEdition() { /** * Set the nodeServerEdition property: The edition of a node server (default: MemoryOptimized). - * + * * @param nodeServerEdition the nodeServerEdition value to set. * @return the ClusterInner object itself. */ @@ -381,7 +390,7 @@ public ClusterInner withNodeServerEdition(String nodeServerEdition) { * Get the nodeCount property: Worker node count of the cluster. When node count is 0, it represents a single node * configuration with the ability to create distributed tables on that node. 2 or more worker nodes represent * multi-node configuration. Node count value cannot be 1. Required for creation. - * + * * @return the nodeCount value. */ public Integer nodeCount() { @@ -392,7 +401,7 @@ public Integer nodeCount() { * Set the nodeCount property: Worker node count of the cluster. When node count is 0, it represents a single node * configuration with the ability to create distributed tables on that node. 2 or more worker nodes represent * multi-node configuration. Node count value cannot be 1. Required for creation. - * + * * @param nodeCount the nodeCount value to set. * @return the ClusterInner object itself. */ @@ -407,7 +416,7 @@ public ClusterInner withNodeCount(Integer nodeCount) { /** * Get the nodeStorageQuotaInMb property: The storage in MB on each worker node. See * https://learn.microsoft.com/azure/cosmos-db/postgresql/resources-compute for more information. - * + * * @return the nodeStorageQuotaInMb value. */ public Integer nodeStorageQuotaInMb() { @@ -417,7 +426,7 @@ public Integer nodeStorageQuotaInMb() { /** * Set the nodeStorageQuotaInMb property: The storage in MB on each worker node. See * https://learn.microsoft.com/azure/cosmos-db/postgresql/resources-compute for more information. - * + * * @param nodeStorageQuotaInMb the nodeStorageQuotaInMb value to set. * @return the ClusterInner object itself. */ @@ -432,7 +441,7 @@ public ClusterInner withNodeStorageQuotaInMb(Integer nodeStorageQuotaInMb) { /** * Get the nodeVCores property: The compute in vCores on each worker node (max: 104). See * https://learn.microsoft.com/azure/cosmos-db/postgresql/resources-compute for more information. - * + * * @return the nodeVCores value. */ public Integer nodeVCores() { @@ -442,7 +451,7 @@ public Integer nodeVCores() { /** * Set the nodeVCores property: The compute in vCores on each worker node (max: 104). See * https://learn.microsoft.com/azure/cosmos-db/postgresql/resources-compute for more information. - * + * * @param nodeVCores the nodeVCores value to set. * @return the ClusterInner object itself. */ @@ -456,7 +465,7 @@ public ClusterInner withNodeVCores(Integer nodeVCores) { /** * Get the nodeEnablePublicIpAccess property: If public access is enabled on worker nodes. - * + * * @return the nodeEnablePublicIpAccess value. */ public Boolean nodeEnablePublicIpAccess() { @@ -465,7 +474,7 @@ public Boolean nodeEnablePublicIpAccess() { /** * Set the nodeEnablePublicIpAccess property: If public access is enabled on worker nodes. - * + * * @param nodeEnablePublicIpAccess the nodeEnablePublicIpAccess value to set. * @return the ClusterInner object itself. */ @@ -479,7 +488,7 @@ public ClusterInner withNodeEnablePublicIpAccess(Boolean nodeEnablePublicIpAcces /** * Get the serverNames property: The list of server names in the cluster. - * + * * @return the serverNames value. */ public List serverNames() { @@ -488,7 +497,7 @@ public List serverNames() { /** * Get the sourceResourceId property: The resource id of source cluster for read replica clusters. - * + * * @return the sourceResourceId value. */ public String sourceResourceId() { @@ -497,7 +506,7 @@ public String sourceResourceId() { /** * Set the sourceResourceId property: The resource id of source cluster for read replica clusters. - * + * * @param sourceResourceId the sourceResourceId value to set. * @return the ClusterInner object itself. */ @@ -511,7 +520,7 @@ public ClusterInner withSourceResourceId(String sourceResourceId) { /** * Get the sourceLocation property: The Azure region of source cluster for read replica clusters. - * + * * @return the sourceLocation value. */ public String sourceLocation() { @@ -520,7 +529,7 @@ public String sourceLocation() { /** * Set the sourceLocation property: The Azure region of source cluster for read replica clusters. - * + * * @param sourceLocation the sourceLocation value to set. * @return the ClusterInner object itself. */ @@ -534,7 +543,7 @@ public ClusterInner withSourceLocation(String sourceLocation) { /** * Get the pointInTimeUtc property: Date and time in UTC (ISO8601 format) for cluster restore. - * + * * @return the pointInTimeUtc value. */ public OffsetDateTime pointInTimeUtc() { @@ -543,7 +552,7 @@ public OffsetDateTime pointInTimeUtc() { /** * Set the pointInTimeUtc property: Date and time in UTC (ISO8601 format) for cluster restore. - * + * * @param pointInTimeUtc the pointInTimeUtc value to set. * @return the ClusterInner object itself. */ @@ -557,7 +566,7 @@ public ClusterInner withPointInTimeUtc(OffsetDateTime pointInTimeUtc) { /** * Get the readReplicas property: The array of read replica clusters. - * + * * @return the readReplicas value. */ public List readReplicas() { @@ -566,7 +575,7 @@ public List readReplicas() { /** * Get the earliestRestoreTime property: The earliest restore point time (ISO8601 format) for the cluster. - * + * * @return the earliestRestoreTime value. */ public OffsetDateTime earliestRestoreTime() { @@ -575,16 +584,87 @@ public OffsetDateTime earliestRestoreTime() { /** * Get the privateEndpointConnections property: The private endpoint connections for a cluster. - * + * * @return the privateEndpointConnections value. */ public List privateEndpointConnections() { return this.innerProperties() == null ? null : this.innerProperties().privateEndpointConnections(); } + /** + * Get the databaseName property: The database name of the cluster. Only one database per cluster is supported. + * + * @return the databaseName value. + */ + public String databaseName() { + return this.innerProperties() == null ? null : this.innerProperties().databaseName(); + } + + /** + * Set the databaseName property: The database name of the cluster. Only one database per cluster is supported. + * + * @param databaseName the databaseName value to set. + * @return the ClusterInner object itself. + */ + public ClusterInner withDatabaseName(String databaseName) { + if (this.innerProperties() == null) { + this.innerProperties = new ClusterProperties(); + } + this.innerProperties().withDatabaseName(databaseName); + return this; + } + + /** + * Get the enableGeoBackup property: If cluster backup is stored in another Azure region in addition to the copy of + * the backup stored in the cluster's region. Enabled only at the time of cluster creation. + * + * @return the enableGeoBackup value. + */ + public Boolean enableGeoBackup() { + return this.innerProperties() == null ? null : this.innerProperties().enableGeoBackup(); + } + + /** + * Set the enableGeoBackup property: If cluster backup is stored in another Azure region in addition to the copy of + * the backup stored in the cluster's region. Enabled only at the time of cluster creation. + * + * @param enableGeoBackup the enableGeoBackup value to set. + * @return the ClusterInner object itself. + */ + public ClusterInner withEnableGeoBackup(Boolean enableGeoBackup) { + if (this.innerProperties() == null) { + this.innerProperties = new ClusterProperties(); + } + this.innerProperties().withEnableGeoBackup(enableGeoBackup); + return this; + } + + /** + * Get the authConfig property: Authentication configuration of a cluster. + * + * @return the authConfig value. + */ + public AuthConfig authConfig() { + return this.innerProperties() == null ? null : this.innerProperties().authConfig(); + } + + /** + * Set the authConfig property: Authentication configuration of a cluster. + * + * @param authConfig the authConfig value to set. + * @return the ClusterInner object itself. + */ + public ClusterInner withAuthConfig(AuthConfig authConfig) { + if (this.innerProperties() == null) { + this.innerProperties = new ClusterProperties(); + } + this.innerProperties().withAuthConfig(authConfig); + return this; + } + /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/models/ClusterProperties.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/models/ClusterProperties.java index 22d77a68f0f4..6955296cfb4b 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/models/ClusterProperties.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/models/ClusterProperties.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.cosmosdbforpostgresql.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.cosmosdbforpostgresql.models.AuthConfig; import com.azure.resourcemanager.cosmosdbforpostgresql.models.MaintenanceWindow; import com.azure.resourcemanager.cosmosdbforpostgresql.models.ServerNameItem; import com.azure.resourcemanager.cosmosdbforpostgresql.models.SimplePrivateEndpointConnection; @@ -12,7 +13,9 @@ import java.time.OffsetDateTime; import java.util.List; -/** Properties of the cluster. */ +/** + * Properties of the cluster. + */ @Fluent public final class ClusterProperties { /* @@ -178,13 +181,34 @@ public final class ClusterProperties { @JsonProperty(value = "privateEndpointConnections", access = JsonProperty.Access.WRITE_ONLY) private List privateEndpointConnections; - /** Creates an instance of ClusterProperties class. */ + /* + * The database name of the cluster. Only one database per cluster is supported. + */ + @JsonProperty(value = "databaseName") + private String databaseName; + + /* + * If cluster backup is stored in another Azure region in addition to the copy of the backup stored in the + * cluster's region. Enabled only at the time of cluster creation. + */ + @JsonProperty(value = "enableGeoBackup") + private Boolean enableGeoBackup; + + /* + * Authentication configuration of a cluster. + */ + @JsonProperty(value = "authConfig") + private AuthConfig authConfig; + + /** + * Creates an instance of ClusterProperties class. + */ public ClusterProperties() { } /** * Get the administratorLogin property: The administrator's login name of the servers in the cluster. - * + * * @return the administratorLogin value. */ public String administratorLogin() { @@ -193,7 +217,7 @@ public String administratorLogin() { /** * Get the administratorLoginPassword property: The password of the administrator login. Required for creation. - * + * * @return the administratorLoginPassword value. */ public String administratorLoginPassword() { @@ -202,7 +226,7 @@ public String administratorLoginPassword() { /** * Set the administratorLoginPassword property: The password of the administrator login. Required for creation. - * + * * @param administratorLoginPassword the administratorLoginPassword value to set. * @return the ClusterProperties object itself. */ @@ -213,7 +237,7 @@ public ClusterProperties withAdministratorLoginPassword(String administratorLogi /** * Get the provisioningState property: Provisioning state of the cluster. - * + * * @return the provisioningState value. */ public String provisioningState() { @@ -222,7 +246,7 @@ public String provisioningState() { /** * Get the state property: A state of a cluster/server that is visible to user. - * + * * @return the state value. */ public String state() { @@ -231,7 +255,7 @@ public String state() { /** * Get the postgresqlVersion property: The major PostgreSQL version on all cluster servers. - * + * * @return the postgresqlVersion value. */ public String postgresqlVersion() { @@ -240,7 +264,7 @@ public String postgresqlVersion() { /** * Set the postgresqlVersion property: The major PostgreSQL version on all cluster servers. - * + * * @param postgresqlVersion the postgresqlVersion value to set. * @return the ClusterProperties object itself. */ @@ -251,7 +275,7 @@ public ClusterProperties withPostgresqlVersion(String postgresqlVersion) { /** * Get the citusVersion property: The Citus extension version on all cluster servers. - * + * * @return the citusVersion value. */ public String citusVersion() { @@ -260,7 +284,7 @@ public String citusVersion() { /** * Set the citusVersion property: The Citus extension version on all cluster servers. - * + * * @param citusVersion the citusVersion value to set. * @return the ClusterProperties object itself. */ @@ -271,7 +295,7 @@ public ClusterProperties withCitusVersion(String citusVersion) { /** * Get the maintenanceWindow property: Maintenance window of a cluster. - * + * * @return the maintenanceWindow value. */ public MaintenanceWindow maintenanceWindow() { @@ -280,7 +304,7 @@ public MaintenanceWindow maintenanceWindow() { /** * Set the maintenanceWindow property: Maintenance window of a cluster. - * + * * @param maintenanceWindow the maintenanceWindow value to set. * @return the ClusterProperties object itself. */ @@ -291,7 +315,7 @@ public ClusterProperties withMaintenanceWindow(MaintenanceWindow maintenanceWind /** * Get the preferredPrimaryZone property: Preferred primary availability zone (AZ) for all cluster servers. - * + * * @return the preferredPrimaryZone value. */ public String preferredPrimaryZone() { @@ -300,7 +324,7 @@ public String preferredPrimaryZone() { /** * Set the preferredPrimaryZone property: Preferred primary availability zone (AZ) for all cluster servers. - * + * * @param preferredPrimaryZone the preferredPrimaryZone value to set. * @return the ClusterProperties object itself. */ @@ -310,9 +334,9 @@ public ClusterProperties withPreferredPrimaryZone(String preferredPrimaryZone) { } /** - * Get the enableShardsOnCoordinator property: If distributed tables are placed on coordinator or not. Should be set - * to 'true' on single node clusters. Requires shard rebalancing after value is changed. - * + * Get the enableShardsOnCoordinator property: If distributed tables are placed on coordinator or not. Should be + * set to 'true' on single node clusters. Requires shard rebalancing after value is changed. + * * @return the enableShardsOnCoordinator value. */ public Boolean enableShardsOnCoordinator() { @@ -320,9 +344,9 @@ public Boolean enableShardsOnCoordinator() { } /** - * Set the enableShardsOnCoordinator property: If distributed tables are placed on coordinator or not. Should be set - * to 'true' on single node clusters. Requires shard rebalancing after value is changed. - * + * Set the enableShardsOnCoordinator property: If distributed tables are placed on coordinator or not. Should be + * set to 'true' on single node clusters. Requires shard rebalancing after value is changed. + * * @param enableShardsOnCoordinator the enableShardsOnCoordinator value to set. * @return the ClusterProperties object itself. */ @@ -333,7 +357,7 @@ public ClusterProperties withEnableShardsOnCoordinator(Boolean enableShardsOnCoo /** * Get the enableHa property: If high availability (HA) is enabled or not for the cluster. - * + * * @return the enableHa value. */ public Boolean enableHa() { @@ -342,7 +366,7 @@ public Boolean enableHa() { /** * Set the enableHa property: If high availability (HA) is enabled or not for the cluster. - * + * * @param enableHa the enableHa value to set. * @return the ClusterProperties object itself. */ @@ -354,7 +378,7 @@ public ClusterProperties withEnableHa(Boolean enableHa) { /** * Get the coordinatorServerEdition property: The edition of a coordinator server (default: GeneralPurpose). * Required for creation. - * + * * @return the coordinatorServerEdition value. */ public String coordinatorServerEdition() { @@ -364,7 +388,7 @@ public String coordinatorServerEdition() { /** * Set the coordinatorServerEdition property: The edition of a coordinator server (default: GeneralPurpose). * Required for creation. - * + * * @param coordinatorServerEdition the coordinatorServerEdition value to set. * @return the ClusterProperties object itself. */ @@ -376,7 +400,7 @@ public ClusterProperties withCoordinatorServerEdition(String coordinatorServerEd /** * Get the coordinatorStorageQuotaInMb property: The storage of a server in MB. Required for creation. See * https://learn.microsoft.com/azure/cosmos-db/postgresql/resources-compute for more information. - * + * * @return the coordinatorStorageQuotaInMb value. */ public Integer coordinatorStorageQuotaInMb() { @@ -386,7 +410,7 @@ public Integer coordinatorStorageQuotaInMb() { /** * Set the coordinatorStorageQuotaInMb property: The storage of a server in MB. Required for creation. See * https://learn.microsoft.com/azure/cosmos-db/postgresql/resources-compute for more information. - * + * * @param coordinatorStorageQuotaInMb the coordinatorStorageQuotaInMb value to set. * @return the ClusterProperties object itself. */ @@ -398,7 +422,7 @@ public ClusterProperties withCoordinatorStorageQuotaInMb(Integer coordinatorStor /** * Get the coordinatorVCores property: The vCores count of a server (max: 96). Required for creation. See * https://learn.microsoft.com/azure/cosmos-db/postgresql/resources-compute for more information. - * + * * @return the coordinatorVCores value. */ public Integer coordinatorVCores() { @@ -408,7 +432,7 @@ public Integer coordinatorVCores() { /** * Set the coordinatorVCores property: The vCores count of a server (max: 96). Required for creation. See * https://learn.microsoft.com/azure/cosmos-db/postgresql/resources-compute for more information. - * + * * @param coordinatorVCores the coordinatorVCores value to set. * @return the ClusterProperties object itself. */ @@ -419,7 +443,7 @@ public ClusterProperties withCoordinatorVCores(Integer coordinatorVCores) { /** * Get the coordinatorEnablePublicIpAccess property: If public access is enabled on coordinator. - * + * * @return the coordinatorEnablePublicIpAccess value. */ public Boolean coordinatorEnablePublicIpAccess() { @@ -428,7 +452,7 @@ public Boolean coordinatorEnablePublicIpAccess() { /** * Set the coordinatorEnablePublicIpAccess property: If public access is enabled on coordinator. - * + * * @param coordinatorEnablePublicIpAccess the coordinatorEnablePublicIpAccess value to set. * @return the ClusterProperties object itself. */ @@ -439,7 +463,7 @@ public ClusterProperties withCoordinatorEnablePublicIpAccess(Boolean coordinator /** * Get the nodeServerEdition property: The edition of a node server (default: MemoryOptimized). - * + * * @return the nodeServerEdition value. */ public String nodeServerEdition() { @@ -448,7 +472,7 @@ public String nodeServerEdition() { /** * Set the nodeServerEdition property: The edition of a node server (default: MemoryOptimized). - * + * * @param nodeServerEdition the nodeServerEdition value to set. * @return the ClusterProperties object itself. */ @@ -461,7 +485,7 @@ public ClusterProperties withNodeServerEdition(String nodeServerEdition) { * Get the nodeCount property: Worker node count of the cluster. When node count is 0, it represents a single node * configuration with the ability to create distributed tables on that node. 2 or more worker nodes represent * multi-node configuration. Node count value cannot be 1. Required for creation. - * + * * @return the nodeCount value. */ public Integer nodeCount() { @@ -472,7 +496,7 @@ public Integer nodeCount() { * Set the nodeCount property: Worker node count of the cluster. When node count is 0, it represents a single node * configuration with the ability to create distributed tables on that node. 2 or more worker nodes represent * multi-node configuration. Node count value cannot be 1. Required for creation. - * + * * @param nodeCount the nodeCount value to set. * @return the ClusterProperties object itself. */ @@ -484,7 +508,7 @@ public ClusterProperties withNodeCount(Integer nodeCount) { /** * Get the nodeStorageQuotaInMb property: The storage in MB on each worker node. See * https://learn.microsoft.com/azure/cosmos-db/postgresql/resources-compute for more information. - * + * * @return the nodeStorageQuotaInMb value. */ public Integer nodeStorageQuotaInMb() { @@ -494,7 +518,7 @@ public Integer nodeStorageQuotaInMb() { /** * Set the nodeStorageQuotaInMb property: The storage in MB on each worker node. See * https://learn.microsoft.com/azure/cosmos-db/postgresql/resources-compute for more information. - * + * * @param nodeStorageQuotaInMb the nodeStorageQuotaInMb value to set. * @return the ClusterProperties object itself. */ @@ -506,7 +530,7 @@ public ClusterProperties withNodeStorageQuotaInMb(Integer nodeStorageQuotaInMb) /** * Get the nodeVCores property: The compute in vCores on each worker node (max: 104). See * https://learn.microsoft.com/azure/cosmos-db/postgresql/resources-compute for more information. - * + * * @return the nodeVCores value. */ public Integer nodeVCores() { @@ -516,7 +540,7 @@ public Integer nodeVCores() { /** * Set the nodeVCores property: The compute in vCores on each worker node (max: 104). See * https://learn.microsoft.com/azure/cosmos-db/postgresql/resources-compute for more information. - * + * * @param nodeVCores the nodeVCores value to set. * @return the ClusterProperties object itself. */ @@ -527,7 +551,7 @@ public ClusterProperties withNodeVCores(Integer nodeVCores) { /** * Get the nodeEnablePublicIpAccess property: If public access is enabled on worker nodes. - * + * * @return the nodeEnablePublicIpAccess value. */ public Boolean nodeEnablePublicIpAccess() { @@ -536,7 +560,7 @@ public Boolean nodeEnablePublicIpAccess() { /** * Set the nodeEnablePublicIpAccess property: If public access is enabled on worker nodes. - * + * * @param nodeEnablePublicIpAccess the nodeEnablePublicIpAccess value to set. * @return the ClusterProperties object itself. */ @@ -547,7 +571,7 @@ public ClusterProperties withNodeEnablePublicIpAccess(Boolean nodeEnablePublicIp /** * Get the serverNames property: The list of server names in the cluster. - * + * * @return the serverNames value. */ public List serverNames() { @@ -556,7 +580,7 @@ public List serverNames() { /** * Get the sourceResourceId property: The resource id of source cluster for read replica clusters. - * + * * @return the sourceResourceId value. */ public String sourceResourceId() { @@ -565,7 +589,7 @@ public String sourceResourceId() { /** * Set the sourceResourceId property: The resource id of source cluster for read replica clusters. - * + * * @param sourceResourceId the sourceResourceId value to set. * @return the ClusterProperties object itself. */ @@ -576,7 +600,7 @@ public ClusterProperties withSourceResourceId(String sourceResourceId) { /** * Get the sourceLocation property: The Azure region of source cluster for read replica clusters. - * + * * @return the sourceLocation value. */ public String sourceLocation() { @@ -585,7 +609,7 @@ public String sourceLocation() { /** * Set the sourceLocation property: The Azure region of source cluster for read replica clusters. - * + * * @param sourceLocation the sourceLocation value to set. * @return the ClusterProperties object itself. */ @@ -596,7 +620,7 @@ public ClusterProperties withSourceLocation(String sourceLocation) { /** * Get the pointInTimeUtc property: Date and time in UTC (ISO8601 format) for cluster restore. - * + * * @return the pointInTimeUtc value. */ public OffsetDateTime pointInTimeUtc() { @@ -605,7 +629,7 @@ public OffsetDateTime pointInTimeUtc() { /** * Set the pointInTimeUtc property: Date and time in UTC (ISO8601 format) for cluster restore. - * + * * @param pointInTimeUtc the pointInTimeUtc value to set. * @return the ClusterProperties object itself. */ @@ -616,7 +640,7 @@ public ClusterProperties withPointInTimeUtc(OffsetDateTime pointInTimeUtc) { /** * Get the readReplicas property: The array of read replica clusters. - * + * * @return the readReplicas value. */ public List readReplicas() { @@ -625,7 +649,7 @@ public List readReplicas() { /** * Get the earliestRestoreTime property: The earliest restore point time (ISO8601 format) for the cluster. - * + * * @return the earliestRestoreTime value. */ public OffsetDateTime earliestRestoreTime() { @@ -634,16 +658,78 @@ public OffsetDateTime earliestRestoreTime() { /** * Get the privateEndpointConnections property: The private endpoint connections for a cluster. - * + * * @return the privateEndpointConnections value. */ public List privateEndpointConnections() { return this.privateEndpointConnections; } + /** + * Get the databaseName property: The database name of the cluster. Only one database per cluster is supported. + * + * @return the databaseName value. + */ + public String databaseName() { + return this.databaseName; + } + + /** + * Set the databaseName property: The database name of the cluster. Only one database per cluster is supported. + * + * @param databaseName the databaseName value to set. + * @return the ClusterProperties object itself. + */ + public ClusterProperties withDatabaseName(String databaseName) { + this.databaseName = databaseName; + return this; + } + + /** + * Get the enableGeoBackup property: If cluster backup is stored in another Azure region in addition to the copy of + * the backup stored in the cluster's region. Enabled only at the time of cluster creation. + * + * @return the enableGeoBackup value. + */ + public Boolean enableGeoBackup() { + return this.enableGeoBackup; + } + + /** + * Set the enableGeoBackup property: If cluster backup is stored in another Azure region in addition to the copy of + * the backup stored in the cluster's region. Enabled only at the time of cluster creation. + * + * @param enableGeoBackup the enableGeoBackup value to set. + * @return the ClusterProperties object itself. + */ + public ClusterProperties withEnableGeoBackup(Boolean enableGeoBackup) { + this.enableGeoBackup = enableGeoBackup; + return this; + } + + /** + * Get the authConfig property: Authentication configuration of a cluster. + * + * @return the authConfig value. + */ + public AuthConfig authConfig() { + return this.authConfig; + } + + /** + * Set the authConfig property: Authentication configuration of a cluster. + * + * @param authConfig the authConfig value to set. + * @return the ClusterProperties object itself. + */ + public ClusterProperties withAuthConfig(AuthConfig authConfig) { + this.authConfig = authConfig; + return this; + } + /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -656,5 +742,8 @@ public void validate() { if (privateEndpointConnections() != null) { privateEndpointConnections().forEach(e -> e.validate()); } + if (authConfig() != null) { + authConfig().validate(); + } } } diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/models/ClusterPropertiesForUpdate.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/models/ClusterPropertiesForUpdate.java index 82ee433f3368..88d4d1a9d36a 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/models/ClusterPropertiesForUpdate.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/models/ClusterPropertiesForUpdate.java @@ -8,12 +8,14 @@ import com.azure.resourcemanager.cosmosdbforpostgresql.models.MaintenanceWindow; import com.fasterxml.jackson.annotation.JsonProperty; -/** The properties used to update a cluster. */ +/** + * The properties used to update a cluster. + */ @Fluent public final class ClusterPropertiesForUpdate { /* * The password of the administrator login. Each cluster is created with pre-defined administrative role called - * ‘citus’. + * ‘citus’.  */ @JsonProperty(value = "administratorLoginPassword") private String administratorLoginPassword; @@ -111,14 +113,16 @@ public final class ClusterPropertiesForUpdate { @JsonProperty(value = "maintenanceWindow") private MaintenanceWindow maintenanceWindow; - /** Creates an instance of ClusterPropertiesForUpdate class. */ + /** + * Creates an instance of ClusterPropertiesForUpdate class. + */ public ClusterPropertiesForUpdate() { } /** * Get the administratorLoginPassword property: The password of the administrator login. Each cluster is created * with pre-defined administrative role called ‘citus’. . - * + * * @return the administratorLoginPassword value. */ public String administratorLoginPassword() { @@ -128,7 +132,7 @@ public String administratorLoginPassword() { /** * Set the administratorLoginPassword property: The password of the administrator login. Each cluster is created * with pre-defined administrative role called ‘citus’. . - * + * * @param administratorLoginPassword the administratorLoginPassword value to set. * @return the ClusterPropertiesForUpdate object itself. */ @@ -139,7 +143,7 @@ public ClusterPropertiesForUpdate withAdministratorLoginPassword(String administ /** * Get the postgresqlVersion property: The major PostgreSQL version on all cluster servers. - * + * * @return the postgresqlVersion value. */ public String postgresqlVersion() { @@ -148,7 +152,7 @@ public String postgresqlVersion() { /** * Set the postgresqlVersion property: The major PostgreSQL version on all cluster servers. - * + * * @param postgresqlVersion the postgresqlVersion value to set. * @return the ClusterPropertiesForUpdate object itself. */ @@ -159,7 +163,7 @@ public ClusterPropertiesForUpdate withPostgresqlVersion(String postgresqlVersion /** * Get the citusVersion property: The Citus extension version on all cluster servers. - * + * * @return the citusVersion value. */ public String citusVersion() { @@ -168,7 +172,7 @@ public String citusVersion() { /** * Set the citusVersion property: The Citus extension version on all cluster servers. - * + * * @param citusVersion the citusVersion value to set. * @return the ClusterPropertiesForUpdate object itself. */ @@ -178,9 +182,9 @@ public ClusterPropertiesForUpdate withCitusVersion(String citusVersion) { } /** - * Get the enableShardsOnCoordinator property: If distributed tables are placed on coordinator or not. Should be set - * to 'true' on single node clusters. Requires shard rebalancing after value is changed. - * + * Get the enableShardsOnCoordinator property: If distributed tables are placed on coordinator or not. Should be + * set to 'true' on single node clusters. Requires shard rebalancing after value is changed. + * * @return the enableShardsOnCoordinator value. */ public Boolean enableShardsOnCoordinator() { @@ -188,9 +192,9 @@ public Boolean enableShardsOnCoordinator() { } /** - * Set the enableShardsOnCoordinator property: If distributed tables are placed on coordinator or not. Should be set - * to 'true' on single node clusters. Requires shard rebalancing after value is changed. - * + * Set the enableShardsOnCoordinator property: If distributed tables are placed on coordinator or not. Should be + * set to 'true' on single node clusters. Requires shard rebalancing after value is changed. + * * @param enableShardsOnCoordinator the enableShardsOnCoordinator value to set. * @return the ClusterPropertiesForUpdate object itself. */ @@ -201,7 +205,7 @@ public ClusterPropertiesForUpdate withEnableShardsOnCoordinator(Boolean enableSh /** * Get the enableHa property: If high availability (HA) is enabled or not for the cluster. - * + * * @return the enableHa value. */ public Boolean enableHa() { @@ -210,7 +214,7 @@ public Boolean enableHa() { /** * Set the enableHa property: If high availability (HA) is enabled or not for the cluster. - * + * * @param enableHa the enableHa value to set. * @return the ClusterPropertiesForUpdate object itself. */ @@ -221,7 +225,7 @@ public ClusterPropertiesForUpdate withEnableHa(Boolean enableHa) { /** * Get the preferredPrimaryZone property: Preferred primary availability zone (AZ) for all cluster servers. - * + * * @return the preferredPrimaryZone value. */ public String preferredPrimaryZone() { @@ -230,7 +234,7 @@ public String preferredPrimaryZone() { /** * Set the preferredPrimaryZone property: Preferred primary availability zone (AZ) for all cluster servers. - * + * * @param preferredPrimaryZone the preferredPrimaryZone value to set. * @return the ClusterPropertiesForUpdate object itself. */ @@ -241,7 +245,7 @@ public ClusterPropertiesForUpdate withPreferredPrimaryZone(String preferredPrima /** * Get the coordinatorServerEdition property: The edition of the coordinator (default: GeneralPurpose). - * + * * @return the coordinatorServerEdition value. */ public String coordinatorServerEdition() { @@ -250,7 +254,7 @@ public String coordinatorServerEdition() { /** * Set the coordinatorServerEdition property: The edition of the coordinator (default: GeneralPurpose). - * + * * @param coordinatorServerEdition the coordinatorServerEdition value to set. * @return the ClusterPropertiesForUpdate object itself. */ @@ -261,7 +265,7 @@ public ClusterPropertiesForUpdate withCoordinatorServerEdition(String coordinato /** * Get the coordinatorStorageQuotaInMb property: The storage of the coordinator in MB. - * + * * @return the coordinatorStorageQuotaInMb value. */ public Integer coordinatorStorageQuotaInMb() { @@ -270,7 +274,7 @@ public Integer coordinatorStorageQuotaInMb() { /** * Set the coordinatorStorageQuotaInMb property: The storage of the coordinator in MB. - * + * * @param coordinatorStorageQuotaInMb the coordinatorStorageQuotaInMb value to set. * @return the ClusterPropertiesForUpdate object itself. */ @@ -281,7 +285,7 @@ public ClusterPropertiesForUpdate withCoordinatorStorageQuotaInMb(Integer coordi /** * Get the coordinatorVCores property: The vCores count of the coordinator (max: 96). - * + * * @return the coordinatorVCores value. */ public Integer coordinatorVCores() { @@ -290,7 +294,7 @@ public Integer coordinatorVCores() { /** * Set the coordinatorVCores property: The vCores count of the coordinator (max: 96). - * + * * @param coordinatorVCores the coordinatorVCores value to set. * @return the ClusterPropertiesForUpdate object itself. */ @@ -301,7 +305,7 @@ public ClusterPropertiesForUpdate withCoordinatorVCores(Integer coordinatorVCore /** * Get the coordinatorEnablePublicIpAccess property: If public access is enabled on coordinator. - * + * * @return the coordinatorEnablePublicIpAccess value. */ public Boolean coordinatorEnablePublicIpAccess() { @@ -310,7 +314,7 @@ public Boolean coordinatorEnablePublicIpAccess() { /** * Set the coordinatorEnablePublicIpAccess property: If public access is enabled on coordinator. - * + * * @param coordinatorEnablePublicIpAccess the coordinatorEnablePublicIpAccess value to set. * @return the ClusterPropertiesForUpdate object itself. */ @@ -321,7 +325,7 @@ public ClusterPropertiesForUpdate withCoordinatorEnablePublicIpAccess(Boolean co /** * Get the nodeServerEdition property: The edition of a node (default: MemoryOptimized). - * + * * @return the nodeServerEdition value. */ public String nodeServerEdition() { @@ -330,7 +334,7 @@ public String nodeServerEdition() { /** * Set the nodeServerEdition property: The edition of a node (default: MemoryOptimized). - * + * * @param nodeServerEdition the nodeServerEdition value to set. * @return the ClusterPropertiesForUpdate object itself. */ @@ -343,7 +347,7 @@ public ClusterPropertiesForUpdate withNodeServerEdition(String nodeServerEdition * Get the nodeCount property: Worker node count of the cluster. When node count is 0, it represents a single node * configuration with the ability to create distributed tables on that node. 2 or more worker nodes represent * multi-node configuration. Node count value cannot be 1. - * + * * @return the nodeCount value. */ public Integer nodeCount() { @@ -354,7 +358,7 @@ public Integer nodeCount() { * Set the nodeCount property: Worker node count of the cluster. When node count is 0, it represents a single node * configuration with the ability to create distributed tables on that node. 2 or more worker nodes represent * multi-node configuration. Node count value cannot be 1. - * + * * @param nodeCount the nodeCount value to set. * @return the ClusterPropertiesForUpdate object itself. */ @@ -365,7 +369,7 @@ public ClusterPropertiesForUpdate withNodeCount(Integer nodeCount) { /** * Get the nodeStorageQuotaInMb property: The storage in MB on each worker node. - * + * * @return the nodeStorageQuotaInMb value. */ public Integer nodeStorageQuotaInMb() { @@ -374,7 +378,7 @@ public Integer nodeStorageQuotaInMb() { /** * Set the nodeStorageQuotaInMb property: The storage in MB on each worker node. - * + * * @param nodeStorageQuotaInMb the nodeStorageQuotaInMb value to set. * @return the ClusterPropertiesForUpdate object itself. */ @@ -385,7 +389,7 @@ public ClusterPropertiesForUpdate withNodeStorageQuotaInMb(Integer nodeStorageQu /** * Get the nodeVCores property: The compute in vCores on each worker node (max: 104). - * + * * @return the nodeVCores value. */ public Integer nodeVCores() { @@ -394,7 +398,7 @@ public Integer nodeVCores() { /** * Set the nodeVCores property: The compute in vCores on each worker node (max: 104). - * + * * @param nodeVCores the nodeVCores value to set. * @return the ClusterPropertiesForUpdate object itself. */ @@ -405,7 +409,7 @@ public ClusterPropertiesForUpdate withNodeVCores(Integer nodeVCores) { /** * Get the nodeEnablePublicIpAccess property: If public access is enabled on worker nodes. - * + * * @return the nodeEnablePublicIpAccess value. */ public Boolean nodeEnablePublicIpAccess() { @@ -414,7 +418,7 @@ public Boolean nodeEnablePublicIpAccess() { /** * Get the maintenanceWindow property: Maintenance window of a cluster. - * + * * @return the maintenanceWindow value. */ public MaintenanceWindow maintenanceWindow() { @@ -423,7 +427,7 @@ public MaintenanceWindow maintenanceWindow() { /** * Set the maintenanceWindow property: Maintenance window of a cluster. - * + * * @param maintenanceWindow the maintenanceWindow value to set. * @return the ClusterPropertiesForUpdate object itself. */ @@ -434,7 +438,7 @@ public ClusterPropertiesForUpdate withMaintenanceWindow(MaintenanceWindow mainte /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/models/ClusterServerInner.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/models/ClusterServerInner.java index 0bd9e3e16550..56cb9ef68616 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/models/ClusterServerInner.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/models/ClusterServerInner.java @@ -10,7 +10,9 @@ import com.azure.resourcemanager.cosmosdbforpostgresql.models.ServerRole; import com.fasterxml.jackson.annotation.JsonProperty; -/** Represents a server in a cluster. */ +/** + * Represents a server in a cluster. + */ @Fluent public final class ClusterServerInner extends ProxyResource { /* @@ -25,13 +27,15 @@ public final class ClusterServerInner extends ProxyResource { @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; - /** Creates an instance of ClusterServerInner class. */ + /** + * Creates an instance of ClusterServerInner class. + */ public ClusterServerInner() { } /** * Get the innerProperties property: The properties of a server in a cluster. - * + * * @return the innerProperties value. */ private ClusterServerProperties innerProperties() { @@ -40,7 +44,7 @@ private ClusterServerProperties innerProperties() { /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * + * * @return the systemData value. */ public SystemData systemData() { @@ -49,7 +53,7 @@ public SystemData systemData() { /** * Get the fullyQualifiedDomainName property: The fully qualified domain name of a server. - * + * * @return the fullyQualifiedDomainName value. */ public String fullyQualifiedDomainName() { @@ -58,7 +62,7 @@ public String fullyQualifiedDomainName() { /** * Get the role property: The role of server in the cluster. - * + * * @return the role value. */ public ServerRole role() { @@ -67,7 +71,7 @@ public ServerRole role() { /** * Set the role property: The role of server in the cluster. - * + * * @param role the role value to set. * @return the ClusterServerInner object itself. */ @@ -81,7 +85,7 @@ public ClusterServerInner withRole(ServerRole role) { /** * Get the state property: A state of a cluster/server that is visible to user. - * + * * @return the state value. */ public String state() { @@ -90,7 +94,7 @@ public String state() { /** * Get the haState property: A state of HA feature for the cluster. - * + * * @return the haState value. */ public String haState() { @@ -99,7 +103,7 @@ public String haState() { /** * Get the availabilityZone property: Availability Zone information of the server. - * + * * @return the availabilityZone value. */ public String availabilityZone() { @@ -108,7 +112,7 @@ public String availabilityZone() { /** * Set the availabilityZone property: Availability Zone information of the server. - * + * * @param availabilityZone the availabilityZone value to set. * @return the ClusterServerInner object itself. */ @@ -122,7 +126,7 @@ public ClusterServerInner withAvailabilityZone(String availabilityZone) { /** * Get the postgresqlVersion property: The major PostgreSQL version of server. - * + * * @return the postgresqlVersion value. */ public String postgresqlVersion() { @@ -131,7 +135,7 @@ public String postgresqlVersion() { /** * Set the postgresqlVersion property: The major PostgreSQL version of server. - * + * * @param postgresqlVersion the postgresqlVersion value to set. * @return the ClusterServerInner object itself. */ @@ -145,7 +149,7 @@ public ClusterServerInner withPostgresqlVersion(String postgresqlVersion) { /** * Get the citusVersion property: The Citus extension version of server. - * + * * @return the citusVersion value. */ public String citusVersion() { @@ -154,7 +158,7 @@ public String citusVersion() { /** * Set the citusVersion property: The Citus extension version of server. - * + * * @param citusVersion the citusVersion value to set. * @return the ClusterServerInner object itself. */ @@ -168,7 +172,7 @@ public ClusterServerInner withCitusVersion(String citusVersion) { /** * Get the serverEdition property: The edition of a server. - * + * * @return the serverEdition value. */ public String serverEdition() { @@ -177,7 +181,7 @@ public String serverEdition() { /** * Set the serverEdition property: The edition of a server. - * + * * @param serverEdition the serverEdition value to set. * @return the ClusterServerInner object itself. */ @@ -191,7 +195,7 @@ public ClusterServerInner withServerEdition(String serverEdition) { /** * Get the storageQuotaInMb property: The storage of a server in MB. - * + * * @return the storageQuotaInMb value. */ public Integer storageQuotaInMb() { @@ -200,7 +204,7 @@ public Integer storageQuotaInMb() { /** * Set the storageQuotaInMb property: The storage of a server in MB. - * + * * @param storageQuotaInMb the storageQuotaInMb value to set. * @return the ClusterServerInner object itself. */ @@ -214,7 +218,7 @@ public ClusterServerInner withStorageQuotaInMb(Integer storageQuotaInMb) { /** * Get the vCores property: The vCores count of a server. - * + * * @return the vCores value. */ public Integer vCores() { @@ -223,7 +227,7 @@ public Integer vCores() { /** * Set the vCores property: The vCores count of a server. - * + * * @param vCores the vCores value to set. * @return the ClusterServerInner object itself. */ @@ -237,7 +241,7 @@ public ClusterServerInner withVCores(Integer vCores) { /** * Get the enableHa property: If high availability (HA) is enabled or not for the server. - * + * * @return the enableHa value. */ public Boolean enableHa() { @@ -246,7 +250,7 @@ public Boolean enableHa() { /** * Set the enableHa property: If high availability (HA) is enabled or not for the server. - * + * * @param enableHa the enableHa value to set. * @return the ClusterServerInner object itself. */ @@ -260,7 +264,7 @@ public ClusterServerInner withEnableHa(Boolean enableHa) { /** * Get the enablePublicIpAccess property: If public access is enabled on server. - * + * * @return the enablePublicIpAccess value. */ public Boolean enablePublicIpAccess() { @@ -270,7 +274,7 @@ public Boolean enablePublicIpAccess() { /** * Get the isReadOnly property: If server database is set to read-only by system maintenance depending on high disk * space usage. - * + * * @return the isReadOnly value. */ public Boolean isReadOnly() { @@ -279,7 +283,7 @@ public Boolean isReadOnly() { /** * Get the administratorLogin property: The administrator's login name of the servers in the cluster. - * + * * @return the administratorLogin value. */ public String administratorLogin() { @@ -288,7 +292,7 @@ public String administratorLogin() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/models/ClusterServerProperties.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/models/ClusterServerProperties.java index c52ed425d6f0..588cdef051f7 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/models/ClusterServerProperties.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/models/ClusterServerProperties.java @@ -9,7 +9,9 @@ import com.azure.resourcemanager.cosmosdbforpostgresql.models.ServerRole; import com.fasterxml.jackson.annotation.JsonProperty; -/** The properties of a server in cluster. */ +/** + * The properties of a server in cluster. + */ @Fluent public final class ClusterServerProperties extends ServerProperties { /* @@ -54,13 +56,15 @@ public final class ClusterServerProperties extends ServerProperties { @JsonProperty(value = "citusVersion") private String citusVersion; - /** Creates an instance of ClusterServerProperties class. */ + /** + * Creates an instance of ClusterServerProperties class. + */ public ClusterServerProperties() { } /** * Get the fullyQualifiedDomainName property: The fully qualified domain name of a server. - * + * * @return the fullyQualifiedDomainName value. */ public String fullyQualifiedDomainName() { @@ -69,7 +73,7 @@ public String fullyQualifiedDomainName() { /** * Get the role property: The role of server in the cluster. - * + * * @return the role value. */ public ServerRole role() { @@ -78,7 +82,7 @@ public ServerRole role() { /** * Set the role property: The role of server in the cluster. - * + * * @param role the role value to set. * @return the ClusterServerProperties object itself. */ @@ -89,7 +93,7 @@ public ClusterServerProperties withRole(ServerRole role) { /** * Get the state property: A state of a cluster/server that is visible to user. - * + * * @return the state value. */ public String state() { @@ -98,7 +102,7 @@ public String state() { /** * Get the haState property: A state of HA feature for the cluster. - * + * * @return the haState value. */ public String haState() { @@ -107,7 +111,7 @@ public String haState() { /** * Get the availabilityZone property: Availability Zone information of the server. - * + * * @return the availabilityZone value. */ public String availabilityZone() { @@ -116,7 +120,7 @@ public String availabilityZone() { /** * Set the availabilityZone property: Availability Zone information of the server. - * + * * @param availabilityZone the availabilityZone value to set. * @return the ClusterServerProperties object itself. */ @@ -127,7 +131,7 @@ public ClusterServerProperties withAvailabilityZone(String availabilityZone) { /** * Get the postgresqlVersion property: The major PostgreSQL version of server. - * + * * @return the postgresqlVersion value. */ public String postgresqlVersion() { @@ -136,7 +140,7 @@ public String postgresqlVersion() { /** * Set the postgresqlVersion property: The major PostgreSQL version of server. - * + * * @param postgresqlVersion the postgresqlVersion value to set. * @return the ClusterServerProperties object itself. */ @@ -147,7 +151,7 @@ public ClusterServerProperties withPostgresqlVersion(String postgresqlVersion) { /** * Get the citusVersion property: The Citus extension version of server. - * + * * @return the citusVersion value. */ public String citusVersion() { @@ -156,7 +160,7 @@ public String citusVersion() { /** * Set the citusVersion property: The Citus extension version of server. - * + * * @param citusVersion the citusVersion value to set. * @return the ClusterServerProperties object itself. */ @@ -165,28 +169,36 @@ public ClusterServerProperties withCitusVersion(String citusVersion) { return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ClusterServerProperties withServerEdition(String serverEdition) { super.withServerEdition(serverEdition); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ClusterServerProperties withStorageQuotaInMb(Integer storageQuotaInMb) { super.withStorageQuotaInMb(storageQuotaInMb); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ClusterServerProperties withVCores(Integer vCores) { super.withVCores(vCores); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ClusterServerProperties withEnableHa(Boolean enableHa) { super.withEnableHa(enableHa); @@ -195,7 +207,7 @@ public ClusterServerProperties withEnableHa(Boolean enableHa) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/models/ConfigurationInner.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/models/ConfigurationInner.java index e97037232bb2..86d787e7ee84 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/models/ConfigurationInner.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/models/ConfigurationInner.java @@ -13,7 +13,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Represents configuration details for coordinator and node. */ +/** + * Represents configuration details for coordinator and node. + */ @Fluent public final class ConfigurationInner extends ProxyResource { /* @@ -28,13 +30,15 @@ public final class ConfigurationInner extends ProxyResource { @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; - /** Creates an instance of ConfigurationInner class. */ + /** + * Creates an instance of ConfigurationInner class. + */ public ConfigurationInner() { } /** * Get the innerProperties property: The properties of configuration. - * + * * @return the innerProperties value. */ private ConfigurationProperties innerProperties() { @@ -43,7 +47,7 @@ private ConfigurationProperties innerProperties() { /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * + * * @return the systemData value. */ public SystemData systemData() { @@ -52,7 +56,7 @@ public SystemData systemData() { /** * Get the description property: Description of the configuration. - * + * * @return the description value. */ public String description() { @@ -61,7 +65,7 @@ public String description() { /** * Get the dataType property: Data type of the configuration. - * + * * @return the dataType value. */ public ConfigurationDataType dataType() { @@ -70,7 +74,7 @@ public ConfigurationDataType dataType() { /** * Get the allowedValues property: Allowed values of the configuration. - * + * * @return the allowedValues value. */ public String allowedValues() { @@ -79,7 +83,7 @@ public String allowedValues() { /** * Get the requiresRestart property: If configuration change requires restart. - * + * * @return the requiresRestart value. */ public Boolean requiresRestart() { @@ -88,7 +92,7 @@ public Boolean requiresRestart() { /** * Set the requiresRestart property: If configuration change requires restart. - * + * * @param requiresRestart the requiresRestart value to set. * @return the ConfigurationInner object itself. */ @@ -102,7 +106,7 @@ public ConfigurationInner withRequiresRestart(Boolean requiresRestart) { /** * Get the serverRoleGroupConfigurations property: The list of server role group configuration values. - * + * * @return the serverRoleGroupConfigurations value. */ public List serverRoleGroupConfigurations() { @@ -111,12 +115,12 @@ public List serverRoleGroupConfigurations() { /** * Set the serverRoleGroupConfigurations property: The list of server role group configuration values. - * + * * @param serverRoleGroupConfigurations the serverRoleGroupConfigurations value to set. * @return the ConfigurationInner object itself. */ - public ConfigurationInner withServerRoleGroupConfigurations( - List serverRoleGroupConfigurations) { + public ConfigurationInner + withServerRoleGroupConfigurations(List serverRoleGroupConfigurations) { if (this.innerProperties() == null) { this.innerProperties = new ConfigurationProperties(); } @@ -126,7 +130,7 @@ public ConfigurationInner withServerRoleGroupConfigurations( /** * Get the provisioningState property: Provisioning state of the configuration. - * + * * @return the provisioningState value. */ public ProvisioningState provisioningState() { @@ -135,7 +139,7 @@ public ProvisioningState provisioningState() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/models/ConfigurationProperties.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/models/ConfigurationProperties.java index 719a8f0e66a1..df6046ec8638 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/models/ConfigurationProperties.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/models/ConfigurationProperties.java @@ -12,7 +12,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** The properties of configuration. */ +/** + * The properties of configuration. + */ @Fluent public final class ConfigurationProperties { /* @@ -51,13 +53,15 @@ public final class ConfigurationProperties { @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private ProvisioningState provisioningState; - /** Creates an instance of ConfigurationProperties class. */ + /** + * Creates an instance of ConfigurationProperties class. + */ public ConfigurationProperties() { } /** * Get the description property: Description of the configuration. - * + * * @return the description value. */ public String description() { @@ -66,7 +70,7 @@ public String description() { /** * Get the dataType property: Data type of the configuration. - * + * * @return the dataType value. */ public ConfigurationDataType dataType() { @@ -75,7 +79,7 @@ public ConfigurationDataType dataType() { /** * Get the allowedValues property: Allowed values of the configuration. - * + * * @return the allowedValues value. */ public String allowedValues() { @@ -84,7 +88,7 @@ public String allowedValues() { /** * Get the requiresRestart property: If configuration change requires restart. - * + * * @return the requiresRestart value. */ public Boolean requiresRestart() { @@ -93,7 +97,7 @@ public Boolean requiresRestart() { /** * Set the requiresRestart property: If configuration change requires restart. - * + * * @param requiresRestart the requiresRestart value to set. * @return the ConfigurationProperties object itself. */ @@ -104,7 +108,7 @@ public ConfigurationProperties withRequiresRestart(Boolean requiresRestart) { /** * Get the serverRoleGroupConfigurations property: The list of server role group configuration values. - * + * * @return the serverRoleGroupConfigurations value. */ public List serverRoleGroupConfigurations() { @@ -113,19 +117,19 @@ public List serverRoleGroupConfigurations() { /** * Set the serverRoleGroupConfigurations property: The list of server role group configuration values. - * + * * @param serverRoleGroupConfigurations the serverRoleGroupConfigurations value to set. * @return the ConfigurationProperties object itself. */ - public ConfigurationProperties withServerRoleGroupConfigurations( - List serverRoleGroupConfigurations) { + public ConfigurationProperties + withServerRoleGroupConfigurations(List serverRoleGroupConfigurations) { this.serverRoleGroupConfigurations = serverRoleGroupConfigurations; return this; } /** * Get the provisioningState property: Provisioning state of the configuration. - * + * * @return the provisioningState value. */ public ProvisioningState provisioningState() { @@ -134,15 +138,13 @@ public ProvisioningState provisioningState() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (serverRoleGroupConfigurations() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property serverRoleGroupConfigurations in model ConfigurationProperties")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property serverRoleGroupConfigurations in model ConfigurationProperties")); } else { serverRoleGroupConfigurations().forEach(e -> e.validate()); } diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/models/FirewallRuleInner.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/models/FirewallRuleInner.java index 206493864632..3c59b51046a5 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/models/FirewallRuleInner.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/models/FirewallRuleInner.java @@ -11,7 +11,9 @@ import com.azure.resourcemanager.cosmosdbforpostgresql.models.ProvisioningState; import com.fasterxml.jackson.annotation.JsonProperty; -/** Represents a cluster firewall rule. */ +/** + * Represents a cluster firewall rule. + */ @Fluent public final class FirewallRuleInner extends ProxyResource { /* @@ -26,13 +28,15 @@ public final class FirewallRuleInner extends ProxyResource { @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; - /** Creates an instance of FirewallRuleInner class. */ + /** + * Creates an instance of FirewallRuleInner class. + */ public FirewallRuleInner() { } /** * Get the innerProperties property: The properties of a firewall rule. - * + * * @return the innerProperties value. */ private FirewallRuleProperties innerProperties() { @@ -41,7 +45,7 @@ private FirewallRuleProperties innerProperties() { /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * + * * @return the systemData value. */ public SystemData systemData() { @@ -50,7 +54,7 @@ public SystemData systemData() { /** * Get the startIpAddress property: The start IP address of the cluster firewall rule. Must be IPv4 format. - * + * * @return the startIpAddress value. */ public String startIpAddress() { @@ -59,7 +63,7 @@ public String startIpAddress() { /** * Set the startIpAddress property: The start IP address of the cluster firewall rule. Must be IPv4 format. - * + * * @param startIpAddress the startIpAddress value to set. * @return the FirewallRuleInner object itself. */ @@ -73,7 +77,7 @@ public FirewallRuleInner withStartIpAddress(String startIpAddress) { /** * Get the endIpAddress property: The end IP address of the cluster firewall rule. Must be IPv4 format. - * + * * @return the endIpAddress value. */ public String endIpAddress() { @@ -82,7 +86,7 @@ public String endIpAddress() { /** * Set the endIpAddress property: The end IP address of the cluster firewall rule. Must be IPv4 format. - * + * * @param endIpAddress the endIpAddress value to set. * @return the FirewallRuleInner object itself. */ @@ -96,7 +100,7 @@ public FirewallRuleInner withEndIpAddress(String endIpAddress) { /** * Get the provisioningState property: Provisioning state of the firewall rule. - * + * * @return the provisioningState value. */ public ProvisioningState provisioningState() { @@ -105,15 +109,13 @@ public ProvisioningState provisioningState() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (innerProperties() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property innerProperties in model FirewallRuleInner")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property innerProperties in model FirewallRuleInner")); } else { innerProperties().validate(); } diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/models/FirewallRuleProperties.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/models/FirewallRuleProperties.java index 1179a5aba67b..776e3d23c9bf 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/models/FirewallRuleProperties.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/models/FirewallRuleProperties.java @@ -9,7 +9,9 @@ import com.azure.resourcemanager.cosmosdbforpostgresql.models.ProvisioningState; import com.fasterxml.jackson.annotation.JsonProperty; -/** The properties of a cluster firewall rule. */ +/** + * The properties of a cluster firewall rule. + */ @Fluent public final class FirewallRuleProperties { /* @@ -30,13 +32,15 @@ public final class FirewallRuleProperties { @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private ProvisioningState provisioningState; - /** Creates an instance of FirewallRuleProperties class. */ + /** + * Creates an instance of FirewallRuleProperties class. + */ public FirewallRuleProperties() { } /** * Get the startIpAddress property: The start IP address of the cluster firewall rule. Must be IPv4 format. - * + * * @return the startIpAddress value. */ public String startIpAddress() { @@ -45,7 +49,7 @@ public String startIpAddress() { /** * Set the startIpAddress property: The start IP address of the cluster firewall rule. Must be IPv4 format. - * + * * @param startIpAddress the startIpAddress value to set. * @return the FirewallRuleProperties object itself. */ @@ -56,7 +60,7 @@ public FirewallRuleProperties withStartIpAddress(String startIpAddress) { /** * Get the endIpAddress property: The end IP address of the cluster firewall rule. Must be IPv4 format. - * + * * @return the endIpAddress value. */ public String endIpAddress() { @@ -65,7 +69,7 @@ public String endIpAddress() { /** * Set the endIpAddress property: The end IP address of the cluster firewall rule. Must be IPv4 format. - * + * * @param endIpAddress the endIpAddress value to set. * @return the FirewallRuleProperties object itself. */ @@ -76,7 +80,7 @@ public FirewallRuleProperties withEndIpAddress(String endIpAddress) { /** * Get the provisioningState property: Provisioning state of the firewall rule. - * + * * @return the provisioningState value. */ public ProvisioningState provisioningState() { @@ -85,21 +89,17 @@ public ProvisioningState provisioningState() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (startIpAddress() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property startIpAddress in model FirewallRuleProperties")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property startIpAddress in model FirewallRuleProperties")); } if (endIpAddress() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property endIpAddress in model FirewallRuleProperties")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property endIpAddress in model FirewallRuleProperties")); } } diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/models/NameAvailabilityInner.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/models/NameAvailabilityInner.java index b2767f5b6b86..013f99e68d69 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/models/NameAvailabilityInner.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/models/NameAvailabilityInner.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Represents cluster name availability. */ +/** + * Represents cluster name availability. + */ @Fluent public final class NameAvailabilityInner { /* @@ -34,13 +36,15 @@ public final class NameAvailabilityInner { @JsonProperty(value = "type") private String type; - /** Creates an instance of NameAvailabilityInner class. */ + /** + * Creates an instance of NameAvailabilityInner class. + */ public NameAvailabilityInner() { } /** * Get the message property: Error message. - * + * * @return the message value. */ public String message() { @@ -49,7 +53,7 @@ public String message() { /** * Set the message property: Error message. - * + * * @param message the message value to set. * @return the NameAvailabilityInner object itself. */ @@ -60,7 +64,7 @@ public NameAvailabilityInner withMessage(String message) { /** * Get the nameAvailable property: Indicates whether the cluster name is available. - * + * * @return the nameAvailable value. */ public Boolean nameAvailable() { @@ -69,7 +73,7 @@ public Boolean nameAvailable() { /** * Set the nameAvailable property: Indicates whether the cluster name is available. - * + * * @param nameAvailable the nameAvailable value to set. * @return the NameAvailabilityInner object itself. */ @@ -80,7 +84,7 @@ public NameAvailabilityInner withNameAvailable(Boolean nameAvailable) { /** * Get the name property: Name of the cluster. - * + * * @return the name value. */ public String name() { @@ -89,7 +93,7 @@ public String name() { /** * Set the name property: Name of the cluster. - * + * * @param name the name value to set. * @return the NameAvailabilityInner object itself. */ @@ -100,7 +104,7 @@ public NameAvailabilityInner withName(String name) { /** * Get the type property: Type of the cluster. - * + * * @return the type value. */ public String type() { @@ -109,7 +113,7 @@ public String type() { /** * Set the type property: Type of the cluster. - * + * * @param type the type value to set. * @return the NameAvailabilityInner object itself. */ @@ -120,7 +124,7 @@ public NameAvailabilityInner withType(String type) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/models/OperationInner.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/models/OperationInner.java index 48ccbb7183a0..30ddcfccba5a 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/models/OperationInner.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/models/OperationInner.java @@ -11,7 +11,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; -/** REST API operation definition. */ +/** + * REST API operation definition. + */ @Fluent public final class OperationInner { /* @@ -45,13 +47,15 @@ public final class OperationInner { @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map properties; - /** Creates an instance of OperationInner class. */ + /** + * Creates an instance of OperationInner class. + */ public OperationInner() { } /** * Get the name property: The name of the operation being performed on this particular object. - * + * * @return the name value. */ public String name() { @@ -60,7 +64,7 @@ public String name() { /** * Get the display property: The localized display information for this particular operation or action. - * + * * @return the display value. */ public OperationDisplay display() { @@ -69,7 +73,7 @@ public OperationDisplay display() { /** * Get the isDataAction property: Indicates whether the operation is a data action. - * + * * @return the isDataAction value. */ public Boolean isDataAction() { @@ -78,7 +82,7 @@ public Boolean isDataAction() { /** * Set the isDataAction property: Indicates whether the operation is a data action. - * + * * @param isDataAction the isDataAction value to set. * @return the OperationInner object itself. */ @@ -89,7 +93,7 @@ public OperationInner withIsDataAction(Boolean isDataAction) { /** * Get the origin property: The intended executor of the operation. - * + * * @return the origin value. */ public OperationOrigin origin() { @@ -98,7 +102,7 @@ public OperationOrigin origin() { /** * Get the properties property: Additional descriptions for the operation. - * + * * @return the properties value. */ public Map properties() { @@ -107,7 +111,7 @@ public Map properties() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/models/PrivateEndpointConnectionInner.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/models/PrivateEndpointConnectionInner.java index 42ba1013b5c9..18e464e6a162 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/models/PrivateEndpointConnectionInner.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/models/PrivateEndpointConnectionInner.java @@ -13,7 +13,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** The private endpoint connection resource. */ +/** + * The private endpoint connection resource. + */ @Fluent public final class PrivateEndpointConnectionInner extends ProxyResource { /* @@ -28,13 +30,15 @@ public final class PrivateEndpointConnectionInner extends ProxyResource { @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; - /** Creates an instance of PrivateEndpointConnectionInner class. */ + /** + * Creates an instance of PrivateEndpointConnectionInner class. + */ public PrivateEndpointConnectionInner() { } /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private PrivateEndpointConnectionProperties innerProperties() { @@ -43,7 +47,7 @@ private PrivateEndpointConnectionProperties innerProperties() { /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * + * * @return the systemData value. */ public SystemData systemData() { @@ -52,7 +56,7 @@ public SystemData systemData() { /** * Get the groupIds property: The group ids for the private endpoint resource. - * + * * @return the groupIds value. */ public List groupIds() { @@ -61,7 +65,7 @@ public List groupIds() { /** * Get the privateEndpoint property: The private endpoint resource. - * + * * @return the privateEndpoint value. */ public PrivateEndpoint privateEndpoint() { @@ -70,7 +74,7 @@ public PrivateEndpoint privateEndpoint() { /** * Set the privateEndpoint property: The private endpoint resource. - * + * * @param privateEndpoint the privateEndpoint value to set. * @return the PrivateEndpointConnectionInner object itself. */ @@ -83,9 +87,9 @@ public PrivateEndpointConnectionInner withPrivateEndpoint(PrivateEndpoint privat } /** - * Get the privateLinkServiceConnectionState property: A collection of information about the state of the connection - * between service consumer and provider. - * + * Get the privateLinkServiceConnectionState property: A collection of information about the state of the + * connection between service consumer and provider. + * * @return the privateLinkServiceConnectionState value. */ public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() { @@ -93,14 +97,14 @@ public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() { } /** - * Set the privateLinkServiceConnectionState property: A collection of information about the state of the connection - * between service consumer and provider. - * + * Set the privateLinkServiceConnectionState property: A collection of information about the state of the + * connection between service consumer and provider. + * * @param privateLinkServiceConnectionState the privateLinkServiceConnectionState value to set. * @return the PrivateEndpointConnectionInner object itself. */ - public PrivateEndpointConnectionInner withPrivateLinkServiceConnectionState( - PrivateLinkServiceConnectionState privateLinkServiceConnectionState) { + public PrivateEndpointConnectionInner + withPrivateLinkServiceConnectionState(PrivateLinkServiceConnectionState privateLinkServiceConnectionState) { if (this.innerProperties() == null) { this.innerProperties = new PrivateEndpointConnectionProperties(); } @@ -110,7 +114,7 @@ public PrivateEndpointConnectionInner withPrivateLinkServiceConnectionState( /** * Get the provisioningState property: The provisioning state of the private endpoint connection resource. - * + * * @return the provisioningState value. */ public PrivateEndpointConnectionProvisioningState provisioningState() { @@ -119,7 +123,7 @@ public PrivateEndpointConnectionProvisioningState provisioningState() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/models/PrivateEndpointConnectionProperties.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/models/PrivateEndpointConnectionProperties.java index dafec693728c..5e0615332456 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/models/PrivateEndpointConnectionProperties.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/models/PrivateEndpointConnectionProperties.java @@ -12,7 +12,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Properties of the private endpoint connection. */ +/** + * Properties of the private endpoint connection. + */ @Fluent public final class PrivateEndpointConnectionProperties { /* @@ -39,13 +41,15 @@ public final class PrivateEndpointConnectionProperties { @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private PrivateEndpointConnectionProvisioningState provisioningState; - /** Creates an instance of PrivateEndpointConnectionProperties class. */ + /** + * Creates an instance of PrivateEndpointConnectionProperties class. + */ public PrivateEndpointConnectionProperties() { } /** * Get the groupIds property: The group ids for the private endpoint resource. - * + * * @return the groupIds value. */ public List groupIds() { @@ -54,7 +58,7 @@ public List groupIds() { /** * Get the privateEndpoint property: The private endpoint resource. - * + * * @return the privateEndpoint value. */ public PrivateEndpoint privateEndpoint() { @@ -63,7 +67,7 @@ public PrivateEndpoint privateEndpoint() { /** * Set the privateEndpoint property: The private endpoint resource. - * + * * @param privateEndpoint the privateEndpoint value to set. * @return the PrivateEndpointConnectionProperties object itself. */ @@ -73,9 +77,9 @@ public PrivateEndpointConnectionProperties withPrivateEndpoint(PrivateEndpoint p } /** - * Get the privateLinkServiceConnectionState property: A collection of information about the state of the connection - * between service consumer and provider. - * + * Get the privateLinkServiceConnectionState property: A collection of information about the state of the + * connection between service consumer and provider. + * * @return the privateLinkServiceConnectionState value. */ public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() { @@ -83,21 +87,21 @@ public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() { } /** - * Set the privateLinkServiceConnectionState property: A collection of information about the state of the connection - * between service consumer and provider. - * + * Set the privateLinkServiceConnectionState property: A collection of information about the state of the + * connection between service consumer and provider. + * * @param privateLinkServiceConnectionState the privateLinkServiceConnectionState value to set. * @return the PrivateEndpointConnectionProperties object itself. */ - public PrivateEndpointConnectionProperties withPrivateLinkServiceConnectionState( - PrivateLinkServiceConnectionState privateLinkServiceConnectionState) { + public PrivateEndpointConnectionProperties + withPrivateLinkServiceConnectionState(PrivateLinkServiceConnectionState privateLinkServiceConnectionState) { this.privateLinkServiceConnectionState = privateLinkServiceConnectionState; return this; } /** * Get the provisioningState property: The provisioning state of the private endpoint connection resource. - * + * * @return the provisioningState value. */ public PrivateEndpointConnectionProvisioningState provisioningState() { @@ -106,7 +110,7 @@ public PrivateEndpointConnectionProvisioningState provisioningState() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -114,11 +118,8 @@ public void validate() { privateEndpoint().validate(); } if (privateLinkServiceConnectionState() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property privateLinkServiceConnectionState in model" - + " PrivateEndpointConnectionProperties")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property privateLinkServiceConnectionState in model PrivateEndpointConnectionProperties")); } else { privateLinkServiceConnectionState().validate(); } diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/models/PrivateEndpointConnectionSimpleProperties.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/models/PrivateEndpointConnectionSimpleProperties.java index ca268048eb10..7f79e8d3a2c8 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/models/PrivateEndpointConnectionSimpleProperties.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/models/PrivateEndpointConnectionSimpleProperties.java @@ -10,7 +10,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** The properties in private endpoint connection. */ +/** + * The properties in private endpoint connection. + */ @Fluent public final class PrivateEndpointConnectionSimpleProperties { /* @@ -31,13 +33,15 @@ public final class PrivateEndpointConnectionSimpleProperties { @JsonProperty(value = "privateLinkServiceConnectionState") private PrivateLinkServiceConnectionState privateLinkServiceConnectionState; - /** Creates an instance of PrivateEndpointConnectionSimpleProperties class. */ + /** + * Creates an instance of PrivateEndpointConnectionSimpleProperties class. + */ public PrivateEndpointConnectionSimpleProperties() { } /** * Get the privateEndpoint property: Private endpoint which the connection belongs to. - * + * * @return the privateEndpoint value. */ public PrivateEndpointProperty privateEndpoint() { @@ -46,7 +50,7 @@ public PrivateEndpointProperty privateEndpoint() { /** * Set the privateEndpoint property: Private endpoint which the connection belongs to. - * + * * @param privateEndpoint the privateEndpoint value to set. * @return the PrivateEndpointConnectionSimpleProperties object itself. */ @@ -57,7 +61,7 @@ public PrivateEndpointConnectionSimpleProperties withPrivateEndpoint(PrivateEndp /** * Get the groupIds property: Group ids of the private endpoint connection. - * + * * @return the groupIds value. */ public List groupIds() { @@ -66,7 +70,7 @@ public List groupIds() { /** * Set the groupIds property: Group ids of the private endpoint connection. - * + * * @param groupIds the groupIds value to set. * @return the PrivateEndpointConnectionSimpleProperties object itself. */ @@ -76,9 +80,9 @@ public PrivateEndpointConnectionSimpleProperties withGroupIds(List group } /** - * Get the privateLinkServiceConnectionState property: A collection of information about the state of the connection - * between service consumer and provider. - * + * Get the privateLinkServiceConnectionState property: A collection of information about the state of the + * connection between service consumer and provider. + * * @return the privateLinkServiceConnectionState value. */ public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() { @@ -86,21 +90,21 @@ public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() { } /** - * Set the privateLinkServiceConnectionState property: A collection of information about the state of the connection - * between service consumer and provider. - * + * Set the privateLinkServiceConnectionState property: A collection of information about the state of the + * connection between service consumer and provider. + * * @param privateLinkServiceConnectionState the privateLinkServiceConnectionState value to set. * @return the PrivateEndpointConnectionSimpleProperties object itself. */ - public PrivateEndpointConnectionSimpleProperties withPrivateLinkServiceConnectionState( - PrivateLinkServiceConnectionState privateLinkServiceConnectionState) { + public PrivateEndpointConnectionSimpleProperties + withPrivateLinkServiceConnectionState(PrivateLinkServiceConnectionState privateLinkServiceConnectionState) { this.privateLinkServiceConnectionState = privateLinkServiceConnectionState; return this; } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/models/PrivateLinkResourceInner.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/models/PrivateLinkResourceInner.java index 846734fa5f19..60df34d95153 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/models/PrivateLinkResourceInner.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/models/PrivateLinkResourceInner.java @@ -10,7 +10,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** A private link resource. */ +/** + * A private link resource. + */ @Fluent public final class PrivateLinkResourceInner extends ProxyResource { /* @@ -25,13 +27,15 @@ public final class PrivateLinkResourceInner extends ProxyResource { @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; - /** Creates an instance of PrivateLinkResourceInner class. */ + /** + * Creates an instance of PrivateLinkResourceInner class. + */ public PrivateLinkResourceInner() { } /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private PrivateLinkResourceProperties innerProperties() { @@ -40,7 +44,7 @@ private PrivateLinkResourceProperties innerProperties() { /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * + * * @return the systemData value. */ public SystemData systemData() { @@ -49,7 +53,7 @@ public SystemData systemData() { /** * Get the groupId property: The private link resource group id. - * + * * @return the groupId value. */ public String groupId() { @@ -58,7 +62,7 @@ public String groupId() { /** * Get the requiredMembers property: The private link resource required member names. - * + * * @return the requiredMembers value. */ public List requiredMembers() { @@ -67,7 +71,7 @@ public List requiredMembers() { /** * Get the requiredZoneNames property: The private link resource private link DNS zone name. - * + * * @return the requiredZoneNames value. */ public List requiredZoneNames() { @@ -76,7 +80,7 @@ public List 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. */ @@ -90,7 +94,7 @@ public PrivateLinkResourceInner withRequiredZoneNames(List requiredZoneN /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/models/PrivateLinkResourceProperties.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/models/PrivateLinkResourceProperties.java index 150593b98fd1..b87e68850352 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/models/PrivateLinkResourceProperties.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/models/PrivateLinkResourceProperties.java @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Properties of a private link resource. */ +/** + * Properties of a private link resource. + */ @Fluent public final class PrivateLinkResourceProperties { /* @@ -29,13 +31,15 @@ public final class PrivateLinkResourceProperties { @JsonProperty(value = "requiredZoneNames") private List requiredZoneNames; - /** Creates an instance of PrivateLinkResourceProperties class. */ + /** + * Creates an instance of PrivateLinkResourceProperties class. + */ public PrivateLinkResourceProperties() { } /** * Get the groupId property: The private link resource group id. - * + * * @return the groupId value. */ public String groupId() { @@ -44,7 +48,7 @@ public String groupId() { /** * Get the requiredMembers property: The private link resource required member names. - * + * * @return the requiredMembers value. */ public List requiredMembers() { @@ -53,7 +57,7 @@ public List requiredMembers() { /** * Get the requiredZoneNames property: The private link resource private link DNS zone name. - * + * * @return the requiredZoneNames value. */ public List requiredZoneNames() { @@ -62,7 +66,7 @@ public List 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. */ @@ -73,7 +77,7 @@ public PrivateLinkResourceProperties withRequiredZoneNames(List required /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/models/RoleInner.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/models/RoleInner.java index 6eb3cb6f8687..52d20f0e3df5 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/models/RoleInner.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/models/RoleInner.java @@ -8,10 +8,14 @@ import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.cosmosdbforpostgresql.models.PrincipalType; import com.azure.resourcemanager.cosmosdbforpostgresql.models.ProvisioningState; +import com.azure.resourcemanager.cosmosdbforpostgresql.models.RoleType; import com.fasterxml.jackson.annotation.JsonProperty; -/** Represents a cluster role. */ +/** + * Represents a cluster role. + */ @Fluent public final class RoleInner extends ProxyResource { /* @@ -26,13 +30,15 @@ public final class RoleInner extends ProxyResource { @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; - /** Creates an instance of RoleInner class. */ + /** + * Creates an instance of RoleInner class. + */ public RoleInner() { } /** * Get the innerProperties property: The properties of a role. - * + * * @return the innerProperties value. */ private RoleProperties innerProperties() { @@ -41,7 +47,7 @@ private RoleProperties innerProperties() { /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * + * * @return the systemData value. */ public SystemData systemData() { @@ -49,8 +55,32 @@ public SystemData systemData() { } /** - * Get the password property: The password of the cluster role. - * + * Get the roleType property: The roleType property. + * + * @return the roleType value. + */ + public RoleType roleType() { + return this.innerProperties() == null ? null : this.innerProperties().roleType(); + } + + /** + * Set the roleType property: The roleType property. + * + * @param roleType the roleType value to set. + * @return the RoleInner object itself. + */ + public RoleInner withRoleType(RoleType roleType) { + if (this.innerProperties() == null) { + this.innerProperties = new RoleProperties(); + } + this.innerProperties().withRoleType(roleType); + return this; + } + + /** + * Get the password property: The password of the cluster role. If an identity is used, password will not be + * required. + * * @return the password value. */ public String password() { @@ -58,8 +88,9 @@ public String password() { } /** - * Set the password property: The password of the cluster role. - * + * Set the password property: The password of the cluster role. If an identity is used, password will not be + * required. + * * @param password the password value to set. * @return the RoleInner object itself. */ @@ -73,23 +104,91 @@ public RoleInner withPassword(String password) { /** * Get the provisioningState property: Provisioning state of the role. - * + * * @return the provisioningState value. */ public ProvisioningState provisioningState() { return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); } + /** + * Get the objectId property: The objectId property. + * + * @return the objectId value. + */ + public String objectId() { + return this.innerProperties() == null ? null : this.innerProperties().objectId(); + } + + /** + * Set the objectId property: The objectId property. + * + * @param objectId the objectId value to set. + * @return the RoleInner object itself. + */ + public RoleInner withObjectId(String objectId) { + if (this.innerProperties() == null) { + this.innerProperties = new RoleProperties(); + } + this.innerProperties().withObjectId(objectId); + return this; + } + + /** + * Get the principalType property: The principalType property. + * + * @return the principalType value. + */ + public PrincipalType principalType() { + return this.innerProperties() == null ? null : this.innerProperties().principalType(); + } + + /** + * Set the principalType property: The principalType property. + * + * @param principalType the principalType value to set. + * @return the RoleInner object itself. + */ + public RoleInner withPrincipalType(PrincipalType principalType) { + if (this.innerProperties() == null) { + this.innerProperties = new RoleProperties(); + } + this.innerProperties().withPrincipalType(principalType); + return this; + } + + /** + * Get the tenantId property: The tenantId property. + * + * @return the tenantId value. + */ + public String tenantId() { + return this.innerProperties() == null ? null : this.innerProperties().tenantId(); + } + + /** + * Set the tenantId property: The tenantId property. + * + * @param tenantId the tenantId value to set. + * @return the RoleInner object itself. + */ + public RoleInner withTenantId(String tenantId) { + if (this.innerProperties() == null) { + this.innerProperties = new RoleProperties(); + } + 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 - .logExceptionAsError( - new IllegalArgumentException("Missing required property innerProperties in model RoleInner")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property innerProperties in model RoleInner")); } else { innerProperties().validate(); } diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/models/RoleProperties.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/models/RoleProperties.java index e2fb46c24d88..d22be56b854f 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/models/RoleProperties.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/models/RoleProperties.java @@ -5,32 +5,70 @@ package com.azure.resourcemanager.cosmosdbforpostgresql.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.cosmosdbforpostgresql.models.PrincipalType; import com.azure.resourcemanager.cosmosdbforpostgresql.models.ProvisioningState; +import com.azure.resourcemanager.cosmosdbforpostgresql.models.RoleType; import com.fasterxml.jackson.annotation.JsonProperty; -/** The properties of a cluster role. */ +/** + * The properties of a cluster role. + */ @Fluent public final class RoleProperties { /* - * The password of the cluster role. + * The roleType property. + */ + @JsonProperty(value = "roleType") + private RoleType roleType; + + /* + * The password of the cluster role. If an identity is used, password will not be required. */ @JsonProperty(value = "password") private String password; + /* + * The externalIdentity property. + */ + @JsonProperty(value = "externalIdentity") + private RolePropertiesExternalIdentity innerExternalIdentity; + /* * Provisioning state of the role */ @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private ProvisioningState provisioningState; - /** Creates an instance of RoleProperties class. */ + /** + * Creates an instance of RoleProperties class. + */ public RoleProperties() { } /** - * Get the password property: The password of the cluster role. - * + * Get the roleType property: The roleType property. + * + * @return the roleType value. + */ + public RoleType roleType() { + return this.roleType; + } + + /** + * Set the roleType property: The roleType property. + * + * @param roleType the roleType value to set. + * @return the RoleProperties object itself. + */ + public RoleProperties withRoleType(RoleType roleType) { + this.roleType = roleType; + return this; + } + + /** + * Get the password property: The password of the cluster role. If an identity is used, password will not be + * required. + * * @return the password value. */ public String password() { @@ -38,8 +76,9 @@ public String password() { } /** - * Set the password property: The password of the cluster role. - * + * Set the password property: The password of the cluster role. If an identity is used, password will not be + * required. + * * @param password the password value to set. * @return the RoleProperties object itself. */ @@ -48,27 +87,101 @@ public RoleProperties withPassword(String password) { return this; } + /** + * Get the innerExternalIdentity property: The externalIdentity property. + * + * @return the innerExternalIdentity value. + */ + private RolePropertiesExternalIdentity innerExternalIdentity() { + return this.innerExternalIdentity; + } + /** * Get the provisioningState property: Provisioning state of the role. - * + * * @return the provisioningState value. */ public ProvisioningState provisioningState() { return this.provisioningState; } + /** + * Get the objectId property: The objectId property. + * + * @return the objectId value. + */ + public String objectId() { + return this.innerExternalIdentity() == null ? null : this.innerExternalIdentity().objectId(); + } + + /** + * Set the objectId property: The objectId property. + * + * @param objectId the objectId value to set. + * @return the RoleProperties object itself. + */ + public RoleProperties withObjectId(String objectId) { + if (this.innerExternalIdentity() == null) { + this.innerExternalIdentity = new RolePropertiesExternalIdentity(); + } + this.innerExternalIdentity().withObjectId(objectId); + return this; + } + + /** + * Get the principalType property: The principalType property. + * + * @return the principalType value. + */ + public PrincipalType principalType() { + return this.innerExternalIdentity() == null ? null : this.innerExternalIdentity().principalType(); + } + + /** + * Set the principalType property: The principalType property. + * + * @param principalType the principalType value to set. + * @return the RoleProperties object itself. + */ + public RoleProperties withPrincipalType(PrincipalType principalType) { + if (this.innerExternalIdentity() == null) { + this.innerExternalIdentity = new RolePropertiesExternalIdentity(); + } + this.innerExternalIdentity().withPrincipalType(principalType); + return this; + } + + /** + * Get the tenantId property: The tenantId property. + * + * @return the tenantId value. + */ + public String tenantId() { + return this.innerExternalIdentity() == null ? null : this.innerExternalIdentity().tenantId(); + } + + /** + * Set the tenantId property: The tenantId property. + * + * @param tenantId the tenantId value to set. + * @return the RoleProperties object itself. + */ + public RoleProperties withTenantId(String tenantId) { + if (this.innerExternalIdentity() == null) { + this.innerExternalIdentity = new RolePropertiesExternalIdentity(); + } + this.innerExternalIdentity().withTenantId(tenantId); + return this; + } + /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (password() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property password in model RoleProperties")); + if (innerExternalIdentity() != null) { + innerExternalIdentity().validate(); } } - - private static final ClientLogger LOGGER = new ClientLogger(RoleProperties.class); } diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/models/RolePropertiesExternalIdentity.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/models/RolePropertiesExternalIdentity.java new file mode 100644 index 000000000000..1f6119b5232d --- /dev/null +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/models/RolePropertiesExternalIdentity.java @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.cosmosdbforpostgresql.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.cosmosdbforpostgresql.models.PrincipalType; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The RolePropertiesExternalIdentity model. + */ +@Fluent +public final class RolePropertiesExternalIdentity { + /* + * The objectId property. + */ + @JsonProperty(value = "objectId", required = true) + private String objectId; + + /* + * The principalType property. + */ + @JsonProperty(value = "principalType", required = true) + private PrincipalType principalType; + + /* + * The tenantId property. + */ + @JsonProperty(value = "tenantId") + private String tenantId; + + /** + * Creates an instance of RolePropertiesExternalIdentity class. + */ + public RolePropertiesExternalIdentity() { + } + + /** + * Get the objectId property: The objectId property. + * + * @return the objectId value. + */ + public String objectId() { + return this.objectId; + } + + /** + * Set the objectId property: The objectId property. + * + * @param objectId the objectId value to set. + * @return the RolePropertiesExternalIdentity object itself. + */ + public RolePropertiesExternalIdentity withObjectId(String objectId) { + this.objectId = objectId; + return this; + } + + /** + * Get the principalType property: The principalType property. + * + * @return the principalType value. + */ + public PrincipalType principalType() { + return this.principalType; + } + + /** + * Set the principalType property: The principalType property. + * + * @param principalType the principalType value to set. + * @return the RolePropertiesExternalIdentity object itself. + */ + public RolePropertiesExternalIdentity withPrincipalType(PrincipalType principalType) { + this.principalType = principalType; + return this; + } + + /** + * Get the tenantId property: The tenantId property. + * + * @return the tenantId value. + */ + public String tenantId() { + return this.tenantId; + } + + /** + * Set the tenantId property: The tenantId property. + * + * @param tenantId the tenantId value to set. + * @return the RolePropertiesExternalIdentity object itself. + */ + public RolePropertiesExternalIdentity withTenantId(String tenantId) { + this.tenantId = tenantId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (objectId() == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property objectId in model RolePropertiesExternalIdentity")); + } + if (principalType() == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property principalType in model RolePropertiesExternalIdentity")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(RolePropertiesExternalIdentity.class); +} diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/models/ServerConfigurationInner.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/models/ServerConfigurationInner.java index 7ac043e1389c..648ce836ea9e 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/models/ServerConfigurationInner.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/models/ServerConfigurationInner.java @@ -11,7 +11,9 @@ import com.azure.resourcemanager.cosmosdbforpostgresql.models.ProvisioningState; import com.fasterxml.jackson.annotation.JsonProperty; -/** Represents a configuration. */ +/** + * Represents a configuration. + */ @Fluent public final class ServerConfigurationInner extends ProxyResource { /* @@ -26,13 +28,15 @@ public final class ServerConfigurationInner extends ProxyResource { @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; - /** Creates an instance of ServerConfigurationInner class. */ + /** + * Creates an instance of ServerConfigurationInner class. + */ public ServerConfigurationInner() { } /** * Get the innerProperties property: The properties of a configuration. - * + * * @return the innerProperties value. */ private ServerConfigurationProperties innerProperties() { @@ -41,7 +45,7 @@ private ServerConfigurationProperties innerProperties() { /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * + * * @return the systemData value. */ public SystemData systemData() { @@ -50,7 +54,7 @@ public SystemData systemData() { /** * Get the value property: Value of the configuration. - * + * * @return the value value. */ public String value() { @@ -59,7 +63,7 @@ public String value() { /** * Set the value property: Value of the configuration. - * + * * @param value the value value to set. * @return the ServerConfigurationInner object itself. */ @@ -73,7 +77,7 @@ public ServerConfigurationInner withValue(String value) { /** * Get the source property: Source of the configuration. - * + * * @return the source value. */ public String source() { @@ -82,7 +86,7 @@ public String source() { /** * Get the description property: Description of the configuration. - * + * * @return the description value. */ public String description() { @@ -91,7 +95,7 @@ public String description() { /** * Get the defaultValue property: Default value of the configuration. - * + * * @return the defaultValue value. */ public String defaultValue() { @@ -100,7 +104,7 @@ public String defaultValue() { /** * Get the dataType property: Data type of the configuration. - * + * * @return the dataType value. */ public ConfigurationDataType dataType() { @@ -109,7 +113,7 @@ public ConfigurationDataType dataType() { /** * Get the allowedValues property: Allowed values of the configuration. - * + * * @return the allowedValues value. */ public String allowedValues() { @@ -118,7 +122,7 @@ public String allowedValues() { /** * Get the requiresRestart property: If configuration change requires restart. - * + * * @return the requiresRestart value. */ public Boolean requiresRestart() { @@ -127,7 +131,7 @@ public Boolean requiresRestart() { /** * Get the provisioningState property: Provisioning state of the configuration. - * + * * @return the provisioningState value. */ public ProvisioningState provisioningState() { @@ -136,7 +140,7 @@ public ProvisioningState provisioningState() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/models/ServerConfigurationProperties.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/models/ServerConfigurationProperties.java index 57038b9bba76..2a6549277ec8 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/models/ServerConfigurationProperties.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/models/ServerConfigurationProperties.java @@ -10,7 +10,9 @@ import com.azure.resourcemanager.cosmosdbforpostgresql.models.ProvisioningState; import com.fasterxml.jackson.annotation.JsonProperty; -/** The properties of a configuration. */ +/** + * The properties of a configuration. + */ @Fluent public final class ServerConfigurationProperties { /* @@ -61,13 +63,15 @@ public final class ServerConfigurationProperties { @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private ProvisioningState provisioningState; - /** Creates an instance of ServerConfigurationProperties class. */ + /** + * Creates an instance of ServerConfigurationProperties class. + */ public ServerConfigurationProperties() { } /** * Get the value property: Value of the configuration. - * + * * @return the value value. */ public String value() { @@ -76,7 +80,7 @@ public String value() { /** * Set the value property: Value of the configuration. - * + * * @param value the value value to set. * @return the ServerConfigurationProperties object itself. */ @@ -87,7 +91,7 @@ public ServerConfigurationProperties withValue(String value) { /** * Get the source property: Source of the configuration. - * + * * @return the source value. */ public String source() { @@ -96,7 +100,7 @@ public String source() { /** * Get the description property: Description of the configuration. - * + * * @return the description value. */ public String description() { @@ -105,7 +109,7 @@ public String description() { /** * Get the defaultValue property: Default value of the configuration. - * + * * @return the defaultValue value. */ public String defaultValue() { @@ -114,7 +118,7 @@ public String defaultValue() { /** * Get the dataType property: Data type of the configuration. - * + * * @return the dataType value. */ public ConfigurationDataType dataType() { @@ -123,7 +127,7 @@ public ConfigurationDataType dataType() { /** * Get the allowedValues property: Allowed values of the configuration. - * + * * @return the allowedValues value. */ public String allowedValues() { @@ -132,7 +136,7 @@ public String allowedValues() { /** * Get the requiresRestart property: If configuration change requires restart. - * + * * @return the requiresRestart value. */ public Boolean requiresRestart() { @@ -141,7 +145,7 @@ public Boolean requiresRestart() { /** * Get the provisioningState property: Provisioning state of the configuration. - * + * * @return the provisioningState value. */ public ProvisioningState provisioningState() { @@ -150,15 +154,13 @@ public ProvisioningState provisioningState() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (value() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property value in model ServerConfigurationProperties")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property value in model ServerConfigurationProperties")); } } diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/models/package-info.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/models/package-info.java index c8e5f81ab2d3..e3459212be87 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/models/package-info.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/models/package-info.java @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. /** - * Package containing the inner data models for CosmosDBForPostgreSql. Azure Cosmos DB for PostgreSQL database service - * resource provider REST APIs. + * Package containing the inner data models for CosmosDBForPostgreSql. + * Azure Cosmos DB for PostgreSQL database service resource provider REST APIs. */ package com.azure.resourcemanager.cosmosdbforpostgresql.fluent.models; diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/package-info.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/package-info.java index 7b95ca7d7afd..635ba5c27558 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/package-info.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/fluent/package-info.java @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. /** - * Package containing the service clients for CosmosDBForPostgreSql. Azure Cosmos DB for PostgreSQL database service - * resource provider REST APIs. + * Package containing the service clients for CosmosDBForPostgreSql. + * Azure Cosmos DB for PostgreSQL database service resource provider REST APIs. */ package com.azure.resourcemanager.cosmosdbforpostgresql.fluent; diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/ClusterImpl.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/ClusterImpl.java index 647d161b56c5..afae3dba643b 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/ClusterImpl.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/ClusterImpl.java @@ -8,9 +8,11 @@ import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.cosmosdbforpostgresql.fluent.models.ClusterInner; +import com.azure.resourcemanager.cosmosdbforpostgresql.models.AuthConfig; import com.azure.resourcemanager.cosmosdbforpostgresql.models.Cluster; import com.azure.resourcemanager.cosmosdbforpostgresql.models.ClusterForUpdate; import com.azure.resourcemanager.cosmosdbforpostgresql.models.MaintenanceWindow; +import com.azure.resourcemanager.cosmosdbforpostgresql.models.PromoteRequest; import com.azure.resourcemanager.cosmosdbforpostgresql.models.ServerNameItem; import com.azure.resourcemanager.cosmosdbforpostgresql.models.SimplePrivateEndpointConnection; import java.time.OffsetDateTime; @@ -171,6 +173,18 @@ public List privateEndpointConnections() { } } + public String databaseName() { + return this.innerModel().databaseName(); + } + + public Boolean enableGeoBackup() { + return this.innerModel().enableGeoBackup(); + } + + public AuthConfig authConfig() { + return this.innerModel().authConfig(); + } + public Region region() { return Region.fromName(this.regionName()); } @@ -203,25 +217,19 @@ public ClusterImpl withExistingResourceGroup(String resourceGroupName) { } public Cluster create() { - this.innerObject = - serviceManager - .serviceClient() - .getClusters() - .create(resourceGroupName, clusterName, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient().getClusters().create(resourceGroupName, clusterName, + this.innerModel(), Context.NONE); return this; } public Cluster create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getClusters() - .create(resourceGroupName, clusterName, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient().getClusters().create(resourceGroupName, clusterName, + this.innerModel(), context); return this; } - ClusterImpl( - String name, com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager serviceManager) { + ClusterImpl(String name, + com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager serviceManager) { this.innerObject = new ClusterInner(); this.serviceManager = serviceManager; this.clusterName = name; @@ -233,49 +241,34 @@ public ClusterImpl update() { } public Cluster apply() { - this.innerObject = - serviceManager - .serviceClient() - .getClusters() - .update(resourceGroupName, clusterName, updateParameters, Context.NONE); + this.innerObject = serviceManager.serviceClient().getClusters().update(resourceGroupName, clusterName, + updateParameters, Context.NONE); return this; } public Cluster apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getClusters() - .update(resourceGroupName, clusterName, updateParameters, context); + this.innerObject = serviceManager.serviceClient().getClusters().update(resourceGroupName, clusterName, + updateParameters, context); return this; } - ClusterImpl( - ClusterInner innerObject, + ClusterImpl(ClusterInner innerObject, com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.clusterName = Utils.getValueFromIdByName(innerObject.id(), "serverGroupsv2"); + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.clusterName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "serverGroupsv2"); } public Cluster refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getClusters() - .getByResourceGroupWithResponse(resourceGroupName, clusterName, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getClusters() + .getByResourceGroupWithResponse(resourceGroupName, clusterName, Context.NONE).getValue(); return this; } public Cluster refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getClusters() - .getByResourceGroupWithResponse(resourceGroupName, clusterName, context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getClusters() + .getByResourceGroupWithResponse(resourceGroupName, clusterName, context).getValue(); return this; } @@ -307,8 +300,8 @@ public void promoteReadReplica() { serviceManager.clusters().promoteReadReplica(resourceGroupName, clusterName); } - public void promoteReadReplica(Context context) { - serviceManager.clusters().promoteReadReplica(resourceGroupName, clusterName, context); + public void promoteReadReplica(PromoteRequest promoteRequest, Context context) { + serviceManager.clusters().promoteReadReplica(resourceGroupName, clusterName, promoteRequest, context); } public ClusterImpl withRegion(Region location) { @@ -501,6 +494,21 @@ public ClusterImpl withPointInTimeUtc(OffsetDateTime pointInTimeUtc) { return this; } + public ClusterImpl withDatabaseName(String databaseName) { + this.innerModel().withDatabaseName(databaseName); + return this; + } + + public ClusterImpl withEnableGeoBackup(Boolean enableGeoBackup) { + this.innerModel().withEnableGeoBackup(enableGeoBackup); + return this; + } + + public ClusterImpl withAuthConfig(AuthConfig authConfig) { + this.innerModel().withAuthConfig(authConfig); + return this; + } + private boolean isInCreateMode() { return this.innerModel().id() == null; } diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/ClusterServerImpl.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/ClusterServerImpl.java index e35c4acace80..413ccee27f1e 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/ClusterServerImpl.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/ClusterServerImpl.java @@ -14,8 +14,7 @@ public final class ClusterServerImpl implements ClusterServer { private final com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager serviceManager; - ClusterServerImpl( - ClusterServerInner innerObject, + ClusterServerImpl(ClusterServerInner innerObject, com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/ClustersClientImpl.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/ClustersClientImpl.java index 815d4af7b178..c445bcf5c570 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/ClustersClientImpl.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/ClustersClientImpl.java @@ -39,21 +39,28 @@ import com.azure.resourcemanager.cosmosdbforpostgresql.models.ClusterForUpdate; import com.azure.resourcemanager.cosmosdbforpostgresql.models.ClusterListResult; import com.azure.resourcemanager.cosmosdbforpostgresql.models.NameAvailabilityRequest; +import com.azure.resourcemanager.cosmosdbforpostgresql.models.PromoteRequest; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in ClustersClient. */ +/** + * An instance of this class provides access to all the operations defined in ClustersClient. + */ public final class ClustersClientImpl implements ClustersClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final ClustersService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final CosmosDBForPostgreSqlImpl client; /** * Initializes an instance of ClustersClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ ClustersClientImpl(CosmosDBForPostgreSqlImpl client) { @@ -68,180 +75,126 @@ public final class ClustersClientImpl implements ClustersClient { @Host("{$host}") @ServiceInterface(name = "CosmosDBForPostgreSq") public interface ClustersService { - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.DBforPostgreSQL/serverGroupsv2") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, - Context context); + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/serverGroupsv2") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/serverGroupsv2") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @HeaderParam("Accept") String accept, + Mono> listByResourceGroup(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/serverGroupsv2/{clusterName}") - @ExpectedResponses({200, 201}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/serverGroupsv2/{clusterName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("clusterName") String clusterName, - @BodyParam("application/json") ClusterInner parameters, - @HeaderParam("Accept") String accept, + Mono>> create(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @BodyParam("application/json") ClusterInner parameters, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/serverGroupsv2/{clusterName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/serverGroupsv2/{clusterName}") + @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("clusterName") String clusterName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/serverGroupsv2/{clusterName}") - @ExpectedResponses({200, 202, 204}) + Mono> getByResourceGroup(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/serverGroupsv2/{clusterName}") + @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("clusterName") String clusterName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/serverGroupsv2/{clusterName}") - @ExpectedResponses({200, 202}) + Mono>> delete(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/serverGroupsv2/{clusterName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("clusterName") String clusterName, - @BodyParam("application/json") ClusterForUpdate parameters, - @HeaderParam("Accept") String accept, + Mono>> update(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @BodyParam("application/json") ClusterForUpdate parameters, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/serverGroupsv2/{clusterName}/restart") - @ExpectedResponses({202}) + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/serverGroupsv2/{clusterName}/restart") + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> restart( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("clusterName") String clusterName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/serverGroupsv2/{clusterName}/start") - @ExpectedResponses({200, 202}) + Mono>> restart(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/serverGroupsv2/{clusterName}/start") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> start( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("clusterName") String clusterName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/serverGroupsv2/{clusterName}/stop") - @ExpectedResponses({200, 202}) + Mono>> start(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/serverGroupsv2/{clusterName}/stop") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> stop( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("clusterName") String clusterName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/serverGroupsv2/{clusterName}/promote") - @ExpectedResponses({202}) + Mono>> stop(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/serverGroupsv2/{clusterName}/promote") + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> promoteReadReplica( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("clusterName") String clusterName, - @HeaderParam("Accept") String accept, + Mono>> promoteReadReplica(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @BodyParam("application/json") PromoteRequest promoteRequest, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/providers/Microsoft.DBforPostgreSQL/checkNameAvailability") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> checkNameAvailability( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, + Mono> checkNameAvailability(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @BodyParam("application/json") NameAvailabilityRequest nameAvailabilityRequest, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Lists all clusters in a subscription. - * + * * @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 clusters along with {@link PagedResponse} on successful completion of {@link Mono}. @@ -249,43 +202,25 @@ Mono> listByResourceGroupNext( @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.")); + 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.")); + 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(), - this.client.getSubscriptionId(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), 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 clusters in a subscription. - * + * * @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. @@ -295,40 +230,25 @@ private Mono> listSinglePageAsync() { @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - accept, + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Lists all clusters in a subscription. - * + * * @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 clusters as paginated response with {@link PagedFlux}. @@ -340,7 +260,7 @@ private PagedFlux listAsync() { /** * Lists all clusters in a subscription. - * + * * @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. @@ -349,13 +269,13 @@ private PagedFlux listAsync() { */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(context), nextLink -> listNextSinglePageAsync(nextLink, context)); + return new PagedFlux<>(() -> listSinglePageAsync(context), + nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * Lists all clusters in a subscription. - * + * * @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 clusters as paginated response with {@link PagedIterable}. @@ -367,7 +287,7 @@ public PagedIterable list() { /** * Lists all clusters in a subscription. - * + * * @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. @@ -381,7 +301,7 @@ public PagedIterable list(Context context) { /** * Lists all clusters in a resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -391,16 +311,12 @@ public PagedIterable list(Context context) { @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.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -408,31 +324,16 @@ private Mono> listByResourceGroupSinglePageAsync(Str } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByResourceGroup( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, 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 clusters in a resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -441,19 +342,15 @@ private Mono> listByResourceGroupSinglePageAsync(Str * @return a list of clusters along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync( - String resourceGroupName, Context context) { + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -462,27 +359,15 @@ private Mono> listByResourceGroupSinglePageAsync( final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByResourceGroup( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Lists all clusters in a resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -491,14 +376,13 @@ private Mono> listByResourceGroupSinglePageAsync( */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName), + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } /** * Lists all clusters in a resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -508,14 +392,13 @@ private PagedFlux listByResourceGroupAsync(String resourceGroupNam */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { - return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName, context), + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); } /** * Lists all clusters in a resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -529,7 +412,7 @@ public PagedIterable listByResourceGroup(String resourceGroupName) /** * Lists all clusters in a resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -544,7 +427,7 @@ public PagedIterable listByResourceGroup(String resourceGroupName, /** * Creates a new cluster with servers. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param parameters The required parameters for creating or updating a cluster. @@ -554,19 +437,15 @@ public PagedIterable listByResourceGroup(String resourceGroupName, * @return represents a cluster along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync( - String resourceGroupName, String clusterName, ClusterInner parameters) { + private Mono>> createWithResponseAsync(String resourceGroupName, String clusterName, + ClusterInner parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -582,24 +461,14 @@ private Mono>> createWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .create( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - clusterName, - parameters, - accept, - context)) + .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates a new cluster with servers. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param parameters The required parameters for creating or updating a cluster. @@ -610,19 +479,15 @@ private Mono>> createWithResponseAsync( * @return represents a cluster along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync( - String resourceGroupName, String clusterName, ClusterInner parameters, Context context) { + private Mono>> createWithResponseAsync(String resourceGroupName, String clusterName, + ClusterInner parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -638,21 +503,13 @@ private Mono>> createWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .create( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - clusterName, - parameters, - accept, - context); + return service.create(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, parameters, accept, context); } /** * Creates a new cluster with servers. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param parameters The required parameters for creating or updating a cluster. @@ -662,18 +519,16 @@ private Mono>> createWithResponseAsync( * @return the {@link PollerFlux} for polling of represents a cluster. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ClusterInner> beginCreateAsync( - String resourceGroupName, String clusterName, ClusterInner parameters) { + private PollerFlux, ClusterInner> beginCreateAsync(String resourceGroupName, + String clusterName, ClusterInner parameters) { Mono>> mono = createWithResponseAsync(resourceGroupName, clusterName, parameters); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), ClusterInner.class, ClusterInner.class, this.client.getContext()); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ClusterInner.class, ClusterInner.class, this.client.getContext()); } /** * Creates a new cluster with servers. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param parameters The required parameters for creating or updating a cluster. @@ -684,20 +539,18 @@ private PollerFlux, ClusterInner> beginCreateAsync( * @return the {@link PollerFlux} for polling of represents a cluster. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ClusterInner> beginCreateAsync( - String resourceGroupName, String clusterName, ClusterInner parameters, Context context) { + private PollerFlux, ClusterInner> beginCreateAsync(String resourceGroupName, + String clusterName, ClusterInner parameters, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - createWithResponseAsync(resourceGroupName, clusterName, parameters, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), ClusterInner.class, ClusterInner.class, context); + Mono>> mono + = createWithResponseAsync(resourceGroupName, clusterName, parameters, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ClusterInner.class, ClusterInner.class, context); } /** * Creates a new cluster with servers. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param parameters The required parameters for creating or updating a cluster. @@ -707,14 +560,14 @@ private PollerFlux, ClusterInner> beginCreateAsync( * @return the {@link SyncPoller} for polling of represents a cluster. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ClusterInner> beginCreate( - String resourceGroupName, String clusterName, ClusterInner parameters) { + public SyncPoller, ClusterInner> beginCreate(String resourceGroupName, String clusterName, + ClusterInner parameters) { return this.beginCreateAsync(resourceGroupName, clusterName, parameters).getSyncPoller(); } /** * Creates a new cluster with servers. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param parameters The required parameters for creating or updating a cluster. @@ -725,14 +578,14 @@ public SyncPoller, ClusterInner> beginCreate( * @return the {@link SyncPoller} for polling of represents a cluster. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ClusterInner> beginCreate( - String resourceGroupName, String clusterName, ClusterInner parameters, Context context) { + public SyncPoller, ClusterInner> beginCreate(String resourceGroupName, String clusterName, + ClusterInner parameters, Context context) { return this.beginCreateAsync(resourceGroupName, clusterName, parameters, context).getSyncPoller(); } /** * Creates a new cluster with servers. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param parameters The required parameters for creating or updating a cluster. @@ -743,14 +596,13 @@ public SyncPoller, ClusterInner> beginCreate( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createAsync(String resourceGroupName, String clusterName, ClusterInner parameters) { - return beginCreateAsync(resourceGroupName, clusterName, parameters) - .last() + return beginCreateAsync(resourceGroupName, clusterName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Creates a new cluster with servers. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param parameters The required parameters for creating or updating a cluster. @@ -761,16 +613,15 @@ private Mono createAsync(String resourceGroupName, String clusterN * @return represents a cluster on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync( - String resourceGroupName, String clusterName, ClusterInner parameters, Context context) { - return beginCreateAsync(resourceGroupName, clusterName, parameters, context) - .last() + private Mono createAsync(String resourceGroupName, String clusterName, ClusterInner parameters, + Context context) { + return beginCreateAsync(resourceGroupName, clusterName, parameters, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Creates a new cluster with servers. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param parameters The required parameters for creating or updating a cluster. @@ -786,7 +637,7 @@ public ClusterInner create(String resourceGroupName, String clusterName, Cluster /** * Creates a new cluster with servers. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param parameters The required parameters for creating or updating a cluster. @@ -804,29 +655,25 @@ public ClusterInner create(String resourceGroupName, String clusterName, Cluster /** * Gets information about a cluster such as compute and storage configuration and cluster lifecycle metadata such as * cluster creation date and time. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @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 cluster such as compute and storage configuration and cluster lifecycle metadata such - * as cluster creation date and time along with {@link Response} on successful completion of {@link Mono}. + * as cluster creation date and time along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String clusterName) { + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String clusterName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -837,24 +684,15 @@ private Mono> getByResourceGroupWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .getByResourceGroup( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - clusterName, - accept, - context)) + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets information about a cluster such as compute and storage configuration and cluster lifecycle metadata such as * cluster creation date and time. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param context The context to associate with this operation. @@ -862,22 +700,18 @@ private Mono> getByResourceGroupWithResponseAsync( * @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 cluster such as compute and storage configuration and cluster lifecycle metadata such - * as cluster creation date and time along with {@link Response} on successful completion of {@link Mono}. + * as cluster creation date and time along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String clusterName, Context context) { + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String clusterName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -888,28 +722,21 @@ private Mono> getByResourceGroupWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .getByResourceGroup( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - clusterName, - accept, - context); + return service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, accept, context); } /** * Gets information about a cluster such as compute and storage configuration and cluster lifecycle metadata such as * cluster creation date and time. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @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 cluster such as compute and storage configuration and cluster lifecycle metadata such - * as cluster creation date and time on successful completion of {@link Mono}. + * as cluster creation date and time on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getByResourceGroupAsync(String resourceGroupName, String clusterName) { @@ -920,7 +747,7 @@ private Mono getByResourceGroupAsync(String resourceGroupName, Str /** * Gets information about a cluster such as compute and storage configuration and cluster lifecycle metadata such as * cluster creation date and time. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param context The context to associate with this operation. @@ -928,25 +755,25 @@ private Mono getByResourceGroupAsync(String resourceGroupName, Str * @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 cluster such as compute and storage configuration and cluster lifecycle metadata such - * as cluster creation date and time along with {@link Response}. + * as cluster creation date and time along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse( - String resourceGroupName, String clusterName, Context context) { + public Response getByResourceGroupWithResponse(String resourceGroupName, String clusterName, + Context context) { return getByResourceGroupWithResponseAsync(resourceGroupName, clusterName, context).block(); } /** * Gets information about a cluster such as compute and storage configuration and cluster lifecycle metadata such as * cluster creation date and time. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @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 cluster such as compute and storage configuration and cluster lifecycle metadata such - * as cluster creation date and time. + * as cluster creation date and time. */ @ServiceMethod(returns = ReturnType.SINGLE) public ClusterInner getByResourceGroup(String resourceGroupName, String clusterName) { @@ -955,7 +782,7 @@ public ClusterInner getByResourceGroup(String resourceGroupName, String clusterN /** * Deletes a cluster together with servers in it. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -966,16 +793,12 @@ public ClusterInner getByResourceGroup(String resourceGroupName, String clusterN @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String resourceGroupName, String clusterName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -986,23 +809,14 @@ private Mono>> deleteWithResponseAsync(String resource } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - clusterName, - accept, - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes a cluster together with servers in it. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param context The context to associate with this operation. @@ -1012,19 +826,15 @@ private Mono>> deleteWithResponseAsync(String resource * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String clusterName, Context context) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String clusterName, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1035,20 +845,13 @@ private Mono>> deleteWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - clusterName, - accept, - context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, accept, context); } /** * Deletes a cluster together with servers in it. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1059,15 +862,13 @@ private Mono>> deleteWithResponseAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String clusterName) { Mono>> mono = deleteWithResponseAsync(resourceGroupName, clusterName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Deletes a cluster together with servers in it. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param context The context to associate with this operation. @@ -1077,18 +878,17 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String clusterName, Context context) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String clusterName, + Context context) { context = this.client.mergeContext(context); Mono>> mono = deleteWithResponseAsync(resourceGroupName, clusterName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * Deletes a cluster together with servers in it. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1103,7 +903,7 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, /** * Deletes a cluster together with servers in it. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param context The context to associate with this operation. @@ -1113,14 +913,14 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String clusterName, Context context) { + public SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, + Context context) { return this.beginDeleteAsync(resourceGroupName, clusterName, context).getSyncPoller(); } /** * Deletes a cluster together with servers in it. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1135,7 +935,7 @@ private Mono deleteAsync(String resourceGroupName, String clusterName) { /** * Deletes a cluster together with servers in it. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param context The context to associate with this operation. @@ -1146,14 +946,13 @@ private Mono deleteAsync(String resourceGroupName, String clusterName) { */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String clusterName, Context context) { - return beginDeleteAsync(resourceGroupName, clusterName, context) - .last() + return beginDeleteAsync(resourceGroupName, clusterName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Deletes a cluster together with servers in it. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1167,7 +966,7 @@ public void delete(String resourceGroupName, String clusterName) { /** * Deletes a cluster together with servers in it. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param context The context to associate with this operation. @@ -1182,7 +981,7 @@ public void delete(String resourceGroupName, String clusterName, Context context /** * Updates an existing cluster. The request body can contain one or several properties from the cluster definition. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param parameters The parameters for updating a cluster. @@ -1192,19 +991,15 @@ public void delete(String resourceGroupName, String clusterName, Context context * @return represents a cluster along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync( - String resourceGroupName, String clusterName, ClusterForUpdate parameters) { + private Mono>> updateWithResponseAsync(String resourceGroupName, String clusterName, + ClusterForUpdate parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1220,24 +1015,14 @@ private Mono>> updateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .update( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - clusterName, - parameters, - accept, - context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Updates an existing cluster. The request body can contain one or several properties from the cluster definition. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param parameters The parameters for updating a cluster. @@ -1248,19 +1033,15 @@ private Mono>> updateWithResponseAsync( * @return represents a cluster along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync( - String resourceGroupName, String clusterName, ClusterForUpdate parameters, Context context) { + private Mono>> updateWithResponseAsync(String resourceGroupName, String clusterName, + ClusterForUpdate parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1276,21 +1057,13 @@ private Mono>> updateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .update( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - clusterName, - parameters, - accept, - context); + return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, parameters, accept, context); } /** * Updates an existing cluster. The request body can contain one or several properties from the cluster definition. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param parameters The parameters for updating a cluster. @@ -1300,18 +1073,16 @@ private Mono>> updateWithResponseAsync( * @return the {@link PollerFlux} for polling of represents a cluster. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ClusterInner> beginUpdateAsync( - String resourceGroupName, String clusterName, ClusterForUpdate parameters) { + private PollerFlux, ClusterInner> beginUpdateAsync(String resourceGroupName, + String clusterName, ClusterForUpdate parameters) { Mono>> mono = updateWithResponseAsync(resourceGroupName, clusterName, parameters); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), ClusterInner.class, ClusterInner.class, this.client.getContext()); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ClusterInner.class, ClusterInner.class, this.client.getContext()); } /** * Updates an existing cluster. The request body can contain one or several properties from the cluster definition. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param parameters The parameters for updating a cluster. @@ -1322,20 +1093,18 @@ private PollerFlux, ClusterInner> beginUpdateAsync( * @return the {@link PollerFlux} for polling of represents a cluster. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ClusterInner> beginUpdateAsync( - String resourceGroupName, String clusterName, ClusterForUpdate parameters, Context context) { + private PollerFlux, ClusterInner> beginUpdateAsync(String resourceGroupName, + String clusterName, ClusterForUpdate parameters, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - updateWithResponseAsync(resourceGroupName, clusterName, parameters, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), ClusterInner.class, ClusterInner.class, context); + Mono>> mono + = updateWithResponseAsync(resourceGroupName, clusterName, parameters, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ClusterInner.class, ClusterInner.class, context); } /** * Updates an existing cluster. The request body can contain one or several properties from the cluster definition. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param parameters The parameters for updating a cluster. @@ -1345,14 +1114,14 @@ private PollerFlux, ClusterInner> beginUpdateAsync( * @return the {@link SyncPoller} for polling of represents a cluster. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ClusterInner> beginUpdate( - String resourceGroupName, String clusterName, ClusterForUpdate parameters) { + public SyncPoller, ClusterInner> beginUpdate(String resourceGroupName, String clusterName, + ClusterForUpdate parameters) { return this.beginUpdateAsync(resourceGroupName, clusterName, parameters).getSyncPoller(); } /** * Updates an existing cluster. The request body can contain one or several properties from the cluster definition. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param parameters The parameters for updating a cluster. @@ -1363,14 +1132,14 @@ public SyncPoller, ClusterInner> beginUpdate( * @return the {@link SyncPoller} for polling of represents a cluster. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ClusterInner> beginUpdate( - String resourceGroupName, String clusterName, ClusterForUpdate parameters, Context context) { + public SyncPoller, ClusterInner> beginUpdate(String resourceGroupName, String clusterName, + ClusterForUpdate parameters, Context context) { return this.beginUpdateAsync(resourceGroupName, clusterName, parameters, context).getSyncPoller(); } /** * Updates an existing cluster. The request body can contain one or several properties from the cluster definition. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param parameters The parameters for updating a cluster. @@ -1381,14 +1150,13 @@ public SyncPoller, ClusterInner> beginUpdate( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync(String resourceGroupName, String clusterName, ClusterForUpdate parameters) { - return beginUpdateAsync(resourceGroupName, clusterName, parameters) - .last() + return beginUpdateAsync(resourceGroupName, clusterName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Updates an existing cluster. The request body can contain one or several properties from the cluster definition. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param parameters The parameters for updating a cluster. @@ -1399,16 +1167,15 @@ private Mono updateAsync(String resourceGroupName, String clusterN * @return represents a cluster on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, String clusterName, ClusterForUpdate parameters, Context context) { - return beginUpdateAsync(resourceGroupName, clusterName, parameters, context) - .last() + private Mono updateAsync(String resourceGroupName, String clusterName, ClusterForUpdate parameters, + Context context) { + return beginUpdateAsync(resourceGroupName, clusterName, parameters, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Updates an existing cluster. The request body can contain one or several properties from the cluster definition. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param parameters The parameters for updating a cluster. @@ -1424,7 +1191,7 @@ public ClusterInner update(String resourceGroupName, String clusterName, Cluster /** * Updates an existing cluster. The request body can contain one or several properties from the cluster definition. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param parameters The parameters for updating a cluster. @@ -1435,14 +1202,14 @@ public ClusterInner update(String resourceGroupName, String clusterName, Cluster * @return represents a cluster. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ClusterInner update( - String resourceGroupName, String clusterName, ClusterForUpdate parameters, Context context) { + public ClusterInner update(String resourceGroupName, String clusterName, ClusterForUpdate parameters, + Context context) { return updateAsync(resourceGroupName, clusterName, parameters, context).block(); } /** * Restarts all nodes in the cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1453,16 +1220,12 @@ public ClusterInner update( @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> restartWithResponseAsync(String resourceGroupName, String clusterName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1473,23 +1236,14 @@ private Mono>> restartWithResponseAsync(String resourc } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .restart( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - clusterName, - accept, - context)) + .withContext(context -> service.restart(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Restarts all nodes in the cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param context The context to associate with this operation. @@ -1499,19 +1253,15 @@ private Mono>> restartWithResponseAsync(String resourc * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> restartWithResponseAsync( - String resourceGroupName, String clusterName, Context context) { + private Mono>> restartWithResponseAsync(String resourceGroupName, String clusterName, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1522,20 +1272,13 @@ private Mono>> restartWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .restart( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - clusterName, - accept, - context); + return service.restart(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, accept, context); } /** * Restarts all nodes in the cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1546,15 +1289,13 @@ private Mono>> restartWithResponseAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginRestartAsync(String resourceGroupName, String clusterName) { Mono>> mono = restartWithResponseAsync(resourceGroupName, clusterName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Restarts all nodes in the cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param context The context to associate with this operation. @@ -1564,18 +1305,17 @@ private PollerFlux, Void> beginRestartAsync(String resourceGrou * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginRestartAsync( - String resourceGroupName, String clusterName, Context context) { + private PollerFlux, Void> beginRestartAsync(String resourceGroupName, String clusterName, + Context context) { context = this.client.mergeContext(context); Mono>> mono = restartWithResponseAsync(resourceGroupName, clusterName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * Restarts all nodes in the cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1590,7 +1330,7 @@ public SyncPoller, Void> beginRestart(String resourceGroupName, /** * Restarts all nodes in the cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param context The context to associate with this operation. @@ -1600,14 +1340,14 @@ public SyncPoller, Void> beginRestart(String resourceGroupName, * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginRestart( - String resourceGroupName, String clusterName, Context context) { + public SyncPoller, Void> beginRestart(String resourceGroupName, String clusterName, + Context context) { return this.beginRestartAsync(resourceGroupName, clusterName, context).getSyncPoller(); } /** * Restarts all nodes in the cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1622,7 +1362,7 @@ private Mono restartAsync(String resourceGroupName, String clusterName) { /** * Restarts all nodes in the cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param context The context to associate with this operation. @@ -1633,14 +1373,13 @@ private Mono restartAsync(String resourceGroupName, String clusterName) { */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono restartAsync(String resourceGroupName, String clusterName, Context context) { - return beginRestartAsync(resourceGroupName, clusterName, context) - .last() + return beginRestartAsync(resourceGroupName, clusterName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Restarts all nodes in the cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1654,7 +1393,7 @@ public void restart(String resourceGroupName, String clusterName) { /** * Restarts all nodes in the cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param context The context to associate with this operation. @@ -1669,7 +1408,7 @@ public void restart(String resourceGroupName, String clusterName, Context contex /** * Starts stopped compute on all cluster nodes. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1680,16 +1419,12 @@ public void restart(String resourceGroupName, String clusterName, Context contex @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> startWithResponseAsync(String resourceGroupName, String clusterName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1700,23 +1435,14 @@ private Mono>> startWithResponseAsync(String resourceG } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .start( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - clusterName, - accept, - context)) + .withContext(context -> service.start(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Starts stopped compute on all cluster nodes. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param context The context to associate with this operation. @@ -1726,19 +1452,15 @@ private Mono>> startWithResponseAsync(String resourceG * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> startWithResponseAsync( - String resourceGroupName, String clusterName, Context context) { + private Mono>> startWithResponseAsync(String resourceGroupName, String clusterName, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1749,20 +1471,13 @@ private Mono>> startWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .start( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - clusterName, - accept, - context); + return service.start(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, accept, context); } /** * Starts stopped compute on all cluster nodes. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1773,15 +1488,13 @@ private Mono>> startWithResponseAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginStartAsync(String resourceGroupName, String clusterName) { Mono>> mono = startWithResponseAsync(resourceGroupName, clusterName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Starts stopped compute on all cluster nodes. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param context The context to associate with this operation. @@ -1791,18 +1504,17 @@ private PollerFlux, Void> beginStartAsync(String resourceGroupN * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginStartAsync( - String resourceGroupName, String clusterName, Context context) { + private PollerFlux, Void> beginStartAsync(String resourceGroupName, String clusterName, + Context context) { context = this.client.mergeContext(context); Mono>> mono = startWithResponseAsync(resourceGroupName, clusterName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * Starts stopped compute on all cluster nodes. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1817,7 +1529,7 @@ public SyncPoller, Void> beginStart(String resourceGroupName, S /** * Starts stopped compute on all cluster nodes. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param context The context to associate with this operation. @@ -1827,14 +1539,14 @@ public SyncPoller, Void> beginStart(String resourceGroupName, S * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginStart( - String resourceGroupName, String clusterName, Context context) { + public SyncPoller, Void> beginStart(String resourceGroupName, String clusterName, + Context context) { return this.beginStartAsync(resourceGroupName, clusterName, context).getSyncPoller(); } /** * Starts stopped compute on all cluster nodes. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1849,7 +1561,7 @@ private Mono startAsync(String resourceGroupName, String clusterName) { /** * Starts stopped compute on all cluster nodes. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param context The context to associate with this operation. @@ -1860,14 +1572,13 @@ private Mono startAsync(String resourceGroupName, String clusterName) { */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono startAsync(String resourceGroupName, String clusterName, Context context) { - return beginStartAsync(resourceGroupName, clusterName, context) - .last() + return beginStartAsync(resourceGroupName, clusterName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Starts stopped compute on all cluster nodes. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1881,7 +1592,7 @@ public void start(String resourceGroupName, String clusterName) { /** * Starts stopped compute on all cluster nodes. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param context The context to associate with this operation. @@ -1896,7 +1607,7 @@ public void start(String resourceGroupName, String clusterName, Context context) /** * Stops compute on all cluster nodes. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1907,16 +1618,12 @@ public void start(String resourceGroupName, String clusterName, Context context) @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> stopWithResponseAsync(String resourceGroupName, String clusterName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1927,23 +1634,14 @@ private Mono>> stopWithResponseAsync(String resourceGr } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .stop( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - clusterName, - accept, - context)) + .withContext(context -> service.stop(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Stops compute on all cluster nodes. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param context The context to associate with this operation. @@ -1953,19 +1651,15 @@ private Mono>> stopWithResponseAsync(String resourceGr * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> stopWithResponseAsync( - String resourceGroupName, String clusterName, Context context) { + private Mono>> stopWithResponseAsync(String resourceGroupName, String clusterName, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1976,20 +1670,13 @@ private Mono>> stopWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .stop( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - clusterName, - accept, - context); + return service.stop(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, accept, context); } /** * Stops compute on all cluster nodes. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2000,15 +1687,13 @@ private Mono>> stopWithResponseAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginStopAsync(String resourceGroupName, String clusterName) { Mono>> mono = stopWithResponseAsync(resourceGroupName, clusterName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Stops compute on all cluster nodes. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param context The context to associate with this operation. @@ -2018,18 +1703,17 @@ private PollerFlux, Void> beginStopAsync(String resourceGroupNa * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginStopAsync( - String resourceGroupName, String clusterName, Context context) { + private PollerFlux, Void> beginStopAsync(String resourceGroupName, String clusterName, + Context context) { context = this.client.mergeContext(context); Mono>> mono = stopWithResponseAsync(resourceGroupName, clusterName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * Stops compute on all cluster nodes. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2044,7 +1728,7 @@ public SyncPoller, Void> beginStop(String resourceGroupName, St /** * Stops compute on all cluster nodes. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param context The context to associate with this operation. @@ -2060,7 +1744,7 @@ public SyncPoller, Void> beginStop(String resourceGroupName, St /** * Stops compute on all cluster nodes. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2075,7 +1759,7 @@ private Mono stopAsync(String resourceGroupName, String clusterName) { /** * Stops compute on all cluster nodes. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param context The context to associate with this operation. @@ -2086,14 +1770,13 @@ private Mono stopAsync(String resourceGroupName, String clusterName) { */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono stopAsync(String resourceGroupName, String clusterName, Context context) { - return beginStopAsync(resourceGroupName, clusterName, context) - .last() + return beginStopAsync(resourceGroupName, clusterName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Stops compute on all cluster nodes. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2107,7 +1790,7 @@ public void stop(String resourceGroupName, String clusterName) { /** * Stops compute on all cluster nodes. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param context The context to associate with this operation. @@ -2122,28 +1805,25 @@ public void stop(String resourceGroupName, String clusterName, Context context) /** * Promotes read replica cluster to an independent read-write cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. + * @param promoteRequest The parameter for enabling geo-redundant backup while promoting read replica. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> promoteReadReplicaWithResponseAsync( - String resourceGroupName, String clusterName) { + private Mono>> promoteReadReplicaWithResponseAsync(String resourceGroupName, + String clusterName, PromoteRequest promoteRequest) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -2152,27 +1832,22 @@ private Mono>> promoteReadReplicaWithResponseAsync( if (clusterName == null) { return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); } + if (promoteRequest != null) { + promoteRequest.validate(); + } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .promoteReadReplica( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - clusterName, - accept, - context)) + .withContext(context -> service.promoteReadReplica(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, promoteRequest, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Promotes read replica cluster to an independent read-write cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. + * @param promoteRequest The parameter for enabling geo-redundant backup while promoting read replica. * @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. @@ -2180,19 +1855,15 @@ private Mono>> promoteReadReplicaWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> promoteReadReplicaWithResponseAsync( - String resourceGroupName, String clusterName, Context context) { + private Mono>> promoteReadReplicaWithResponseAsync(String resourceGroupName, + String clusterName, PromoteRequest promoteRequest, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -2201,44 +1872,61 @@ private Mono>> promoteReadReplicaWithResponseAsync( if (clusterName == null) { return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); } + if (promoteRequest != null) { + promoteRequest.validate(); + } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .promoteReadReplica( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - clusterName, - accept, - context); + return service.promoteReadReplica(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, promoteRequest, accept, context); } /** * Promotes read replica cluster to an independent read-write cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. + * @param promoteRequest The parameter for enabling geo-redundant backup while promoting read replica. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginPromoteReadReplicaAsync( - String resourceGroupName, String clusterName) { - Mono>> mono = promoteReadReplicaWithResponseAsync(resourceGroupName, clusterName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + private PollerFlux, Void> beginPromoteReadReplicaAsync(String resourceGroupName, + String clusterName, PromoteRequest promoteRequest) { + Mono>> mono + = promoteReadReplicaWithResponseAsync(resourceGroupName, clusterName, promoteRequest); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Promotes read replica cluster to an independent read-write cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginPromoteReadReplicaAsync(String resourceGroupName, + String clusterName) { + final PromoteRequest promoteRequest = null; + Mono>> mono + = promoteReadReplicaWithResponseAsync(resourceGroupName, clusterName, promoteRequest); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Promotes read replica cluster to an independent read-write cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param promoteRequest The parameter for enabling geo-redundant backup while promoting read replica. * @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. @@ -2246,19 +1934,18 @@ private PollerFlux, Void> beginPromoteReadReplicaAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginPromoteReadReplicaAsync( - String resourceGroupName, String clusterName, Context context) { + private PollerFlux, Void> beginPromoteReadReplicaAsync(String resourceGroupName, + String clusterName, PromoteRequest promoteRequest, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - promoteReadReplicaWithResponseAsync(resourceGroupName, clusterName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + Mono>> mono + = promoteReadReplicaWithResponseAsync(resourceGroupName, clusterName, promoteRequest, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * Promotes read replica cluster to an independent read-write cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2268,14 +1955,16 @@ private PollerFlux, Void> beginPromoteReadReplicaAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginPromoteReadReplica(String resourceGroupName, String clusterName) { - return this.beginPromoteReadReplicaAsync(resourceGroupName, clusterName).getSyncPoller(); + final PromoteRequest promoteRequest = null; + return this.beginPromoteReadReplicaAsync(resourceGroupName, clusterName, promoteRequest).getSyncPoller(); } /** * Promotes read replica cluster to an independent read-write cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. + * @param promoteRequest The parameter for enabling geo-redundant backup while promoting read replica. * @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. @@ -2283,14 +1972,33 @@ public SyncPoller, Void> beginPromoteReadReplica(String resourc * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginPromoteReadReplica( - String resourceGroupName, String clusterName, Context context) { - return this.beginPromoteReadReplicaAsync(resourceGroupName, clusterName, context).getSyncPoller(); + public SyncPoller, Void> beginPromoteReadReplica(String resourceGroupName, String clusterName, + PromoteRequest promoteRequest, Context context) { + return this.beginPromoteReadReplicaAsync(resourceGroupName, clusterName, promoteRequest, context) + .getSyncPoller(); } /** * Promotes read replica cluster to an independent read-write cluster. - * + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param promoteRequest The parameter for enabling geo-redundant backup while promoting read replica. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono promoteReadReplicaAsync(String resourceGroupName, String clusterName, + PromoteRequest promoteRequest) { + return beginPromoteReadReplicaAsync(resourceGroupName, clusterName, promoteRequest).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Promotes read replica cluster to an independent read-write cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2300,16 +2008,17 @@ public SyncPoller, Void> beginPromoteReadReplica( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono promoteReadReplicaAsync(String resourceGroupName, String clusterName) { - return beginPromoteReadReplicaAsync(resourceGroupName, clusterName) - .last() + final PromoteRequest promoteRequest = null; + return beginPromoteReadReplicaAsync(resourceGroupName, clusterName, promoteRequest).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Promotes read replica cluster to an independent read-write cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. + * @param promoteRequest The parameter for enabling geo-redundant backup while promoting read replica. * @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. @@ -2317,15 +2026,15 @@ private Mono promoteReadReplicaAsync(String resourceGroupName, String clus * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono promoteReadReplicaAsync(String resourceGroupName, String clusterName, Context context) { - return beginPromoteReadReplicaAsync(resourceGroupName, clusterName, context) - .last() + private Mono promoteReadReplicaAsync(String resourceGroupName, String clusterName, + PromoteRequest promoteRequest, Context context) { + return beginPromoteReadReplicaAsync(resourceGroupName, clusterName, promoteRequest, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Promotes read replica cluster to an independent read-write cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2334,70 +2043,60 @@ private Mono promoteReadReplicaAsync(String resourceGroupName, String clus */ @ServiceMethod(returns = ReturnType.SINGLE) public void promoteReadReplica(String resourceGroupName, String clusterName) { - promoteReadReplicaAsync(resourceGroupName, clusterName).block(); + final PromoteRequest promoteRequest = null; + promoteReadReplicaAsync(resourceGroupName, clusterName, promoteRequest).block(); } /** * Promotes read replica cluster to an independent read-write cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. + * @param promoteRequest The parameter for enabling geo-redundant backup while promoting read replica. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void promoteReadReplica(String resourceGroupName, String clusterName, Context context) { - promoteReadReplicaAsync(resourceGroupName, clusterName, context).block(); + public void promoteReadReplica(String resourceGroupName, String clusterName, PromoteRequest promoteRequest, + Context context) { + promoteReadReplicaAsync(resourceGroupName, clusterName, promoteRequest, context).block(); } /** * Checks availability of a cluster name. Cluster names should be globally unique; at least 3 characters and at most * 40 characters long; they must only contain lowercase letters, numbers, and hyphens; and must not start or end * with a hyphen. - * + * * @param nameAvailabilityRequest The required parameters for checking if cluster name is available. * @throws IllegalArgumentException thrown if parameters fail the validation. * @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 cluster name availability along with {@link Response} on successful completion of {@link - * Mono}. + * @return represents cluster name availability along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> checkNameAvailabilityWithResponseAsync( - NameAvailabilityRequest nameAvailabilityRequest) { + private Mono> + checkNameAvailabilityWithResponseAsync(NameAvailabilityRequest nameAvailabilityRequest) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (nameAvailabilityRequest == null) { - return Mono - .error( - new IllegalArgumentException("Parameter nameAvailabilityRequest is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter nameAvailabilityRequest is required and cannot be null.")); } else { nameAvailabilityRequest.validate(); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .checkNameAvailability( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - nameAvailabilityRequest, - accept, - context)) + .withContext(context -> service.checkNameAvailability(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), nameAvailabilityRequest, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -2405,54 +2104,43 @@ private Mono> checkNameAvailabilityWithResponseA * Checks availability of a cluster name. Cluster names should be globally unique; at least 3 characters and at most * 40 characters long; they must only contain lowercase letters, numbers, and hyphens; and must not start or end * with a hyphen. - * + * * @param nameAvailabilityRequest The required parameters for checking if cluster name is available. * @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 represents cluster name availability along with {@link Response} on successful completion of {@link - * Mono}. + * @return represents cluster name availability along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> checkNameAvailabilityWithResponseAsync( - NameAvailabilityRequest nameAvailabilityRequest, Context context) { + private Mono> + checkNameAvailabilityWithResponseAsync(NameAvailabilityRequest nameAvailabilityRequest, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (nameAvailabilityRequest == null) { - return Mono - .error( - new IllegalArgumentException("Parameter nameAvailabilityRequest is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter nameAvailabilityRequest is required and cannot be null.")); } else { nameAvailabilityRequest.validate(); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .checkNameAvailability( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - nameAvailabilityRequest, - accept, - context); + return service.checkNameAvailability(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), nameAvailabilityRequest, accept, context); } /** * Checks availability of a cluster name. Cluster names should be globally unique; at least 3 characters and at most * 40 characters long; they must only contain lowercase letters, numbers, and hyphens; and must not start or end * with a hyphen. - * + * * @param nameAvailabilityRequest The required parameters for checking if cluster name is available. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -2469,7 +2157,7 @@ private Mono checkNameAvailabilityAsync(NameAvailabilityR * Checks availability of a cluster name. Cluster names should be globally unique; at least 3 characters and at most * 40 characters long; they must only contain lowercase letters, numbers, and hyphens; and must not start or end * with a hyphen. - * + * * @param nameAvailabilityRequest The required parameters for checking if cluster name is available. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2478,8 +2166,8 @@ private Mono checkNameAvailabilityAsync(NameAvailabilityR * @return represents cluster name availability along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response checkNameAvailabilityWithResponse( - NameAvailabilityRequest nameAvailabilityRequest, Context context) { + public Response + checkNameAvailabilityWithResponse(NameAvailabilityRequest nameAvailabilityRequest, Context context) { return checkNameAvailabilityWithResponseAsync(nameAvailabilityRequest, context).block(); } @@ -2487,7 +2175,7 @@ public Response checkNameAvailabilityWithResponse( * Checks availability of a cluster name. Cluster names should be globally unique; at least 3 characters and at most * 40 characters long; they must only contain lowercase letters, numbers, and hyphens; and must not start or end * with a hyphen. - * + * * @param nameAvailabilityRequest The required parameters for checking if cluster name is available. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -2501,9 +2189,10 @@ public NameAvailabilityInner checkNameAvailability(NameAvailabilityRequest nameA /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -2515,31 +2204,22 @@ private Mono> listNextSinglePageAsync(String nextLin 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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -2552,31 +2232,22 @@ private Mono> listNextSinglePageAsync(String nextLin 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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -2588,32 +2259,24 @@ private Mono> listByResourceGroupNextSinglePageAsync 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.")); + 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.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -2626,23 +2289,13 @@ private Mono> listByResourceGroupNextSinglePageAsync 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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/ClustersImpl.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/ClustersImpl.java index 33c0bf1246d5..29a866f954bd 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/ClustersImpl.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/ClustersImpl.java @@ -16,6 +16,7 @@ import com.azure.resourcemanager.cosmosdbforpostgresql.models.Clusters; import com.azure.resourcemanager.cosmosdbforpostgresql.models.NameAvailability; import com.azure.resourcemanager.cosmosdbforpostgresql.models.NameAvailabilityRequest; +import com.azure.resourcemanager.cosmosdbforpostgresql.models.PromoteRequest; public final class ClustersImpl implements Clusters { private static final ClientLogger LOGGER = new ClientLogger(ClustersImpl.class); @@ -24,8 +25,7 @@ public final class ClustersImpl implements Clusters { private final com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager serviceManager; - public ClustersImpl( - ClustersClient innerClient, + public ClustersImpl(ClustersClient innerClient, com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; @@ -33,33 +33,30 @@ public ClustersImpl( public PagedIterable list() { PagedIterable inner = this.serviceClient().list(); - return Utils.mapPage(inner, inner1 -> new ClusterImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ClusterImpl(inner1, this.manager())); } public PagedIterable list(Context context) { PagedIterable inner = this.serviceClient().list(context); - return Utils.mapPage(inner, inner1 -> new ClusterImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ClusterImpl(inner1, this.manager())); } public PagedIterable listByResourceGroup(String resourceGroupName) { PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); - return Utils.mapPage(inner, inner1 -> new ClusterImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ClusterImpl(inner1, this.manager())); } public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName, context); - return Utils.mapPage(inner, inner1 -> new ClusterImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ClusterImpl(inner1, this.manager())); } - public Response getByResourceGroupWithResponse( - String resourceGroupName, String clusterName, Context context) { - Response inner = - this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, clusterName, context); + public Response getByResourceGroupWithResponse(String resourceGroupName, String clusterName, + Context context) { + Response inner + = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, clusterName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new ClusterImpl(inner.getValue(), this.manager())); } else { return null; @@ -111,19 +108,17 @@ public void promoteReadReplica(String resourceGroupName, String clusterName) { this.serviceClient().promoteReadReplica(resourceGroupName, clusterName); } - public void promoteReadReplica(String resourceGroupName, String clusterName, Context context) { - this.serviceClient().promoteReadReplica(resourceGroupName, clusterName, context); + public void promoteReadReplica(String resourceGroupName, String clusterName, PromoteRequest promoteRequest, + Context context) { + this.serviceClient().promoteReadReplica(resourceGroupName, clusterName, promoteRequest, context); } - public Response checkNameAvailabilityWithResponse( - NameAvailabilityRequest nameAvailabilityRequest, Context context) { - Response inner = - this.serviceClient().checkNameAvailabilityWithResponse(nameAvailabilityRequest, context); + public Response checkNameAvailabilityWithResponse(NameAvailabilityRequest nameAvailabilityRequest, + Context context) { + Response inner + = this.serviceClient().checkNameAvailabilityWithResponse(nameAvailabilityRequest, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new NameAvailabilityImpl(inner.getValue(), this.manager())); } else { return null; @@ -140,81 +135,57 @@ public NameAvailability checkNameAvailability(NameAvailabilityRequest nameAvaila } public Cluster getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String clusterName = Utils.getValueFromIdByName(id, "serverGroupsv2"); + String clusterName = ResourceManagerUtils.getValueFromIdByName(id, "serverGroupsv2"); if (clusterName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'serverGroupsv2'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'serverGroupsv2'.", id))); } return this.getByResourceGroupWithResponse(resourceGroupName, clusterName, Context.NONE).getValue(); } public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String clusterName = Utils.getValueFromIdByName(id, "serverGroupsv2"); + String clusterName = ResourceManagerUtils.getValueFromIdByName(id, "serverGroupsv2"); if (clusterName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'serverGroupsv2'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'serverGroupsv2'.", id))); } return this.getByResourceGroupWithResponse(resourceGroupName, clusterName, context); } public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String clusterName = Utils.getValueFromIdByName(id, "serverGroupsv2"); + String clusterName = ResourceManagerUtils.getValueFromIdByName(id, "serverGroupsv2"); if (clusterName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'serverGroupsv2'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'serverGroupsv2'.", id))); } this.delete(resourceGroupName, clusterName, Context.NONE); } public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String clusterName = Utils.getValueFromIdByName(id, "serverGroupsv2"); + String clusterName = ResourceManagerUtils.getValueFromIdByName(id, "serverGroupsv2"); if (clusterName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'serverGroupsv2'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'serverGroupsv2'.", id))); } this.delete(resourceGroupName, clusterName, context); } diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/ConfigurationImpl.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/ConfigurationImpl.java index 87086695181f..fe1f4aaab721 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/ConfigurationImpl.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/ConfigurationImpl.java @@ -18,8 +18,7 @@ public final class ConfigurationImpl implements Configuration { private final com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager serviceManager; - ConfigurationImpl( - ConfigurationInner innerObject, + ConfigurationImpl(ConfigurationInner innerObject, com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/ConfigurationsClientImpl.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/ConfigurationsClientImpl.java index e4d1d8119ec6..aacf263eafd8 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/ConfigurationsClientImpl.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/ConfigurationsClientImpl.java @@ -39,22 +39,28 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in ConfigurationsClient. */ +/** + * An instance of this class provides access to all the operations defined in ConfigurationsClient. + */ public final class ConfigurationsClientImpl implements ConfigurationsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final ConfigurationsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final CosmosDBForPostgreSqlImpl client; /** * Initializes an instance of ConfigurationsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ ConfigurationsClientImpl(CosmosDBForPostgreSqlImpl client) { - this.service = - RestProxy.create(ConfigurationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(ConfigurationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -65,159 +71,115 @@ public final class ConfigurationsClientImpl implements ConfigurationsClient { @Host("{$host}") @ServiceInterface(name = "CosmosDBForPostgreSq") public interface ConfigurationsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/serverGroupsv2/{clusterName}/servers/{serverName}/configurations") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/serverGroupsv2/{clusterName}/servers/{serverName}/configurations") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServer( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("clusterName") String clusterName, - @PathParam("serverName") String serverName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/serverGroupsv2/{clusterName}/configurations") - @ExpectedResponses({200}) + Mono> listByServer(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @PathParam("serverName") String serverName, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/serverGroupsv2/{clusterName}/configurations") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByCluster( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("clusterName") String clusterName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/serverGroupsv2/{clusterName}/configurations/{configurationName}") - @ExpectedResponses({200}) + Mono> listByCluster(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/serverGroupsv2/{clusterName}/configurations/{configurationName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("clusterName") String clusterName, - @PathParam("configurationName") String configurationName, - @HeaderParam("Accept") String accept, + Mono> get(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @PathParam("configurationName") String configurationName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/serverGroupsv2/{clusterName}/coordinatorConfigurations/{configurationName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/serverGroupsv2/{clusterName}/coordinatorConfigurations/{configurationName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getCoordinator( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("clusterName") String clusterName, - @PathParam("configurationName") String configurationName, - @HeaderParam("Accept") String accept, + Mono> getCoordinator(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @PathParam("configurationName") String configurationName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/serverGroupsv2/{clusterName}/coordinatorConfigurations/{configurationName}") - @ExpectedResponses({200, 201}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/serverGroupsv2/{clusterName}/coordinatorConfigurations/{configurationName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> updateOnCoordinator( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("clusterName") String clusterName, + Mono>> updateOnCoordinator(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, @PathParam("configurationName") String configurationName, - @BodyParam("application/json") ServerConfigurationInner parameters, - @HeaderParam("Accept") String accept, + @BodyParam("application/json") ServerConfigurationInner parameters, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/serverGroupsv2/{clusterName}/nodeConfigurations/{configurationName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/serverGroupsv2/{clusterName}/nodeConfigurations/{configurationName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getNode( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("clusterName") String clusterName, - @PathParam("configurationName") String configurationName, - @HeaderParam("Accept") String accept, + Mono> getNode(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @PathParam("configurationName") String configurationName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/serverGroupsv2/{clusterName}/nodeConfigurations/{configurationName}") - @ExpectedResponses({200, 201}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/serverGroupsv2/{clusterName}/nodeConfigurations/{configurationName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> updateOnNode( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("clusterName") String clusterName, + Mono>> updateOnNode(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, @PathParam("configurationName") String configurationName, - @BodyParam("application/json") ServerConfigurationInner parameters, - @HeaderParam("Accept") String accept, + @BodyParam("application/json") ServerConfigurationInner parameters, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByServerNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByClusterNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * List all the configurations of a server in cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @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 a list of server configurations along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return a list of server configurations along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerSinglePageAsync( - String resourceGroupName, String clusterName, String serverName) { + private Mono> listByServerSinglePageAsync(String resourceGroupName, + String clusterName, String serverName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -231,33 +193,16 @@ private Mono> listByServerSinglePageAsyn } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByServer( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - clusterName, - serverName, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByServer(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, 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())); } /** * List all the configurations of a server in cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param serverName The name of the server. @@ -265,23 +210,19 @@ private Mono> listByServerSinglePageAsyn * @throws IllegalArgumentException thrown if parameters fail the validation. * @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 server configurations along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return a list of server configurations along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerSinglePageAsync( - String resourceGroupName, String clusterName, String serverName, Context context) { + private Mono> listByServerSinglePageAsync(String resourceGroupName, + String clusterName, String serverName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -296,29 +237,15 @@ private Mono> listByServerSinglePageAsyn final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByServer( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - clusterName, - serverName, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByServer(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, serverName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * List all the configurations of a server in cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param serverName The name of the server. @@ -328,16 +255,15 @@ private Mono> listByServerSinglePageAsyn * @return a list of server configurations as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByServerAsync( - String resourceGroupName, String clusterName, String serverName) { - return new PagedFlux<>( - () -> listByServerSinglePageAsync(resourceGroupName, clusterName, serverName), + private PagedFlux listByServerAsync(String resourceGroupName, String clusterName, + String serverName) { + return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, clusterName, serverName), nextLink -> listByServerNextSinglePageAsync(nextLink)); } /** * List all the configurations of a server in cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param serverName The name of the server. @@ -348,16 +274,15 @@ private PagedFlux listByServerAsync( * @return a list of server configurations as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByServerAsync( - String resourceGroupName, String clusterName, String serverName, Context context) { - return new PagedFlux<>( - () -> listByServerSinglePageAsync(resourceGroupName, clusterName, serverName, context), + private PagedFlux listByServerAsync(String resourceGroupName, String clusterName, + String serverName, Context context) { + return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, clusterName, serverName, context), nextLink -> listByServerNextSinglePageAsync(nextLink, context)); } /** * List all the configurations of a server in cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param serverName The name of the server. @@ -367,14 +292,14 @@ private PagedFlux listByServerAsync( * @return a list of server configurations as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByServer( - String resourceGroupName, String clusterName, String serverName) { + public PagedIterable listByServer(String resourceGroupName, String clusterName, + String serverName) { return new PagedIterable<>(listByServerAsync(resourceGroupName, clusterName, serverName)); } /** * List all the configurations of a server in cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param serverName The name of the server. @@ -385,36 +310,32 @@ public PagedIterable listByServer( * @return a list of server configurations as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByServer( - String resourceGroupName, String clusterName, String serverName, Context context) { + public PagedIterable listByServer(String resourceGroupName, String clusterName, + String serverName, Context context) { return new PagedIterable<>(listByServerAsync(resourceGroupName, clusterName, serverName, context)); } /** * List all the configurations of a cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @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 cluster configurations along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return a list of cluster configurations along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByClusterSinglePageAsync( - String resourceGroupName, String clusterName) { + private Mono> listByClusterSinglePageAsync(String resourceGroupName, + String clusterName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -425,55 +346,35 @@ private Mono> listByClusterSinglePageAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByCluster( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - clusterName, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByCluster(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, 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())); } /** * List all the configurations of a cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @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 cluster configurations along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return a list of cluster configurations along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByClusterSinglePageAsync( - String resourceGroupName, String clusterName, Context context) { + private Mono> listByClusterSinglePageAsync(String resourceGroupName, + String clusterName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -485,28 +386,15 @@ private Mono> listByClusterSinglePageAsync( final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByCluster( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - clusterName, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByCluster(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * List all the configurations of a cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -516,14 +404,13 @@ private Mono> listByClusterSinglePageAsync( */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByClusterAsync(String resourceGroupName, String clusterName) { - return new PagedFlux<>( - () -> listByClusterSinglePageAsync(resourceGroupName, clusterName), + return new PagedFlux<>(() -> listByClusterSinglePageAsync(resourceGroupName, clusterName), nextLink -> listByClusterNextSinglePageAsync(nextLink)); } /** * List all the configurations of a cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param context The context to associate with this operation. @@ -533,16 +420,15 @@ private PagedFlux listByClusterAsync(String resourceGroupNam * @return a list of cluster configurations as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByClusterAsync( - String resourceGroupName, String clusterName, Context context) { - return new PagedFlux<>( - () -> listByClusterSinglePageAsync(resourceGroupName, clusterName, context), + private PagedFlux listByClusterAsync(String resourceGroupName, String clusterName, + Context context) { + return new PagedFlux<>(() -> listByClusterSinglePageAsync(resourceGroupName, clusterName, context), nextLink -> listByClusterNextSinglePageAsync(nextLink, context)); } /** * List all the configurations of a cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -557,7 +443,7 @@ public PagedIterable listByCluster(String resourceGroupName, /** * List all the configurations of a cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param context The context to associate with this operation. @@ -567,14 +453,14 @@ public PagedIterable listByCluster(String resourceGroupName, * @return a list of cluster configurations as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByCluster( - String resourceGroupName, String clusterName, Context context) { + public PagedIterable listByCluster(String resourceGroupName, String clusterName, + Context context) { return new PagedIterable<>(listByClusterAsync(resourceGroupName, clusterName, context)); } /** * Gets information of a configuration for coordinator and nodes. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param configurationName The name of the cluster configuration. @@ -582,22 +468,18 @@ public PagedIterable listByCluster( * @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 a configuration for coordinator and nodes along with {@link Response} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String clusterName, String configurationName) { + private Mono> getWithResponseAsync(String resourceGroupName, String clusterName, + String configurationName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -612,24 +494,14 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - clusterName, - configurationName, - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, configurationName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets information of a configuration for coordinator and nodes. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param configurationName The name of the cluster configuration. @@ -638,22 +510,18 @@ private Mono> getWithResponseAsync( * @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 a configuration for coordinator and nodes along with {@link Response} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String clusterName, String configurationName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String clusterName, + String configurationName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -668,21 +536,13 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - clusterName, - configurationName, - accept, - context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, configurationName, accept, context); } /** * Gets information of a configuration for coordinator and nodes. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param configurationName The name of the cluster configuration. @@ -699,7 +559,7 @@ private Mono getAsync(String resourceGroupName, String clust /** * Gets information of a configuration for coordinator and nodes. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param configurationName The name of the cluster configuration. @@ -710,14 +570,14 @@ private Mono getAsync(String resourceGroupName, String clust * @return information of a configuration for coordinator and nodes along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String clusterName, String configurationName, Context context) { + public Response getWithResponse(String resourceGroupName, String clusterName, + String configurationName, Context context) { return getWithResponseAsync(resourceGroupName, clusterName, configurationName, context).block(); } /** * Gets information of a configuration for coordinator and nodes. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param configurationName The name of the cluster configuration. @@ -733,7 +593,7 @@ public ConfigurationInner get(String resourceGroupName, String clusterName, Stri /** * Gets information of a configuration for coordinator. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param configurationName The name of the cluster configuration. @@ -741,22 +601,18 @@ public ConfigurationInner get(String resourceGroupName, String clusterName, Stri * @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 a configuration for coordinator along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getCoordinatorWithResponseAsync( - String resourceGroupName, String clusterName, String configurationName) { + private Mono> getCoordinatorWithResponseAsync(String resourceGroupName, + String clusterName, String configurationName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -771,24 +627,14 @@ private Mono> getCoordinatorWithResponseAsync } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .getCoordinator( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - clusterName, - configurationName, - accept, - context)) + .withContext(context -> service.getCoordinator(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, configurationName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets information of a configuration for coordinator. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param configurationName The name of the cluster configuration. @@ -797,22 +643,18 @@ private Mono> getCoordinatorWithResponseAsync * @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 a configuration for coordinator along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getCoordinatorWithResponseAsync( - String resourceGroupName, String clusterName, String configurationName, Context context) { + private Mono> getCoordinatorWithResponseAsync(String resourceGroupName, + String clusterName, String configurationName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -827,21 +669,13 @@ private Mono> getCoordinatorWithResponseAsync } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .getCoordinator( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - clusterName, - configurationName, - accept, - context); + return service.getCoordinator(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, configurationName, accept, context); } /** * Gets information of a configuration for coordinator. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param configurationName The name of the cluster configuration. @@ -851,15 +685,15 @@ private Mono> getCoordinatorWithResponseAsync * @return information of a configuration for coordinator on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getCoordinatorAsync( - String resourceGroupName, String clusterName, String configurationName) { + private Mono getCoordinatorAsync(String resourceGroupName, String clusterName, + String configurationName) { return getCoordinatorWithResponseAsync(resourceGroupName, clusterName, configurationName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Gets information of a configuration for coordinator. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param configurationName The name of the cluster configuration. @@ -870,14 +704,14 @@ private Mono getCoordinatorAsync( * @return information of a configuration for coordinator along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getCoordinatorWithResponse( - String resourceGroupName, String clusterName, String configurationName, Context context) { + public Response getCoordinatorWithResponse(String resourceGroupName, String clusterName, + String configurationName, Context context) { return getCoordinatorWithResponseAsync(resourceGroupName, clusterName, configurationName, context).block(); } /** * Gets information of a configuration for coordinator. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param configurationName The name of the cluster configuration. @@ -887,14 +721,14 @@ public Response getCoordinatorWithResponse( * @return information of a configuration for coordinator. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ServerConfigurationInner getCoordinator( - String resourceGroupName, String clusterName, String configurationName) { + public ServerConfigurationInner getCoordinator(String resourceGroupName, String clusterName, + String configurationName) { return getCoordinatorWithResponse(resourceGroupName, clusterName, configurationName, Context.NONE).getValue(); } /** * Updates configuration of coordinator in a cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param configurationName The name of the cluster configuration. @@ -905,19 +739,15 @@ public ServerConfigurationInner getCoordinator( * @return represents a configuration along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateOnCoordinatorWithResponseAsync( - String resourceGroupName, String clusterName, String configurationName, ServerConfigurationInner parameters) { + private Mono>> updateOnCoordinatorWithResponseAsync(String resourceGroupName, + String clusterName, String configurationName, ServerConfigurationInner parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -937,25 +767,15 @@ private Mono>> updateOnCoordinatorWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .updateOnCoordinator( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - clusterName, - configurationName, - parameters, - accept, - context)) + .withContext(context -> service.updateOnCoordinator(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, configurationName, parameters, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Updates configuration of coordinator in a cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param configurationName The name of the cluster configuration. @@ -967,23 +787,15 @@ private Mono>> updateOnCoordinatorWithResponseAsync( * @return represents a configuration along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateOnCoordinatorWithResponseAsync( - String resourceGroupName, - String clusterName, - String configurationName, - ServerConfigurationInner parameters, - Context context) { + private Mono>> updateOnCoordinatorWithResponseAsync(String resourceGroupName, + String clusterName, String configurationName, ServerConfigurationInner parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1003,22 +815,14 @@ private Mono>> updateOnCoordinatorWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .updateOnCoordinator( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - clusterName, - configurationName, - parameters, - accept, - context); + return service.updateOnCoordinator(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, configurationName, parameters, accept, + context); } /** * Updates configuration of coordinator in a cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param configurationName The name of the cluster configuration. @@ -1031,21 +835,16 @@ private Mono>> updateOnCoordinatorWithResponseAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ServerConfigurationInner> beginUpdateOnCoordinatorAsync( String resourceGroupName, String clusterName, String configurationName, ServerConfigurationInner parameters) { - Mono>> mono = - updateOnCoordinatorWithResponseAsync(resourceGroupName, clusterName, configurationName, parameters); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - ServerConfigurationInner.class, - ServerConfigurationInner.class, - this.client.getContext()); + Mono>> mono + = updateOnCoordinatorWithResponseAsync(resourceGroupName, clusterName, configurationName, parameters); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), ServerConfigurationInner.class, ServerConfigurationInner.class, + this.client.getContext()); } /** * Updates configuration of coordinator in a cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param configurationName The name of the cluster configuration. @@ -1058,28 +857,18 @@ private PollerFlux, ServerConfigurationInne */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ServerConfigurationInner> beginUpdateOnCoordinatorAsync( - String resourceGroupName, - String clusterName, - String configurationName, - ServerConfigurationInner parameters, + String resourceGroupName, String clusterName, String configurationName, ServerConfigurationInner parameters, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - updateOnCoordinatorWithResponseAsync( - resourceGroupName, clusterName, configurationName, parameters, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - ServerConfigurationInner.class, - ServerConfigurationInner.class, - context); + Mono>> mono = updateOnCoordinatorWithResponseAsync(resourceGroupName, clusterName, + configurationName, parameters, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), ServerConfigurationInner.class, ServerConfigurationInner.class, context); } /** * Updates configuration of coordinator in a cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param configurationName The name of the cluster configuration. @@ -1092,14 +881,13 @@ private PollerFlux, ServerConfigurationInne @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ServerConfigurationInner> beginUpdateOnCoordinator( String resourceGroupName, String clusterName, String configurationName, ServerConfigurationInner parameters) { - return this - .beginUpdateOnCoordinatorAsync(resourceGroupName, clusterName, configurationName, parameters) + return this.beginUpdateOnCoordinatorAsync(resourceGroupName, clusterName, configurationName, parameters) .getSyncPoller(); } /** * Updates configuration of coordinator in a cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param configurationName The name of the cluster configuration. @@ -1112,10 +900,7 @@ public SyncPoller, ServerConfigurationInner */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ServerConfigurationInner> beginUpdateOnCoordinator( - String resourceGroupName, - String clusterName, - String configurationName, - ServerConfigurationInner parameters, + String resourceGroupName, String clusterName, String configurationName, ServerConfigurationInner parameters, Context context) { return this .beginUpdateOnCoordinatorAsync(resourceGroupName, clusterName, configurationName, parameters, context) @@ -1124,7 +909,7 @@ public SyncPoller, ServerConfigurationInner /** * Updates configuration of coordinator in a cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param configurationName The name of the cluster configuration. @@ -1135,16 +920,15 @@ public SyncPoller, ServerConfigurationInner * @return represents a configuration on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateOnCoordinatorAsync( - String resourceGroupName, String clusterName, String configurationName, ServerConfigurationInner parameters) { - return beginUpdateOnCoordinatorAsync(resourceGroupName, clusterName, configurationName, parameters) - .last() + private Mono updateOnCoordinatorAsync(String resourceGroupName, String clusterName, + String configurationName, ServerConfigurationInner parameters) { + return beginUpdateOnCoordinatorAsync(resourceGroupName, clusterName, configurationName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Updates configuration of coordinator in a cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param configurationName The name of the cluster configuration. @@ -1156,20 +940,15 @@ private Mono updateOnCoordinatorAsync( * @return represents a configuration on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateOnCoordinatorAsync( - String resourceGroupName, - String clusterName, - String configurationName, - ServerConfigurationInner parameters, - Context context) { + private Mono updateOnCoordinatorAsync(String resourceGroupName, String clusterName, + String configurationName, ServerConfigurationInner parameters, Context context) { return beginUpdateOnCoordinatorAsync(resourceGroupName, clusterName, configurationName, parameters, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); + .last().flatMap(this.client::getLroFinalResultOrError); } /** * Updates configuration of coordinator in a cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param configurationName The name of the cluster configuration. @@ -1180,14 +959,14 @@ private Mono updateOnCoordinatorAsync( * @return represents a configuration. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ServerConfigurationInner updateOnCoordinator( - String resourceGroupName, String clusterName, String configurationName, ServerConfigurationInner parameters) { + public ServerConfigurationInner updateOnCoordinator(String resourceGroupName, String clusterName, + String configurationName, ServerConfigurationInner parameters) { return updateOnCoordinatorAsync(resourceGroupName, clusterName, configurationName, parameters).block(); } /** * Updates configuration of coordinator in a cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param configurationName The name of the cluster configuration. @@ -1199,18 +978,14 @@ public ServerConfigurationInner updateOnCoordinator( * @return represents a configuration. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ServerConfigurationInner updateOnCoordinator( - String resourceGroupName, - String clusterName, - String configurationName, - ServerConfigurationInner parameters, - Context context) { + public ServerConfigurationInner updateOnCoordinator(String resourceGroupName, String clusterName, + String configurationName, ServerConfigurationInner parameters, Context context) { return updateOnCoordinatorAsync(resourceGroupName, clusterName, configurationName, parameters, context).block(); } /** * Gets information of a configuration for worker nodes. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param configurationName The name of the cluster configuration. @@ -1218,22 +993,18 @@ public ServerConfigurationInner updateOnCoordinator( * @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 a configuration for worker nodes along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getNodeWithResponseAsync( - String resourceGroupName, String clusterName, String configurationName) { + private Mono> getNodeWithResponseAsync(String resourceGroupName, + String clusterName, String configurationName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1248,24 +1019,14 @@ private Mono> getNodeWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .getNode( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - clusterName, - configurationName, - accept, - context)) + .withContext(context -> service.getNode(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, configurationName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets information of a configuration for worker nodes. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param configurationName The name of the cluster configuration. @@ -1274,22 +1035,18 @@ private Mono> getNodeWithResponseAsync( * @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 a configuration for worker nodes along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getNodeWithResponseAsync( - String resourceGroupName, String clusterName, String configurationName, Context context) { + private Mono> getNodeWithResponseAsync(String resourceGroupName, + String clusterName, String configurationName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1304,21 +1061,13 @@ private Mono> getNodeWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .getNode( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - clusterName, - configurationName, - accept, - context); + return service.getNode(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, configurationName, accept, context); } /** * Gets information of a configuration for worker nodes. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param configurationName The name of the cluster configuration. @@ -1328,15 +1077,15 @@ private Mono> getNodeWithResponseAsync( * @return information of a configuration for worker nodes on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getNodeAsync( - String resourceGroupName, String clusterName, String configurationName) { + private Mono getNodeAsync(String resourceGroupName, String clusterName, + String configurationName) { return getNodeWithResponseAsync(resourceGroupName, clusterName, configurationName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Gets information of a configuration for worker nodes. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param configurationName The name of the cluster configuration. @@ -1347,14 +1096,14 @@ private Mono getNodeAsync( * @return information of a configuration for worker nodes along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getNodeWithResponse( - String resourceGroupName, String clusterName, String configurationName, Context context) { + public Response getNodeWithResponse(String resourceGroupName, String clusterName, + String configurationName, Context context) { return getNodeWithResponseAsync(resourceGroupName, clusterName, configurationName, context).block(); } /** * Gets information of a configuration for worker nodes. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param configurationName The name of the cluster configuration. @@ -1370,7 +1119,7 @@ public ServerConfigurationInner getNode(String resourceGroupName, String cluster /** * Updates configuration of worker nodes in a cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param configurationName The name of the cluster configuration. @@ -1381,19 +1130,15 @@ public ServerConfigurationInner getNode(String resourceGroupName, String cluster * @return represents a configuration along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateOnNodeWithResponseAsync( - String resourceGroupName, String clusterName, String configurationName, ServerConfigurationInner parameters) { + private Mono>> updateOnNodeWithResponseAsync(String resourceGroupName, String clusterName, + String configurationName, ServerConfigurationInner parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1413,25 +1158,15 @@ private Mono>> updateOnNodeWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .updateOnNode( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - clusterName, - configurationName, - parameters, - accept, - context)) + .withContext(context -> service.updateOnNode(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, configurationName, parameters, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Updates configuration of worker nodes in a cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param configurationName The name of the cluster configuration. @@ -1443,23 +1178,15 @@ private Mono>> updateOnNodeWithResponseAsync( * @return represents a configuration along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateOnNodeWithResponseAsync( - String resourceGroupName, - String clusterName, - String configurationName, - ServerConfigurationInner parameters, - Context context) { + private Mono>> updateOnNodeWithResponseAsync(String resourceGroupName, String clusterName, + String configurationName, ServerConfigurationInner parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1479,22 +1206,14 @@ private Mono>> updateOnNodeWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .updateOnNode( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - clusterName, - configurationName, - parameters, - accept, - context); + return service.updateOnNode(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, configurationName, parameters, accept, + context); } /** * Updates configuration of worker nodes in a cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param configurationName The name of the cluster configuration. @@ -1507,21 +1226,16 @@ private Mono>> updateOnNodeWithResponseAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ServerConfigurationInner> beginUpdateOnNodeAsync( String resourceGroupName, String clusterName, String configurationName, ServerConfigurationInner parameters) { - Mono>> mono = - updateOnNodeWithResponseAsync(resourceGroupName, clusterName, configurationName, parameters); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - ServerConfigurationInner.class, - ServerConfigurationInner.class, - this.client.getContext()); + Mono>> mono + = updateOnNodeWithResponseAsync(resourceGroupName, clusterName, configurationName, parameters); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), ServerConfigurationInner.class, ServerConfigurationInner.class, + this.client.getContext()); } /** * Updates configuration of worker nodes in a cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param configurationName The name of the cluster configuration. @@ -1534,27 +1248,18 @@ private PollerFlux, ServerConfigurationInne */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ServerConfigurationInner> beginUpdateOnNodeAsync( - String resourceGroupName, - String clusterName, - String configurationName, - ServerConfigurationInner parameters, + String resourceGroupName, String clusterName, String configurationName, ServerConfigurationInner parameters, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - updateOnNodeWithResponseAsync(resourceGroupName, clusterName, configurationName, parameters, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - ServerConfigurationInner.class, - ServerConfigurationInner.class, - context); + Mono>> mono + = updateOnNodeWithResponseAsync(resourceGroupName, clusterName, configurationName, parameters, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), ServerConfigurationInner.class, ServerConfigurationInner.class, context); } /** * Updates configuration of worker nodes in a cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param configurationName The name of the cluster configuration. @@ -1567,14 +1272,13 @@ private PollerFlux, ServerConfigurationInne @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ServerConfigurationInner> beginUpdateOnNode( String resourceGroupName, String clusterName, String configurationName, ServerConfigurationInner parameters) { - return this - .beginUpdateOnNodeAsync(resourceGroupName, clusterName, configurationName, parameters) + return this.beginUpdateOnNodeAsync(resourceGroupName, clusterName, configurationName, parameters) .getSyncPoller(); } /** * Updates configuration of worker nodes in a cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param configurationName The name of the cluster configuration. @@ -1587,19 +1291,15 @@ public SyncPoller, ServerConfigurationInner */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ServerConfigurationInner> beginUpdateOnNode( - String resourceGroupName, - String clusterName, - String configurationName, - ServerConfigurationInner parameters, + String resourceGroupName, String clusterName, String configurationName, ServerConfigurationInner parameters, Context context) { - return this - .beginUpdateOnNodeAsync(resourceGroupName, clusterName, configurationName, parameters, context) + return this.beginUpdateOnNodeAsync(resourceGroupName, clusterName, configurationName, parameters, context) .getSyncPoller(); } /** * Updates configuration of worker nodes in a cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param configurationName The name of the cluster configuration. @@ -1610,16 +1310,15 @@ public SyncPoller, ServerConfigurationInner * @return represents a configuration on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateOnNodeAsync( - String resourceGroupName, String clusterName, String configurationName, ServerConfigurationInner parameters) { - return beginUpdateOnNodeAsync(resourceGroupName, clusterName, configurationName, parameters) - .last() + private Mono updateOnNodeAsync(String resourceGroupName, String clusterName, + String configurationName, ServerConfigurationInner parameters) { + return beginUpdateOnNodeAsync(resourceGroupName, clusterName, configurationName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Updates configuration of worker nodes in a cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param configurationName The name of the cluster configuration. @@ -1631,20 +1330,15 @@ private Mono updateOnNodeAsync( * @return represents a configuration on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateOnNodeAsync( - String resourceGroupName, - String clusterName, - String configurationName, - ServerConfigurationInner parameters, - Context context) { - return beginUpdateOnNodeAsync(resourceGroupName, clusterName, configurationName, parameters, context) - .last() + private Mono updateOnNodeAsync(String resourceGroupName, String clusterName, + String configurationName, ServerConfigurationInner parameters, Context context) { + return beginUpdateOnNodeAsync(resourceGroupName, clusterName, configurationName, parameters, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Updates configuration of worker nodes in a cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param configurationName The name of the cluster configuration. @@ -1655,14 +1349,14 @@ private Mono updateOnNodeAsync( * @return represents a configuration. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ServerConfigurationInner updateOnNode( - String resourceGroupName, String clusterName, String configurationName, ServerConfigurationInner parameters) { + public ServerConfigurationInner updateOnNode(String resourceGroupName, String clusterName, String configurationName, + ServerConfigurationInner parameters) { return updateOnNodeAsync(resourceGroupName, clusterName, configurationName, parameters).block(); } /** * Updates configuration of worker nodes in a cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param configurationName The name of the cluster configuration. @@ -1674,25 +1368,22 @@ public ServerConfigurationInner updateOnNode( * @return represents a configuration. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ServerConfigurationInner updateOnNode( - String resourceGroupName, - String clusterName, - String configurationName, - ServerConfigurationInner parameters, - Context context) { + public ServerConfigurationInner updateOnNode(String resourceGroupName, String clusterName, String configurationName, + ServerConfigurationInner parameters, Context context) { return updateOnNodeAsync(resourceGroupName, clusterName, configurationName, parameters, context).block(); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of server configurations along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return a list of server configurations along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerNextSinglePageAsync(String nextLink) { @@ -1700,75 +1391,58 @@ private Mono> listByServerNextSinglePage 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.")); + 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)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of server configurations along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return a list of server configurations along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listByServerNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByServerNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return 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)); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of cluster configurations along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return a list of cluster configurations along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByClusterNextSinglePageAsync(String nextLink) { @@ -1776,37 +1450,29 @@ private Mono> listByClusterNextSinglePageAsync 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.")); + 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.listByClusterNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of cluster configurations along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return a list of cluster configurations along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByClusterNextSinglePageAsync(String nextLink, Context context) { @@ -1814,23 +1480,13 @@ private Mono> listByClusterNextSinglePageAsync 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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByClusterNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByClusterNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/ConfigurationsImpl.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/ConfigurationsImpl.java index 748f606d5b3c..29b2385c0ffa 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/ConfigurationsImpl.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/ConfigurationsImpl.java @@ -23,47 +23,43 @@ public final class ConfigurationsImpl implements Configurations { private final com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager serviceManager; - public ConfigurationsImpl( - ConfigurationsClient innerClient, + public ConfigurationsImpl(ConfigurationsClient innerClient, com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } - public PagedIterable listByServer( - String resourceGroupName, String clusterName, String serverName) { - PagedIterable inner = - this.serviceClient().listByServer(resourceGroupName, clusterName, serverName); - return Utils.mapPage(inner, inner1 -> new ServerConfigurationImpl(inner1, this.manager())); + public PagedIterable listByServer(String resourceGroupName, String clusterName, + String serverName) { + PagedIterable inner + = this.serviceClient().listByServer(resourceGroupName, clusterName, serverName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ServerConfigurationImpl(inner1, this.manager())); } - public PagedIterable listByServer( - String resourceGroupName, String clusterName, String serverName, Context context) { - PagedIterable inner = - this.serviceClient().listByServer(resourceGroupName, clusterName, serverName, context); - return Utils.mapPage(inner, inner1 -> new ServerConfigurationImpl(inner1, this.manager())); + public PagedIterable listByServer(String resourceGroupName, String clusterName, + String serverName, Context context) { + PagedIterable inner + = this.serviceClient().listByServer(resourceGroupName, clusterName, serverName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ServerConfigurationImpl(inner1, this.manager())); } public PagedIterable listByCluster(String resourceGroupName, String clusterName) { PagedIterable inner = this.serviceClient().listByCluster(resourceGroupName, clusterName); - return Utils.mapPage(inner, inner1 -> new ConfigurationImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ConfigurationImpl(inner1, this.manager())); } public PagedIterable listByCluster(String resourceGroupName, String clusterName, Context context) { - PagedIterable inner = - this.serviceClient().listByCluster(resourceGroupName, clusterName, context); - return Utils.mapPage(inner, inner1 -> new ConfigurationImpl(inner1, this.manager())); + PagedIterable inner + = this.serviceClient().listByCluster(resourceGroupName, clusterName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ConfigurationImpl(inner1, this.manager())); } - public Response getWithResponse( - String resourceGroupName, String clusterName, String configurationName, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, clusterName, configurationName, context); + public Response getWithResponse(String resourceGroupName, String clusterName, + String configurationName, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, clusterName, configurationName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new ConfigurationImpl(inner.getValue(), this.manager())); } else { return null; @@ -79,15 +75,12 @@ public Configuration get(String resourceGroupName, String clusterName, String co } } - public Response getCoordinatorWithResponse( - String resourceGroupName, String clusterName, String configurationName, Context context) { - Response inner = - this.serviceClient().getCoordinatorWithResponse(resourceGroupName, clusterName, configurationName, context); + public Response getCoordinatorWithResponse(String resourceGroupName, String clusterName, + String configurationName, Context context) { + Response inner = this.serviceClient().getCoordinatorWithResponse(resourceGroupName, + clusterName, configurationName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new ServerConfigurationImpl(inner.getValue(), this.manager())); } else { return null; @@ -95,8 +88,8 @@ public Response getCoordinatorWithResponse( } public ServerConfiguration getCoordinator(String resourceGroupName, String clusterName, String configurationName) { - ServerConfigurationInner inner = - this.serviceClient().getCoordinator(resourceGroupName, clusterName, configurationName); + ServerConfigurationInner inner + = this.serviceClient().getCoordinator(resourceGroupName, clusterName, configurationName); if (inner != null) { return new ServerConfigurationImpl(inner, this.manager()); } else { @@ -104,10 +97,10 @@ public ServerConfiguration getCoordinator(String resourceGroupName, String clust } } - public ServerConfiguration updateOnCoordinator( - String resourceGroupName, String clusterName, String configurationName, ServerConfigurationInner parameters) { - ServerConfigurationInner inner = - this.serviceClient().updateOnCoordinator(resourceGroupName, clusterName, configurationName, parameters); + public ServerConfiguration updateOnCoordinator(String resourceGroupName, String clusterName, + String configurationName, ServerConfigurationInner parameters) { + ServerConfigurationInner inner + = this.serviceClient().updateOnCoordinator(resourceGroupName, clusterName, configurationName, parameters); if (inner != null) { return new ServerConfigurationImpl(inner, this.manager()); } else { @@ -115,16 +108,10 @@ public ServerConfiguration updateOnCoordinator( } } - public ServerConfiguration updateOnCoordinator( - String resourceGroupName, - String clusterName, - String configurationName, - ServerConfigurationInner parameters, - Context context) { - ServerConfigurationInner inner = - this - .serviceClient() - .updateOnCoordinator(resourceGroupName, clusterName, configurationName, parameters, context); + public ServerConfiguration updateOnCoordinator(String resourceGroupName, String clusterName, + String configurationName, ServerConfigurationInner parameters, Context context) { + ServerConfigurationInner inner = this.serviceClient().updateOnCoordinator(resourceGroupName, clusterName, + configurationName, parameters, context); if (inner != null) { return new ServerConfigurationImpl(inner, this.manager()); } else { @@ -132,15 +119,12 @@ public ServerConfiguration updateOnCoordinator( } } - public Response getNodeWithResponse( - String resourceGroupName, String clusterName, String configurationName, Context context) { - Response inner = - this.serviceClient().getNodeWithResponse(resourceGroupName, clusterName, configurationName, context); + public Response getNodeWithResponse(String resourceGroupName, String clusterName, + String configurationName, Context context) { + Response inner + = this.serviceClient().getNodeWithResponse(resourceGroupName, clusterName, configurationName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new ServerConfigurationImpl(inner.getValue(), this.manager())); } else { return null; @@ -148,8 +132,8 @@ public Response getNodeWithResponse( } public ServerConfiguration getNode(String resourceGroupName, String clusterName, String configurationName) { - ServerConfigurationInner inner = - this.serviceClient().getNode(resourceGroupName, clusterName, configurationName); + ServerConfigurationInner inner + = this.serviceClient().getNode(resourceGroupName, clusterName, configurationName); if (inner != null) { return new ServerConfigurationImpl(inner, this.manager()); } else { @@ -157,10 +141,10 @@ public ServerConfiguration getNode(String resourceGroupName, String clusterName, } } - public ServerConfiguration updateOnNode( - String resourceGroupName, String clusterName, String configurationName, ServerConfigurationInner parameters) { - ServerConfigurationInner inner = - this.serviceClient().updateOnNode(resourceGroupName, clusterName, configurationName, parameters); + public ServerConfiguration updateOnNode(String resourceGroupName, String clusterName, String configurationName, + ServerConfigurationInner parameters) { + ServerConfigurationInner inner + = this.serviceClient().updateOnNode(resourceGroupName, clusterName, configurationName, parameters); if (inner != null) { return new ServerConfigurationImpl(inner, this.manager()); } else { @@ -168,14 +152,10 @@ public ServerConfiguration updateOnNode( } } - public ServerConfiguration updateOnNode( - String resourceGroupName, - String clusterName, - String configurationName, - ServerConfigurationInner parameters, - Context context) { - ServerConfigurationInner inner = - this.serviceClient().updateOnNode(resourceGroupName, clusterName, configurationName, parameters, context); + public ServerConfiguration updateOnNode(String resourceGroupName, String clusterName, String configurationName, + ServerConfigurationInner parameters, Context context) { + ServerConfigurationInner inner + = this.serviceClient().updateOnNode(resourceGroupName, clusterName, configurationName, parameters, context); if (inner != null) { return new ServerConfigurationImpl(inner, this.manager()); } else { diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/CosmosDBForPostgreSqlBuilder.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/CosmosDBForPostgreSqlBuilder.java index c9ccadc2ab01..9dd354f01476 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/CosmosDBForPostgreSqlBuilder.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/CosmosDBForPostgreSqlBuilder.java @@ -14,8 +14,10 @@ import com.azure.core.util.serializer.SerializerAdapter; import java.time.Duration; -/** A builder for creating a new instance of the CosmosDBForPostgreSqlImpl type. */ -@ServiceClientBuilder(serviceClients = {CosmosDBForPostgreSqlImpl.class}) +/** + * A builder for creating a new instance of the CosmosDBForPostgreSqlImpl type. + */ +@ServiceClientBuilder(serviceClients = { CosmosDBForPostgreSqlImpl.class }) public final class CosmosDBForPostgreSqlBuilder { /* * The ID of the target subscription. The value must be an UUID. @@ -24,7 +26,7 @@ public final class CosmosDBForPostgreSqlBuilder { /** * Sets The ID of the target subscription. The value must be an UUID. - * + * * @param subscriptionId the subscriptionId value. * @return the CosmosDBForPostgreSqlBuilder. */ @@ -40,7 +42,7 @@ public CosmosDBForPostgreSqlBuilder subscriptionId(String subscriptionId) { /** * Sets server parameter. - * + * * @param endpoint the endpoint value. * @return the CosmosDBForPostgreSqlBuilder. */ @@ -56,7 +58,7 @@ public CosmosDBForPostgreSqlBuilder endpoint(String endpoint) { /** * Sets The environment to connect to. - * + * * @param environment the environment value. * @return the CosmosDBForPostgreSqlBuilder. */ @@ -72,7 +74,7 @@ public CosmosDBForPostgreSqlBuilder environment(AzureEnvironment environment) { /** * Sets The HTTP pipeline to send requests through. - * + * * @param pipeline the pipeline value. * @return the CosmosDBForPostgreSqlBuilder. */ @@ -88,7 +90,7 @@ public CosmosDBForPostgreSqlBuilder pipeline(HttpPipeline pipeline) { /** * Sets The default poll interval for long-running operation. - * + * * @param defaultPollInterval the defaultPollInterval value. * @return the CosmosDBForPostgreSqlBuilder. */ @@ -104,7 +106,7 @@ public CosmosDBForPostgreSqlBuilder defaultPollInterval(Duration defaultPollInte /** * Sets The serializer to serialize an object into a string. - * + * * @param serializerAdapter the serializerAdapter value. * @return the CosmosDBForPostgreSqlBuilder. */ @@ -115,30 +117,20 @@ public CosmosDBForPostgreSqlBuilder serializerAdapter(SerializerAdapter serializ /** * Builds an instance of CosmosDBForPostgreSqlImpl with the provided parameters. - * + * * @return an instance of CosmosDBForPostgreSqlImpl. */ public CosmosDBForPostgreSqlImpl buildClient() { String localEndpoint = (endpoint != null) ? endpoint : "https://management.azure.com"; AzureEnvironment localEnvironment = (environment != null) ? environment : AzureEnvironment.AZURE; - HttpPipeline localPipeline = - (pipeline != null) - ? pipeline - : new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(); - Duration localDefaultPollInterval = - (defaultPollInterval != null) ? defaultPollInterval : Duration.ofSeconds(30); - SerializerAdapter localSerializerAdapter = - (serializerAdapter != null) - ? serializerAdapter - : SerializerFactory.createDefaultManagementSerializerAdapter(); - CosmosDBForPostgreSqlImpl client = - new CosmosDBForPostgreSqlImpl( - localPipeline, - localSerializerAdapter, - localDefaultPollInterval, - localEnvironment, - this.subscriptionId, - localEndpoint); + HttpPipeline localPipeline = (pipeline != null) ? pipeline + : new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(); + Duration localDefaultPollInterval + = (defaultPollInterval != null) ? defaultPollInterval : Duration.ofSeconds(30); + SerializerAdapter localSerializerAdapter = (serializerAdapter != null) ? serializerAdapter + : SerializerFactory.createDefaultManagementSerializerAdapter(); + CosmosDBForPostgreSqlImpl client = new CosmosDBForPostgreSqlImpl(localPipeline, localSerializerAdapter, + localDefaultPollInterval, localEnvironment, this.subscriptionId, localEndpoint); return client; } } diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/CosmosDBForPostgreSqlImpl.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/CosmosDBForPostgreSqlImpl.java index de035b0fc56a..f26d7019bb9f 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/CosmosDBForPostgreSqlImpl.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/CosmosDBForPostgreSqlImpl.java @@ -40,171 +40,201 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** Initializes a new instance of the CosmosDBForPostgreSqlImpl type. */ +/** + * Initializes a new instance of the CosmosDBForPostgreSqlImpl type. + */ @ServiceClient(builder = CosmosDBForPostgreSqlBuilder.class) public final class CosmosDBForPostgreSqlImpl implements CosmosDBForPostgreSql { - /** The ID of the target subscription. The value must be an UUID. */ + /** + * 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. */ + /** + * server parameter. + */ private final String endpoint; /** * Gets server parameter. - * + * * @return the endpoint value. */ public String getEndpoint() { return this.endpoint; } - /** Api Version. */ + /** + * Api Version. + */ private final String apiVersion; /** * Gets Api Version. - * + * * @return the apiVersion value. */ public String getApiVersion() { return this.apiVersion; } - /** The HTTP pipeline to send requests through. */ + /** + * The HTTP pipeline to send requests through. + */ private final HttpPipeline httpPipeline; /** * Gets The HTTP pipeline to send requests through. - * + * * @return the httpPipeline value. */ public HttpPipeline getHttpPipeline() { return this.httpPipeline; } - /** The serializer to serialize an object into a string. */ + /** + * The serializer to serialize an object into a string. + */ private final SerializerAdapter serializerAdapter; /** * Gets The serializer to serialize an object into a string. - * + * * @return the serializerAdapter value. */ SerializerAdapter getSerializerAdapter() { return this.serializerAdapter; } - /** The default poll interval for long-running operation. */ + /** + * The default poll interval for long-running operation. + */ private final Duration defaultPollInterval; /** * Gets The default poll interval for long-running operation. - * + * * @return the defaultPollInterval value. */ public Duration getDefaultPollInterval() { return this.defaultPollInterval; } - /** The ClustersClient object to access its operations. */ + /** + * The ClustersClient object to access its operations. + */ private final ClustersClient clusters; /** * Gets the ClustersClient object to access its operations. - * + * * @return the ClustersClient object. */ public ClustersClient getClusters() { return this.clusters; } - /** The ServersClient object to access its operations. */ + /** + * The ServersClient object to access its operations. + */ private final ServersClient servers; /** * Gets the ServersClient object to access its operations. - * + * * @return the ServersClient object. */ public ServersClient getServers() { return this.servers; } - /** The ConfigurationsClient object to access its operations. */ + /** + * The ConfigurationsClient object to access its operations. + */ private final ConfigurationsClient configurations; /** * Gets the ConfigurationsClient object to access its operations. - * + * * @return the ConfigurationsClient object. */ public ConfigurationsClient getConfigurations() { return this.configurations; } - /** The FirewallRulesClient object to access its operations. */ + /** + * The FirewallRulesClient object to access its operations. + */ private final FirewallRulesClient firewallRules; /** * Gets the FirewallRulesClient object to access its operations. - * + * * @return the FirewallRulesClient object. */ public FirewallRulesClient getFirewallRules() { return this.firewallRules; } - /** The RolesClient object to access its operations. */ + /** + * The RolesClient object to access its operations. + */ private final RolesClient roles; /** * Gets the RolesClient object to access its operations. - * + * * @return the RolesClient object. */ public RolesClient getRoles() { return this.roles; } - /** The OperationsClient object to access its operations. */ + /** + * The OperationsClient object to access its operations. + */ private final OperationsClient operations; /** * Gets the OperationsClient object to access its operations. - * + * * @return the OperationsClient object. */ public OperationsClient getOperations() { return this.operations; } - /** The PrivateEndpointConnectionsClient object to access its operations. */ + /** + * The PrivateEndpointConnectionsClient object to access its operations. + */ private final PrivateEndpointConnectionsClient privateEndpointConnections; /** * Gets the PrivateEndpointConnectionsClient object to access its operations. - * + * * @return the PrivateEndpointConnectionsClient object. */ public PrivateEndpointConnectionsClient getPrivateEndpointConnections() { return this.privateEndpointConnections; } - /** The PrivateLinkResourcesClient object to access its operations. */ + /** + * The PrivateLinkResourcesClient object to access its operations. + */ private final PrivateLinkResourcesClient privateLinkResources; /** * Gets the PrivateLinkResourcesClient object to access its operations. - * + * * @return the PrivateLinkResourcesClient object. */ public PrivateLinkResourcesClient getPrivateLinkResources() { @@ -213,7 +243,7 @@ public PrivateLinkResourcesClient getPrivateLinkResources() { /** * Initializes an instance of CosmosDBForPostgreSql client. - * + * * @param httpPipeline The HTTP pipeline to send requests through. * @param serializerAdapter The serializer to serialize an object into a string. * @param defaultPollInterval The default poll interval for long-running operation. @@ -221,19 +251,14 @@ public PrivateLinkResourcesClient getPrivateLinkResources() { * @param subscriptionId The ID of the target subscription. The value must be an UUID. * @param endpoint server parameter. */ - CosmosDBForPostgreSqlImpl( - HttpPipeline httpPipeline, - SerializerAdapter serializerAdapter, - Duration defaultPollInterval, - AzureEnvironment environment, - String subscriptionId, - String endpoint) { + CosmosDBForPostgreSqlImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, + Duration defaultPollInterval, AzureEnvironment environment, String subscriptionId, String endpoint) { this.httpPipeline = httpPipeline; this.serializerAdapter = serializerAdapter; this.defaultPollInterval = defaultPollInterval; this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2022-11-08"; + this.apiVersion = "2023-03-02-preview"; this.clusters = new ClustersClientImpl(this); this.servers = new ServersClientImpl(this); this.configurations = new ConfigurationsClientImpl(this); @@ -246,7 +271,7 @@ public PrivateLinkResourcesClient getPrivateLinkResources() { /** * Gets default client context. - * + * * @return the default client context. */ public Context getContext() { @@ -255,7 +280,7 @@ public Context getContext() { /** * Merges default client context with provided context. - * + * * @param context the context to be merged with default client context. * @return the merged context. */ @@ -265,7 +290,7 @@ public Context mergeContext(Context context) { /** * Gets long running operation result. - * + * * @param activationResponse the response of activation operation. * @param httpPipeline the http pipeline. * @param pollResultType type of poll result. @@ -275,26 +300,15 @@ public Context mergeContext(Context context) { * @param type of final result. * @return poller flux for poll result and final result. */ - public PollerFlux, U> getLroResult( - Mono>> activationResponse, - HttpPipeline httpPipeline, - Type pollResultType, - Type finalResultType, - Context context) { - return PollerFactory - .create( - serializerAdapter, - httpPipeline, - pollResultType, - finalResultType, - defaultPollInterval, - activationResponse, - context); + public PollerFlux, U> getLroResult(Mono>> activationResponse, + HttpPipeline httpPipeline, Type pollResultType, Type finalResultType, Context context) { + return PollerFactory.create(serializerAdapter, httpPipeline, pollResultType, finalResultType, + defaultPollInterval, activationResponse, context); } /** * Gets the final result, or an error, based on last async poll response. - * + * * @param response the last async poll response. * @param type of poll result. * @param type of final result. @@ -307,19 +321,16 @@ public Mono getLroFinalResultOrError(AsyncPollResponse, HttpResponse errorResponse = null; PollResult.Error lroError = response.getValue().getError(); if (lroError != null) { - errorResponse = - new HttpResponseImpl( - lroError.getResponseStatusCode(), lroError.getResponseHeaders(), lroError.getResponseBody()); + errorResponse = new HttpResponseImpl(lroError.getResponseStatusCode(), lroError.getResponseHeaders(), + lroError.getResponseBody()); errorMessage = response.getValue().getError().getMessage(); String errorBody = response.getValue().getError().getResponseBody(); if (errorBody != null) { // try to deserialize error body to ManagementError try { - managementError = - this - .getSerializerAdapter() - .deserialize(errorBody, ManagementError.class, SerializerEncoding.JSON); + managementError = this.getSerializerAdapter().deserialize(errorBody, ManagementError.class, + SerializerEncoding.JSON); if (managementError.getCode() == null || managementError.getMessage() == null) { managementError = null; } diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/FirewallRuleImpl.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/FirewallRuleImpl.java index 452700b6f702..e7e4aa319be8 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/FirewallRuleImpl.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/FirewallRuleImpl.java @@ -68,25 +68,19 @@ public FirewallRuleImpl withExistingServerGroupsv2(String resourceGroupName, Str } public FirewallRule create() { - this.innerObject = - serviceManager - .serviceClient() - .getFirewallRules() - .createOrUpdate(resourceGroupName, clusterName, firewallRuleName, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient().getFirewallRules().createOrUpdate(resourceGroupName, + clusterName, firewallRuleName, this.innerModel(), Context.NONE); return this; } public FirewallRule create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getFirewallRules() - .createOrUpdate(resourceGroupName, clusterName, firewallRuleName, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient().getFirewallRules().createOrUpdate(resourceGroupName, + clusterName, firewallRuleName, this.innerModel(), context); return this; } - FirewallRuleImpl( - String name, com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager serviceManager) { + FirewallRuleImpl(String name, + com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager serviceManager) { this.innerObject = new FirewallRuleInner(); this.serviceManager = serviceManager; this.firewallRuleName = name; @@ -97,50 +91,35 @@ public FirewallRuleImpl update() { } public FirewallRule apply() { - this.innerObject = - serviceManager - .serviceClient() - .getFirewallRules() - .createOrUpdate(resourceGroupName, clusterName, firewallRuleName, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient().getFirewallRules().createOrUpdate(resourceGroupName, + clusterName, firewallRuleName, this.innerModel(), Context.NONE); return this; } public FirewallRule apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getFirewallRules() - .createOrUpdate(resourceGroupName, clusterName, firewallRuleName, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient().getFirewallRules().createOrUpdate(resourceGroupName, + clusterName, firewallRuleName, this.innerModel(), context); return this; } - FirewallRuleImpl( - FirewallRuleInner innerObject, + FirewallRuleImpl(FirewallRuleInner innerObject, com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.clusterName = Utils.getValueFromIdByName(innerObject.id(), "serverGroupsv2"); - this.firewallRuleName = Utils.getValueFromIdByName(innerObject.id(), "firewallRules"); + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.clusterName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "serverGroupsv2"); + this.firewallRuleName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "firewallRules"); } public FirewallRule refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getFirewallRules() - .getWithResponse(resourceGroupName, clusterName, firewallRuleName, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getFirewallRules() + .getWithResponse(resourceGroupName, clusterName, firewallRuleName, Context.NONE).getValue(); return this; } public FirewallRule refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getFirewallRules() - .getWithResponse(resourceGroupName, clusterName, firewallRuleName, context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getFirewallRules() + .getWithResponse(resourceGroupName, clusterName, firewallRuleName, context).getValue(); return this; } diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/FirewallRulesClientImpl.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/FirewallRulesClientImpl.java index ab92fa3d6bc7..27c382fc6fd6 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/FirewallRulesClientImpl.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/FirewallRulesClientImpl.java @@ -38,96 +38,82 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in FirewallRulesClient. */ +/** + * An instance of this class provides access to all the operations defined in FirewallRulesClient. + */ public final class FirewallRulesClientImpl implements FirewallRulesClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final FirewallRulesService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final CosmosDBForPostgreSqlImpl client; /** * Initializes an instance of FirewallRulesClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ FirewallRulesClientImpl(CosmosDBForPostgreSqlImpl client) { - this.service = - RestProxy.create(FirewallRulesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(FirewallRulesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for CosmosDBForPostgreSqlFirewallRules to be used by the proxy service to - * perform REST calls. + * The interface defining all the services for CosmosDBForPostgreSqlFirewallRules to be used by the proxy service + * to perform REST calls. */ @Host("{$host}") @ServiceInterface(name = "CosmosDBForPostgreSq") public interface FirewallRulesService { - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/serverGroupsv2/{clusterName}/firewallRules/{firewallRuleName}") - @ExpectedResponses({200, 201}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/serverGroupsv2/{clusterName}/firewallRules/{firewallRuleName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("clusterName") String clusterName, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, @PathParam("firewallRuleName") String firewallRuleName, - @BodyParam("application/json") FirewallRuleInner parameters, - @HeaderParam("Accept") String accept, + @BodyParam("application/json") FirewallRuleInner parameters, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/serverGroupsv2/{clusterName}/firewallRules/{firewallRuleName}") - @ExpectedResponses({202, 204}) + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/serverGroupsv2/{clusterName}/firewallRules/{firewallRuleName}") + @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("clusterName") String clusterName, - @PathParam("firewallRuleName") String firewallRuleName, - @HeaderParam("Accept") String accept, + Mono>> delete(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @PathParam("firewallRuleName") String firewallRuleName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/serverGroupsv2/{clusterName}/firewallRules/{firewallRuleName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/serverGroupsv2/{clusterName}/firewallRules/{firewallRuleName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("clusterName") String clusterName, - @PathParam("firewallRuleName") String firewallRuleName, - @HeaderParam("Accept") String accept, + Mono> get(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @PathParam("firewallRuleName") String firewallRuleName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/serverGroupsv2/{clusterName}/firewallRules") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/serverGroupsv2/{clusterName}/firewallRules") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByCluster( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("clusterName") String clusterName, - @HeaderParam("Accept") String accept, - Context context); + Mono> listByCluster(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @HeaderParam("Accept") String accept, Context context); } /** * Creates a new cluster firewall rule or updates an existing cluster firewall rule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param firewallRuleName The name of the cluster firewall rule. @@ -138,19 +124,15 @@ Mono> listByCluster( * @return represents a cluster firewall rule along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String clusterName, String firewallRuleName, FirewallRuleInner parameters) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String clusterName, String firewallRuleName, FirewallRuleInner parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -170,25 +152,15 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - clusterName, - firewallRuleName, - parameters, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, firewallRuleName, parameters, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates a new cluster firewall rule or updates an existing cluster firewall rule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param firewallRuleName The name of the cluster firewall rule. @@ -200,23 +172,15 @@ private Mono>> createOrUpdateWithResponseAsync( * @return represents a cluster firewall rule along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String clusterName, - String firewallRuleName, - FirewallRuleInner parameters, - Context context) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String clusterName, String firewallRuleName, FirewallRuleInner parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -236,22 +200,14 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - clusterName, - firewallRuleName, - parameters, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, firewallRuleName, parameters, accept, + context); } /** * Creates a new cluster firewall rule or updates an existing cluster firewall rule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param firewallRuleName The name of the cluster firewall rule. @@ -264,21 +220,15 @@ private Mono>> createOrUpdateWithResponseAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, FirewallRuleInner> beginCreateOrUpdateAsync( String resourceGroupName, String clusterName, String firewallRuleName, FirewallRuleInner parameters) { - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, clusterName, firewallRuleName, parameters); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - FirewallRuleInner.class, - FirewallRuleInner.class, - this.client.getContext()); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, clusterName, firewallRuleName, parameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + FirewallRuleInner.class, FirewallRuleInner.class, this.client.getContext()); } /** * Creates a new cluster firewall rule or updates an existing cluster firewall rule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param firewallRuleName The name of the cluster firewall rule. @@ -291,23 +241,18 @@ private PollerFlux, FirewallRuleInner> beginCreate */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, FirewallRuleInner> beginCreateOrUpdateAsync( - String resourceGroupName, - String clusterName, - String firewallRuleName, - FirewallRuleInner parameters, + String resourceGroupName, String clusterName, String firewallRuleName, FirewallRuleInner parameters, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, clusterName, firewallRuleName, parameters, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), FirewallRuleInner.class, FirewallRuleInner.class, context); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, clusterName, firewallRuleName, parameters, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + FirewallRuleInner.class, FirewallRuleInner.class, context); } /** * Creates a new cluster firewall rule or updates an existing cluster firewall rule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param firewallRuleName The name of the cluster firewall rule. @@ -318,16 +263,15 @@ private PollerFlux, FirewallRuleInner> beginCreate * @return the {@link SyncPoller} for polling of represents a cluster firewall rule. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, FirewallRuleInner> beginCreateOrUpdate( - String resourceGroupName, String clusterName, String firewallRuleName, FirewallRuleInner parameters) { - return this - .beginCreateOrUpdateAsync(resourceGroupName, clusterName, firewallRuleName, parameters) + public SyncPoller, FirewallRuleInner> beginCreateOrUpdate(String resourceGroupName, + String clusterName, String firewallRuleName, FirewallRuleInner parameters) { + return this.beginCreateOrUpdateAsync(resourceGroupName, clusterName, firewallRuleName, parameters) .getSyncPoller(); } /** * Creates a new cluster firewall rule or updates an existing cluster firewall rule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param firewallRuleName The name of the cluster firewall rule. @@ -339,20 +283,15 @@ public SyncPoller, FirewallRuleInner> beginCreateO * @return the {@link SyncPoller} for polling of represents a cluster firewall rule. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, FirewallRuleInner> beginCreateOrUpdate( - String resourceGroupName, - String clusterName, - String firewallRuleName, - FirewallRuleInner parameters, - Context context) { - return this - .beginCreateOrUpdateAsync(resourceGroupName, clusterName, firewallRuleName, parameters, context) + public SyncPoller, FirewallRuleInner> beginCreateOrUpdate(String resourceGroupName, + String clusterName, String firewallRuleName, FirewallRuleInner parameters, Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, clusterName, firewallRuleName, parameters, context) .getSyncPoller(); } /** * Creates a new cluster firewall rule or updates an existing cluster firewall rule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param firewallRuleName The name of the cluster firewall rule. @@ -363,16 +302,15 @@ public SyncPoller, FirewallRuleInner> beginCreateO * @return represents a cluster firewall rule on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String clusterName, String firewallRuleName, FirewallRuleInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, clusterName, firewallRuleName, parameters) - .last() + private Mono createOrUpdateAsync(String resourceGroupName, String clusterName, + String firewallRuleName, FirewallRuleInner parameters) { + return beginCreateOrUpdateAsync(resourceGroupName, clusterName, firewallRuleName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Creates a new cluster firewall rule or updates an existing cluster firewall rule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param firewallRuleName The name of the cluster firewall rule. @@ -384,20 +322,15 @@ private Mono createOrUpdateAsync( * @return represents a cluster firewall rule on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String clusterName, - String firewallRuleName, - FirewallRuleInner parameters, - Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, clusterName, firewallRuleName, parameters, context) - .last() + private Mono createOrUpdateAsync(String resourceGroupName, String clusterName, + String firewallRuleName, FirewallRuleInner parameters, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, clusterName, firewallRuleName, parameters, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Creates a new cluster firewall rule or updates an existing cluster firewall rule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param firewallRuleName The name of the cluster firewall rule. @@ -408,14 +341,14 @@ private Mono createOrUpdateAsync( * @return represents a cluster firewall rule. */ @ServiceMethod(returns = ReturnType.SINGLE) - public FirewallRuleInner createOrUpdate( - String resourceGroupName, String clusterName, String firewallRuleName, FirewallRuleInner parameters) { + public FirewallRuleInner createOrUpdate(String resourceGroupName, String clusterName, String firewallRuleName, + FirewallRuleInner parameters) { return createOrUpdateAsync(resourceGroupName, clusterName, firewallRuleName, parameters).block(); } /** * Creates a new cluster firewall rule or updates an existing cluster firewall rule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param firewallRuleName The name of the cluster firewall rule. @@ -427,18 +360,14 @@ public FirewallRuleInner createOrUpdate( * @return represents a cluster firewall rule. */ @ServiceMethod(returns = ReturnType.SINGLE) - public FirewallRuleInner createOrUpdate( - String resourceGroupName, - String clusterName, - String firewallRuleName, - FirewallRuleInner parameters, - Context context) { + public FirewallRuleInner createOrUpdate(String resourceGroupName, String clusterName, String firewallRuleName, + FirewallRuleInner parameters, Context context) { return createOrUpdateAsync(resourceGroupName, clusterName, firewallRuleName, parameters, context).block(); } /** * Deletes a cluster firewall rule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param firewallRuleName The name of the cluster firewall rule. @@ -448,19 +377,15 @@ public FirewallRuleInner createOrUpdate( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String clusterName, String firewallRuleName) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String clusterName, + String firewallRuleName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -475,24 +400,14 @@ private Mono>> deleteWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - clusterName, - firewallRuleName, - accept, - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, firewallRuleName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes a cluster firewall rule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param firewallRuleName The name of the cluster firewall rule. @@ -503,19 +418,15 @@ private Mono>> deleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String clusterName, String firewallRuleName, Context context) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String clusterName, + String firewallRuleName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -530,21 +441,13 @@ private Mono>> deleteWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - clusterName, - firewallRuleName, - accept, - context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, firewallRuleName, accept, context); } /** * Deletes a cluster firewall rule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param firewallRuleName The name of the cluster firewall rule. @@ -554,19 +457,17 @@ private Mono>> deleteWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String clusterName, String firewallRuleName) { - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, clusterName, firewallRuleName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String clusterName, + String firewallRuleName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, clusterName, firewallRuleName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Deletes a cluster firewall rule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param firewallRuleName The name of the cluster firewall rule. @@ -577,19 +478,18 @@ private PollerFlux, Void> beginDeleteAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String clusterName, String firewallRuleName, Context context) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String clusterName, + String firewallRuleName, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, clusterName, firewallRuleName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, clusterName, firewallRuleName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * Deletes a cluster firewall rule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param firewallRuleName The name of the cluster firewall rule. @@ -599,14 +499,14 @@ private PollerFlux, Void> beginDeleteAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String clusterName, String firewallRuleName) { + public SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, + String firewallRuleName) { return this.beginDeleteAsync(resourceGroupName, clusterName, firewallRuleName).getSyncPoller(); } /** * Deletes a cluster firewall rule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param firewallRuleName The name of the cluster firewall rule. @@ -617,14 +517,14 @@ public SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String clusterName, String firewallRuleName, Context context) { + public SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, + String firewallRuleName, Context context) { return this.beginDeleteAsync(resourceGroupName, clusterName, firewallRuleName, context).getSyncPoller(); } /** * Deletes a cluster firewall rule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param firewallRuleName The name of the cluster firewall rule. @@ -635,14 +535,13 @@ public SyncPoller, Void> beginDelete( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String clusterName, String firewallRuleName) { - return beginDeleteAsync(resourceGroupName, clusterName, firewallRuleName) - .last() + return beginDeleteAsync(resourceGroupName, clusterName, firewallRuleName).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Deletes a cluster firewall rule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param firewallRuleName The name of the cluster firewall rule. @@ -653,16 +552,15 @@ private Mono deleteAsync(String resourceGroupName, String clusterName, Str * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync( - String resourceGroupName, String clusterName, String firewallRuleName, Context context) { - return beginDeleteAsync(resourceGroupName, clusterName, firewallRuleName, context) - .last() + private Mono deleteAsync(String resourceGroupName, String clusterName, String firewallRuleName, + Context context) { + return beginDeleteAsync(resourceGroupName, clusterName, firewallRuleName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Deletes a cluster firewall rule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param firewallRuleName The name of the cluster firewall rule. @@ -677,7 +575,7 @@ public void delete(String resourceGroupName, String clusterName, String firewall /** * Deletes a cluster firewall rule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param firewallRuleName The name of the cluster firewall rule. @@ -693,30 +591,26 @@ public void delete(String resourceGroupName, String clusterName, String firewall /** * Gets information about a cluster firewall rule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param firewallRuleName The name of the cluster 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 cluster firewall rule along with {@link Response} on successful completion of {@link - * Mono}. + * @return information about a cluster firewall rule along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String clusterName, String firewallRuleName) { + private Mono> getWithResponseAsync(String resourceGroupName, String clusterName, + String firewallRuleName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -731,24 +625,14 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - clusterName, - firewallRuleName, - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, firewallRuleName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets information about a cluster firewall rule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param firewallRuleName The name of the cluster firewall rule. @@ -756,23 +640,19 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @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 cluster firewall rule along with {@link Response} on successful completion of {@link - * Mono}. + * @return information about a cluster firewall rule along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String clusterName, String firewallRuleName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String clusterName, + String firewallRuleName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -787,21 +667,13 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - clusterName, - firewallRuleName, - accept, - context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, firewallRuleName, accept, context); } /** * Gets information about a cluster firewall rule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param firewallRuleName The name of the cluster firewall rule. @@ -818,7 +690,7 @@ private Mono getAsync(String resourceGroupName, String cluste /** * Gets information about a cluster firewall rule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param firewallRuleName The name of the cluster firewall rule. @@ -829,14 +701,14 @@ private Mono getAsync(String resourceGroupName, String cluste * @return information about a cluster firewall rule along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String clusterName, String firewallRuleName, Context context) { + public Response getWithResponse(String resourceGroupName, String clusterName, + String firewallRuleName, Context context) { return getWithResponseAsync(resourceGroupName, clusterName, firewallRuleName, context).block(); } /** * Gets information about a cluster firewall rule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param firewallRuleName The name of the cluster firewall rule. @@ -852,7 +724,7 @@ public FirewallRuleInner get(String resourceGroupName, String clusterName, Strin /** * Lists all the firewall rules on cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -861,19 +733,15 @@ public FirewallRuleInner get(String resourceGroupName, String clusterName, Strin * @return a list of firewall rules along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByClusterSinglePageAsync( - String resourceGroupName, String clusterName) { + private Mono> listByClusterSinglePageAsync(String resourceGroupName, + String clusterName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -884,27 +752,16 @@ private Mono> listByClusterSinglePageAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByCluster( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - clusterName, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)) + .withContext(context -> service.listByCluster(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), null, null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Lists all the firewall rules on cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param context The context to associate with this operation. @@ -914,19 +771,15 @@ private Mono> listByClusterSinglePageAsync( * @return a list of firewall rules along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByClusterSinglePageAsync( - String resourceGroupName, String clusterName, Context context) { + private Mono> listByClusterSinglePageAsync(String resourceGroupName, + String clusterName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -938,23 +791,15 @@ private Mono> listByClusterSinglePageAsync( final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByCluster( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - clusterName, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)); + .listByCluster(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), null, null)); } /** * Lists all the firewall rules on cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -969,7 +814,7 @@ private PagedFlux listByClusterAsync(String resourceGroupName /** * Lists all the firewall rules on cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param context The context to associate with this operation. @@ -979,14 +824,14 @@ private PagedFlux listByClusterAsync(String resourceGroupName * @return a list of firewall rules as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByClusterAsync( - String resourceGroupName, String clusterName, Context context) { + private PagedFlux listByClusterAsync(String resourceGroupName, String clusterName, + Context context) { return new PagedFlux<>(() -> listByClusterSinglePageAsync(resourceGroupName, clusterName, context)); } /** * Lists all the firewall rules on cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1001,7 +846,7 @@ public PagedIterable listByCluster(String resourceGroupName, /** * Lists all the firewall rules on cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param context The context to associate with this operation. @@ -1011,8 +856,8 @@ public PagedIterable listByCluster(String resourceGroupName, * @return a list of firewall rules as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByCluster( - String resourceGroupName, String clusterName, Context context) { + public PagedIterable listByCluster(String resourceGroupName, String clusterName, + Context context) { return new PagedIterable<>(listByClusterAsync(resourceGroupName, clusterName, context)); } } diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/FirewallRulesImpl.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/FirewallRulesImpl.java index b04927941661..2594afae4fed 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/FirewallRulesImpl.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/FirewallRulesImpl.java @@ -21,8 +21,7 @@ public final class FirewallRulesImpl implements FirewallRules { private final com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager serviceManager; - public FirewallRulesImpl( - FirewallRulesClient innerClient, + public FirewallRulesImpl(FirewallRulesClient innerClient, com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; @@ -36,15 +35,12 @@ public void delete(String resourceGroupName, String clusterName, String firewall this.serviceClient().delete(resourceGroupName, clusterName, firewallRuleName, context); } - public Response getWithResponse( - String resourceGroupName, String clusterName, String firewallRuleName, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, clusterName, firewallRuleName, context); + public Response getWithResponse(String resourceGroupName, String clusterName, String firewallRuleName, + Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, clusterName, firewallRuleName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new FirewallRuleImpl(inner.getValue(), this.manager())); } else { return null; @@ -62,119 +58,87 @@ public FirewallRule get(String resourceGroupName, String clusterName, String fir public PagedIterable listByCluster(String resourceGroupName, String clusterName) { PagedIterable inner = this.serviceClient().listByCluster(resourceGroupName, clusterName); - return Utils.mapPage(inner, inner1 -> new FirewallRuleImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new FirewallRuleImpl(inner1, this.manager())); } public PagedIterable listByCluster(String resourceGroupName, String clusterName, Context context) { - PagedIterable inner = - this.serviceClient().listByCluster(resourceGroupName, clusterName, context); - return Utils.mapPage(inner, inner1 -> new FirewallRuleImpl(inner1, this.manager())); + PagedIterable inner + = this.serviceClient().listByCluster(resourceGroupName, clusterName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new FirewallRuleImpl(inner1, this.manager())); } public FirewallRule getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String clusterName = Utils.getValueFromIdByName(id, "serverGroupsv2"); + String clusterName = ResourceManagerUtils.getValueFromIdByName(id, "serverGroupsv2"); if (clusterName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'serverGroupsv2'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'serverGroupsv2'.", id))); } - String firewallRuleName = Utils.getValueFromIdByName(id, "firewallRules"); + String firewallRuleName = ResourceManagerUtils.getValueFromIdByName(id, "firewallRules"); if (firewallRuleName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'firewallRules'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'firewallRules'.", id))); } return this.getWithResponse(resourceGroupName, clusterName, firewallRuleName, Context.NONE).getValue(); } public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String clusterName = Utils.getValueFromIdByName(id, "serverGroupsv2"); + String clusterName = ResourceManagerUtils.getValueFromIdByName(id, "serverGroupsv2"); if (clusterName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'serverGroupsv2'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'serverGroupsv2'.", id))); } - String firewallRuleName = Utils.getValueFromIdByName(id, "firewallRules"); + String firewallRuleName = ResourceManagerUtils.getValueFromIdByName(id, "firewallRules"); if (firewallRuleName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'firewallRules'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'firewallRules'.", id))); } return this.getWithResponse(resourceGroupName, clusterName, firewallRuleName, context); } public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String clusterName = Utils.getValueFromIdByName(id, "serverGroupsv2"); + String clusterName = ResourceManagerUtils.getValueFromIdByName(id, "serverGroupsv2"); if (clusterName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'serverGroupsv2'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'serverGroupsv2'.", id))); } - String firewallRuleName = Utils.getValueFromIdByName(id, "firewallRules"); + String firewallRuleName = ResourceManagerUtils.getValueFromIdByName(id, "firewallRules"); if (firewallRuleName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'firewallRules'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'firewallRules'.", id))); } this.delete(resourceGroupName, clusterName, firewallRuleName, Context.NONE); } public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String clusterName = Utils.getValueFromIdByName(id, "serverGroupsv2"); + String clusterName = ResourceManagerUtils.getValueFromIdByName(id, "serverGroupsv2"); if (clusterName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'serverGroupsv2'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'serverGroupsv2'.", id))); } - String firewallRuleName = Utils.getValueFromIdByName(id, "firewallRules"); + String firewallRuleName = ResourceManagerUtils.getValueFromIdByName(id, "firewallRules"); if (firewallRuleName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'firewallRules'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'firewallRules'.", id))); } this.delete(resourceGroupName, clusterName, firewallRuleName, context); } diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/NameAvailabilityImpl.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/NameAvailabilityImpl.java index e9f94f103b08..f9e9d6908c0b 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/NameAvailabilityImpl.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/NameAvailabilityImpl.java @@ -12,8 +12,7 @@ public final class NameAvailabilityImpl implements NameAvailability { private final com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager serviceManager; - NameAvailabilityImpl( - NameAvailabilityInner innerObject, + NameAvailabilityImpl(NameAvailabilityInner innerObject, com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/OperationImpl.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/OperationImpl.java index ff8cb1f99cbb..fa818cca8702 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/OperationImpl.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/OperationImpl.java @@ -16,8 +16,7 @@ public final class OperationImpl implements Operation { private final com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager serviceManager; - OperationImpl( - OperationInner innerObject, + OperationImpl(OperationInner innerObject, com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/OperationsClientImpl.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/OperationsClientImpl.java index 202d943a9c51..e816650e8997 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/OperationsClientImpl.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/OperationsClientImpl.java @@ -29,22 +29,28 @@ import com.azure.resourcemanager.cosmosdbforpostgresql.models.OperationListResult; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in OperationsClient. */ +/** + * An instance of this class provides access to all the operations defined in OperationsClient. + */ public final class OperationsClientImpl implements OperationsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final OperationsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final CosmosDBForPostgreSqlImpl client; /** * Initializes an instance of OperationsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ OperationsClientImpl(CosmosDBForPostgreSqlImpl client) { - this.service = - RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -55,75 +61,63 @@ public final class OperationsClientImpl implements OperationsClient { @Host("{$host}") @ServiceInterface(name = "CosmosDBForPostgreSq") public interface OperationsService { - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/providers/Microsoft.DBforPostgreSQL/operations") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); } /** * Lists all of the available REST API operations. - * + * * @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 resource provider operations along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@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.")); + 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.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), null, null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Lists all of the available REST API operations. - * + * * @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 resource provider operations along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)); + return service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), null, null)); } /** * Lists all of the available REST API operations. - * + * * @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 resource provider operations as paginated response with {@link PagedFlux}. @@ -135,7 +129,7 @@ private PagedFlux listAsync() { /** * Lists all of the available REST API operations. - * + * * @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. @@ -149,7 +143,7 @@ private PagedFlux listAsync(Context context) { /** * Lists all of the available REST API operations. - * + * * @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 resource provider operations as paginated response with {@link PagedIterable}. @@ -161,7 +155,7 @@ public PagedIterable list() { /** * Lists all of the available REST API operations. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/OperationsImpl.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/OperationsImpl.java index 12183dbf0f21..d085d7a9771f 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/OperationsImpl.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/OperationsImpl.java @@ -19,8 +19,7 @@ public final class OperationsImpl implements Operations { private final com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager serviceManager; - public OperationsImpl( - OperationsClient innerClient, + public OperationsImpl(OperationsClient innerClient, com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; @@ -28,12 +27,12 @@ public OperationsImpl( public PagedIterable list() { PagedIterable inner = this.serviceClient().list(); - return Utils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); } public PagedIterable list(Context context) { PagedIterable inner = this.serviceClient().list(context); - return Utils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); } private OperationsClient serviceClient() { diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/PrivateEndpointConnectionImpl.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/PrivateEndpointConnectionImpl.java index 6f8fd99aa559..2b548ca857d3 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/PrivateEndpointConnectionImpl.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/PrivateEndpointConnectionImpl.java @@ -82,27 +82,19 @@ public PrivateEndpointConnectionImpl withExistingServerGroupsv2(String resourceG } public PrivateEndpointConnection create() { - this.innerObject = - serviceManager - .serviceClient() - .getPrivateEndpointConnections() - .createOrUpdate( - resourceGroupName, clusterName, privateEndpointConnectionName, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient().getPrivateEndpointConnections().createOrUpdate( + resourceGroupName, clusterName, privateEndpointConnectionName, this.innerModel(), Context.NONE); return this; } public PrivateEndpointConnection create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getPrivateEndpointConnections() - .createOrUpdate( - resourceGroupName, clusterName, privateEndpointConnectionName, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient().getPrivateEndpointConnections() + .createOrUpdate(resourceGroupName, clusterName, privateEndpointConnectionName, this.innerModel(), context); return this; } - PrivateEndpointConnectionImpl( - String name, com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager serviceManager) { + PrivateEndpointConnectionImpl(String name, + com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager serviceManager) { this.innerObject = new PrivateEndpointConnectionInner(); this.serviceManager = serviceManager; this.privateEndpointConnectionName = name; @@ -113,52 +105,36 @@ public PrivateEndpointConnectionImpl update() { } public PrivateEndpointConnection apply() { - this.innerObject = - serviceManager - .serviceClient() - .getPrivateEndpointConnections() - .createOrUpdate( - resourceGroupName, clusterName, privateEndpointConnectionName, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient().getPrivateEndpointConnections().createOrUpdate( + resourceGroupName, clusterName, privateEndpointConnectionName, this.innerModel(), Context.NONE); return this; } public PrivateEndpointConnection apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getPrivateEndpointConnections() - .createOrUpdate( - resourceGroupName, clusterName, privateEndpointConnectionName, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient().getPrivateEndpointConnections() + .createOrUpdate(resourceGroupName, clusterName, privateEndpointConnectionName, this.innerModel(), context); return this; } - PrivateEndpointConnectionImpl( - PrivateEndpointConnectionInner innerObject, + PrivateEndpointConnectionImpl(PrivateEndpointConnectionInner innerObject, com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.clusterName = Utils.getValueFromIdByName(innerObject.id(), "serverGroupsv2"); - this.privateEndpointConnectionName = Utils.getValueFromIdByName(innerObject.id(), "privateEndpointConnections"); + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.clusterName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "serverGroupsv2"); + this.privateEndpointConnectionName + = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "privateEndpointConnections"); } public PrivateEndpointConnection refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getPrivateEndpointConnections() - .getWithResponse(resourceGroupName, clusterName, privateEndpointConnectionName, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getPrivateEndpointConnections() + .getWithResponse(resourceGroupName, clusterName, privateEndpointConnectionName, Context.NONE).getValue(); return this; } public PrivateEndpointConnection refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getPrivateEndpointConnections() - .getWithResponse(resourceGroupName, clusterName, privateEndpointConnectionName, context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getPrivateEndpointConnections() + .getWithResponse(resourceGroupName, clusterName, privateEndpointConnectionName, context).getValue(); return this; } @@ -167,8 +143,8 @@ public PrivateEndpointConnectionImpl withPrivateEndpoint(PrivateEndpoint private return this; } - public PrivateEndpointConnectionImpl withPrivateLinkServiceConnectionState( - PrivateLinkServiceConnectionState privateLinkServiceConnectionState) { + public PrivateEndpointConnectionImpl + withPrivateLinkServiceConnectionState(PrivateLinkServiceConnectionState privateLinkServiceConnectionState) { this.innerModel().withPrivateLinkServiceConnectionState(privateLinkServiceConnectionState); return this; } diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/PrivateEndpointConnectionsClientImpl.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/PrivateEndpointConnectionsClientImpl.java index 868c7106a8db..44ea5dad7f2b 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/PrivateEndpointConnectionsClientImpl.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/PrivateEndpointConnectionsClientImpl.java @@ -38,24 +38,28 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in PrivateEndpointConnectionsClient. */ +/** + * An instance of this class provides access to all the operations defined in PrivateEndpointConnectionsClient. + */ public final class PrivateEndpointConnectionsClientImpl implements PrivateEndpointConnectionsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final PrivateEndpointConnectionsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final CosmosDBForPostgreSqlImpl client; /** * Initializes an instance of PrivateEndpointConnectionsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ PrivateEndpointConnectionsClientImpl(CosmosDBForPostgreSqlImpl client) { - this.service = - RestProxy - .create( - PrivateEndpointConnectionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service = RestProxy.create(PrivateEndpointConnectionsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -66,92 +70,68 @@ public final class PrivateEndpointConnectionsClientImpl implements PrivateEndpoi @Host("{$host}") @ServiceInterface(name = "CosmosDBForPostgreSq") public interface PrivateEndpointConnectionsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/serverGroupsv2/{clusterName}/privateEndpointConnections") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/serverGroupsv2/{clusterName}/privateEndpointConnections") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByCluster( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("clusterName") String clusterName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/serverGroupsv2/{clusterName}/privateEndpointConnections/{privateEndpointConnectionName}") - @ExpectedResponses({200}) + Mono> listByCluster(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/serverGroupsv2/{clusterName}/privateEndpointConnections/{privateEndpointConnectionName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("clusterName") String clusterName, + Mono> get(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, - @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/serverGroupsv2/{clusterName}/privateEndpointConnections/{privateEndpointConnectionName}") - @ExpectedResponses({200, 201}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/serverGroupsv2/{clusterName}/privateEndpointConnections/{privateEndpointConnectionName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("clusterName") String clusterName, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, @BodyParam("application/json") PrivateEndpointConnectionInner parameters, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/serverGroupsv2/{clusterName}/privateEndpointConnections/{privateEndpointConnectionName}") - @ExpectedResponses({202, 204}) + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/serverGroupsv2/{clusterName}/privateEndpointConnections/{privateEndpointConnectionName}") + @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("clusterName") String clusterName, + Mono>> delete(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); } /** * Gets list of private endpoint connections on a cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @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 private endpoint connections on a cluster along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByClusterSinglePageAsync( - String resourceGroupName, String clusterName) { + private Mono> listByClusterSinglePageAsync(String resourceGroupName, + String clusterName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -162,27 +142,16 @@ private Mono> listByClusterSingleP } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByCluster( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - clusterName, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)) + .withContext(context -> service.listByCluster(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets list of private endpoint connections on a cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param context The context to associate with this operation. @@ -190,22 +159,18 @@ private Mono> listByClusterSingleP * @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 private endpoint connections on a cluster along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByClusterSinglePageAsync( - String resourceGroupName, String clusterName, Context context) { + private Mono> listByClusterSinglePageAsync(String resourceGroupName, + String clusterName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -217,23 +182,15 @@ private Mono> listByClusterSingleP final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByCluster( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - clusterName, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)); + .listByCluster(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), null, null)); } /** * Gets list of private endpoint connections on a cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -248,7 +205,7 @@ private PagedFlux listByClusterAsync(String reso /** * Gets list of private endpoint connections on a cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param context The context to associate with this operation. @@ -258,14 +215,14 @@ private PagedFlux listByClusterAsync(String reso * @return list of private endpoint connections on a cluster as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByClusterAsync( - String resourceGroupName, String clusterName, Context context) { + private PagedFlux listByClusterAsync(String resourceGroupName, String clusterName, + Context context) { return new PagedFlux<>(() -> listByClusterSinglePageAsync(resourceGroupName, clusterName, context)); } /** * Gets list of private endpoint connections on a cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -280,7 +237,7 @@ public PagedIterable listByCluster(String resour /** * Gets list of private endpoint connections on a cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param context The context to associate with this operation. @@ -290,14 +247,14 @@ public PagedIterable listByCluster(String resour * @return list of private endpoint connections on a cluster as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByCluster( - String resourceGroupName, String clusterName, Context context) { + public PagedIterable listByCluster(String resourceGroupName, String clusterName, + Context context) { return new PagedIterable<>(listByClusterAsync(resourceGroupName, clusterName, context)); } /** * Gets private endpoint connection. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the cluster. @@ -307,19 +264,15 @@ public PagedIterable listByCluster( * @return private endpoint connection along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String clusterName, String privateEndpointConnectionName) { + private Mono> getWithResponseAsync(String resourceGroupName, + String clusterName, String privateEndpointConnectionName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -329,31 +282,20 @@ private Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); } if (privateEndpointConnectionName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be 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(), - this.client.getSubscriptionId(), - resourceGroupName, - clusterName, - privateEndpointConnectionName, - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, privateEndpointConnectionName, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets private endpoint connection. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the cluster. @@ -364,19 +306,15 @@ private Mono> getWithResponseAsync( * @return private endpoint connection along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String clusterName, String privateEndpointConnectionName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, + String clusterName, String privateEndpointConnectionName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -386,28 +324,18 @@ private Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); } if (privateEndpointConnectionName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - clusterName, - privateEndpointConnectionName, - accept, - context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, privateEndpointConnectionName, accept, context); } /** * Gets private endpoint connection. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the cluster. @@ -417,15 +345,15 @@ private Mono> getWithResponseAsync( * @return private endpoint connection on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String resourceGroupName, String clusterName, String privateEndpointConnectionName) { + private Mono getAsync(String resourceGroupName, String clusterName, + String privateEndpointConnectionName) { return getWithResponseAsync(resourceGroupName, clusterName, privateEndpointConnectionName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Gets private endpoint connection. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the cluster. @@ -436,14 +364,14 @@ private Mono getAsync( * @return private endpoint connection along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String clusterName, String privateEndpointConnectionName, Context context) { + public Response getWithResponse(String resourceGroupName, String clusterName, + String privateEndpointConnectionName, Context context) { return getWithResponseAsync(resourceGroupName, clusterName, privateEndpointConnectionName, context).block(); } /** * Gets private endpoint connection. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the cluster. @@ -453,14 +381,14 @@ public Response getWithResponse( * @return private endpoint connection. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PrivateEndpointConnectionInner get( - String resourceGroupName, String clusterName, String privateEndpointConnectionName) { + public PrivateEndpointConnectionInner get(String resourceGroupName, String clusterName, + String privateEndpointConnectionName) { return getWithResponse(resourceGroupName, clusterName, privateEndpointConnectionName, Context.NONE).getValue(); } /** * Approves or Rejects a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the cluster. @@ -468,26 +396,19 @@ public PrivateEndpointConnectionInner get( * @throws IllegalArgumentException thrown if parameters fail the validation. * @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 private endpoint connection resource along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String clusterName, - String privateEndpointConnectionName, - PrivateEndpointConnectionInner parameters) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String clusterName, String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -497,10 +418,8 @@ private Mono>> createOrUpdateWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); } if (privateEndpointConnectionName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be 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.")); @@ -509,25 +428,15 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - clusterName, - privateEndpointConnectionName, - parameters, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, privateEndpointConnectionName, + parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Approves or Rejects a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the cluster. @@ -536,27 +445,20 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @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 private endpoint connection resource along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String clusterName, - String privateEndpointConnectionName, - PrivateEndpointConnectionInner parameters, + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String clusterName, String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -566,10 +468,8 @@ private Mono>> createOrUpdateWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); } if (privateEndpointConnectionName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be 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.")); @@ -578,22 +478,14 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - clusterName, - privateEndpointConnectionName, - parameters, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, privateEndpointConnectionName, parameters, + accept, context); } /** * Approves or Rejects a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the cluster. @@ -605,26 +497,18 @@ private Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, PrivateEndpointConnectionInner> - beginCreateOrUpdateAsync( - String resourceGroupName, - String clusterName, - String privateEndpointConnectionName, + beginCreateOrUpdateAsync(String resourceGroupName, String clusterName, String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters) { - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, clusterName, privateEndpointConnectionName, parameters); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - PrivateEndpointConnectionInner.class, - PrivateEndpointConnectionInner.class, - this.client.getContext()); + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, clusterName, + privateEndpointConnectionName, parameters); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), PrivateEndpointConnectionInner.class, PrivateEndpointConnectionInner.class, + this.client.getContext()); } /** * Approves or Rejects a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the cluster. @@ -637,29 +521,19 @@ private Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, PrivateEndpointConnectionInner> - beginCreateOrUpdateAsync( - String resourceGroupName, - String clusterName, - String privateEndpointConnectionName, - PrivateEndpointConnectionInner parameters, - Context context) { + beginCreateOrUpdateAsync(String resourceGroupName, String clusterName, String privateEndpointConnectionName, + PrivateEndpointConnectionInner parameters, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync( - resourceGroupName, clusterName, privateEndpointConnectionName, parameters, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - PrivateEndpointConnectionInner.class, - PrivateEndpointConnectionInner.class, - context); + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, clusterName, + privateEndpointConnectionName, parameters, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), PrivateEndpointConnectionInner.class, PrivateEndpointConnectionInner.class, + context); } /** * Approves or Rejects a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the cluster. @@ -671,18 +545,15 @@ private Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, PrivateEndpointConnectionInner> beginCreateOrUpdate( - String resourceGroupName, - String clusterName, - String privateEndpointConnectionName, + String resourceGroupName, String clusterName, String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters) { - return this - .beginCreateOrUpdateAsync(resourceGroupName, clusterName, privateEndpointConnectionName, parameters) + return this.beginCreateOrUpdateAsync(resourceGroupName, clusterName, privateEndpointConnectionName, parameters) .getSyncPoller(); } /** * Approves or Rejects a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the cluster. @@ -695,20 +566,15 @@ public SyncPoller, PrivateEndpointCon */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, PrivateEndpointConnectionInner> beginCreateOrUpdate( - String resourceGroupName, - String clusterName, - String privateEndpointConnectionName, - PrivateEndpointConnectionInner parameters, - Context context) { - return this - .beginCreateOrUpdateAsync( - resourceGroupName, clusterName, privateEndpointConnectionName, parameters, context) - .getSyncPoller(); + String resourceGroupName, String clusterName, String privateEndpointConnectionName, + PrivateEndpointConnectionInner parameters, Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, clusterName, privateEndpointConnectionName, parameters, + context).getSyncPoller(); } /** * Approves or Rejects a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the cluster. @@ -719,19 +585,15 @@ public SyncPoller, PrivateEndpointCon * @return the private endpoint connection resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String clusterName, - String privateEndpointConnectionName, - PrivateEndpointConnectionInner parameters) { + private Mono createOrUpdateAsync(String resourceGroupName, String clusterName, + String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters) { return beginCreateOrUpdateAsync(resourceGroupName, clusterName, privateEndpointConnectionName, parameters) - .last() - .flatMap(this.client::getLroFinalResultOrError); + .last().flatMap(this.client::getLroFinalResultOrError); } /** * Approves or Rejects a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the cluster. @@ -743,21 +605,15 @@ private Mono createOrUpdateAsync( * @return the private endpoint connection resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String clusterName, - String privateEndpointConnectionName, - PrivateEndpointConnectionInner parameters, - Context context) { - return beginCreateOrUpdateAsync( - resourceGroupName, clusterName, privateEndpointConnectionName, parameters, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono createOrUpdateAsync(String resourceGroupName, String clusterName, + String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, clusterName, privateEndpointConnectionName, parameters, + context).last().flatMap(this.client::getLroFinalResultOrError); } /** * Approves or Rejects a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the cluster. @@ -768,17 +624,14 @@ private Mono createOrUpdateAsync( * @return the private endpoint connection resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PrivateEndpointConnectionInner createOrUpdate( - String resourceGroupName, - String clusterName, - String privateEndpointConnectionName, - PrivateEndpointConnectionInner parameters) { + public PrivateEndpointConnectionInner createOrUpdate(String resourceGroupName, String clusterName, + String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters) { return createOrUpdateAsync(resourceGroupName, clusterName, privateEndpointConnectionName, parameters).block(); } /** * Approves or Rejects a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the cluster. @@ -790,19 +643,15 @@ public PrivateEndpointConnectionInner createOrUpdate( * @return the private endpoint connection resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PrivateEndpointConnectionInner createOrUpdate( - String resourceGroupName, - String clusterName, - String privateEndpointConnectionName, - PrivateEndpointConnectionInner parameters, - Context context) { + public PrivateEndpointConnectionInner createOrUpdate(String resourceGroupName, String clusterName, + String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters, Context context) { return createOrUpdateAsync(resourceGroupName, clusterName, privateEndpointConnectionName, parameters, context) .block(); } /** * Deletes a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the cluster. @@ -812,19 +661,15 @@ public PrivateEndpointConnectionInner createOrUpdate( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String clusterName, String privateEndpointConnectionName) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String clusterName, + String privateEndpointConnectionName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -834,31 +679,20 @@ private Mono>> deleteWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); } if (privateEndpointConnectionName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be 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, - clusterName, - privateEndpointConnectionName, - accept, - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, privateEndpointConnectionName, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the cluster. @@ -869,19 +703,15 @@ private Mono>> deleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String clusterName, String privateEndpointConnectionName, Context context) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String clusterName, + String privateEndpointConnectionName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -891,28 +721,18 @@ private Mono>> deleteWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); } if (privateEndpointConnectionName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - clusterName, - privateEndpointConnectionName, - accept, - context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, privateEndpointConnectionName, accept, context); } /** * Deletes a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the cluster. @@ -922,19 +742,17 @@ private Mono>> deleteWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String clusterName, String privateEndpointConnectionName) { - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, clusterName, privateEndpointConnectionName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String clusterName, + String privateEndpointConnectionName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, clusterName, privateEndpointConnectionName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Deletes a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the cluster. @@ -945,19 +763,18 @@ private PollerFlux, Void> beginDeleteAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String clusterName, String privateEndpointConnectionName, Context context) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String clusterName, + String privateEndpointConnectionName, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, clusterName, privateEndpointConnectionName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, clusterName, privateEndpointConnectionName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * Deletes a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the cluster. @@ -967,14 +784,14 @@ private PollerFlux, Void> beginDeleteAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String clusterName, String privateEndpointConnectionName) { + public SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, + String privateEndpointConnectionName) { return this.beginDeleteAsync(resourceGroupName, clusterName, privateEndpointConnectionName).getSyncPoller(); } /** * Deletes a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the cluster. @@ -985,16 +802,15 @@ public SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String clusterName, String privateEndpointConnectionName, Context context) { - return this - .beginDeleteAsync(resourceGroupName, clusterName, privateEndpointConnectionName, context) + public SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, + String privateEndpointConnectionName, Context context) { + return this.beginDeleteAsync(resourceGroupName, clusterName, privateEndpointConnectionName, context) .getSyncPoller(); } /** * Deletes a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the cluster. @@ -1005,14 +821,13 @@ public SyncPoller, Void> beginDelete( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String clusterName, String privateEndpointConnectionName) { - return beginDeleteAsync(resourceGroupName, clusterName, privateEndpointConnectionName) - .last() + return beginDeleteAsync(resourceGroupName, clusterName, privateEndpointConnectionName).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Deletes a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the cluster. @@ -1023,16 +838,15 @@ private Mono deleteAsync(String resourceGroupName, String clusterName, Str * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync( - String resourceGroupName, String clusterName, String privateEndpointConnectionName, Context context) { - return beginDeleteAsync(resourceGroupName, clusterName, privateEndpointConnectionName, context) - .last() + private Mono deleteAsync(String resourceGroupName, String clusterName, String privateEndpointConnectionName, + Context context) { + return beginDeleteAsync(resourceGroupName, clusterName, privateEndpointConnectionName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Deletes a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the cluster. @@ -1047,7 +861,7 @@ public void delete(String resourceGroupName, String clusterName, String privateE /** * Deletes a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the cluster. @@ -1057,8 +871,8 @@ public void delete(String resourceGroupName, String clusterName, String privateE * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete( - String resourceGroupName, String clusterName, String privateEndpointConnectionName, Context context) { + public void delete(String resourceGroupName, String clusterName, String privateEndpointConnectionName, + Context context) { deleteAsync(resourceGroupName, clusterName, privateEndpointConnectionName, context).block(); } } diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/PrivateEndpointConnectionsImpl.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/PrivateEndpointConnectionsImpl.java index c6545912749a..569e0327643e 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/PrivateEndpointConnectionsImpl.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/PrivateEndpointConnectionsImpl.java @@ -21,47 +21,41 @@ public final class PrivateEndpointConnectionsImpl implements PrivateEndpointConn private final com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager serviceManager; - public PrivateEndpointConnectionsImpl( - PrivateEndpointConnectionsClient innerClient, + public PrivateEndpointConnectionsImpl(PrivateEndpointConnectionsClient innerClient, com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } public PagedIterable listByCluster(String resourceGroupName, String clusterName) { - PagedIterable inner = - this.serviceClient().listByCluster(resourceGroupName, clusterName); - return Utils.mapPage(inner, inner1 -> new PrivateEndpointConnectionImpl(inner1, this.manager())); + PagedIterable inner + = this.serviceClient().listByCluster(resourceGroupName, clusterName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new PrivateEndpointConnectionImpl(inner1, this.manager())); } - public PagedIterable listByCluster( - String resourceGroupName, String clusterName, Context context) { - PagedIterable inner = - this.serviceClient().listByCluster(resourceGroupName, clusterName, context); - return Utils.mapPage(inner, inner1 -> new PrivateEndpointConnectionImpl(inner1, this.manager())); + public PagedIterable listByCluster(String resourceGroupName, String clusterName, + Context context) { + PagedIterable inner + = this.serviceClient().listByCluster(resourceGroupName, clusterName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new PrivateEndpointConnectionImpl(inner1, this.manager())); } - public Response getWithResponse( - String resourceGroupName, String clusterName, String privateEndpointConnectionName, Context context) { - Response inner = - this - .serviceClient() - .getWithResponse(resourceGroupName, clusterName, privateEndpointConnectionName, context); + public Response getWithResponse(String resourceGroupName, String clusterName, + String privateEndpointConnectionName, Context context) { + Response inner = this.serviceClient().getWithResponse(resourceGroupName, + clusterName, privateEndpointConnectionName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new PrivateEndpointConnectionImpl(inner.getValue(), this.manager())); } else { return null; } } - public PrivateEndpointConnection get( - String resourceGroupName, String clusterName, String privateEndpointConnectionName) { - PrivateEndpointConnectionInner inner = - this.serviceClient().get(resourceGroupName, clusterName, privateEndpointConnectionName); + public PrivateEndpointConnection get(String resourceGroupName, String clusterName, + String privateEndpointConnectionName) { + PrivateEndpointConnectionInner inner + = this.serviceClient().get(resourceGroupName, clusterName, privateEndpointConnectionName); if (inner != null) { return new PrivateEndpointConnectionImpl(inner, this.manager()); } else { @@ -73,129 +67,88 @@ public void delete(String resourceGroupName, String clusterName, String privateE this.serviceClient().delete(resourceGroupName, clusterName, privateEndpointConnectionName); } - public void delete( - String resourceGroupName, String clusterName, String privateEndpointConnectionName, Context context) { + public void delete(String resourceGroupName, String clusterName, String privateEndpointConnectionName, + Context context) { this.serviceClient().delete(resourceGroupName, clusterName, privateEndpointConnectionName, context); } public PrivateEndpointConnection getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String clusterName = Utils.getValueFromIdByName(id, "serverGroupsv2"); + String clusterName = ResourceManagerUtils.getValueFromIdByName(id, "serverGroupsv2"); if (clusterName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'serverGroupsv2'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'serverGroupsv2'.", id))); } - String privateEndpointConnectionName = Utils.getValueFromIdByName(id, "privateEndpointConnections"); + String privateEndpointConnectionName + = ResourceManagerUtils.getValueFromIdByName(id, "privateEndpointConnections"); if (privateEndpointConnectionName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'privateEndpointConnections'.", - id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'privateEndpointConnections'.", id))); } - return this - .getWithResponse(resourceGroupName, clusterName, privateEndpointConnectionName, Context.NONE) + return this.getWithResponse(resourceGroupName, clusterName, privateEndpointConnectionName, Context.NONE) .getValue(); } public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String clusterName = Utils.getValueFromIdByName(id, "serverGroupsv2"); + String clusterName = ResourceManagerUtils.getValueFromIdByName(id, "serverGroupsv2"); if (clusterName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'serverGroupsv2'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'serverGroupsv2'.", id))); } - String privateEndpointConnectionName = Utils.getValueFromIdByName(id, "privateEndpointConnections"); + String privateEndpointConnectionName + = ResourceManagerUtils.getValueFromIdByName(id, "privateEndpointConnections"); if (privateEndpointConnectionName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'privateEndpointConnections'.", - id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'privateEndpointConnections'.", id))); } return this.getWithResponse(resourceGroupName, clusterName, privateEndpointConnectionName, context); } public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String clusterName = Utils.getValueFromIdByName(id, "serverGroupsv2"); + String clusterName = ResourceManagerUtils.getValueFromIdByName(id, "serverGroupsv2"); if (clusterName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'serverGroupsv2'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'serverGroupsv2'.", id))); } - String privateEndpointConnectionName = Utils.getValueFromIdByName(id, "privateEndpointConnections"); + String privateEndpointConnectionName + = ResourceManagerUtils.getValueFromIdByName(id, "privateEndpointConnections"); if (privateEndpointConnectionName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'privateEndpointConnections'.", - id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'privateEndpointConnections'.", id))); } this.delete(resourceGroupName, clusterName, privateEndpointConnectionName, Context.NONE); } public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String clusterName = Utils.getValueFromIdByName(id, "serverGroupsv2"); + String clusterName = ResourceManagerUtils.getValueFromIdByName(id, "serverGroupsv2"); if (clusterName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'serverGroupsv2'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'serverGroupsv2'.", id))); } - String privateEndpointConnectionName = Utils.getValueFromIdByName(id, "privateEndpointConnections"); + String privateEndpointConnectionName + = ResourceManagerUtils.getValueFromIdByName(id, "privateEndpointConnections"); if (privateEndpointConnectionName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'privateEndpointConnections'.", - id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'privateEndpointConnections'.", id))); } this.delete(resourceGroupName, clusterName, privateEndpointConnectionName, context); } diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/PrivateLinkResourceImpl.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/PrivateLinkResourceImpl.java index fe7c5ffe73e1..38a86dc31297 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/PrivateLinkResourceImpl.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/PrivateLinkResourceImpl.java @@ -15,8 +15,7 @@ public final class PrivateLinkResourceImpl implements PrivateLinkResource { private final com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager serviceManager; - PrivateLinkResourceImpl( - PrivateLinkResourceInner innerObject, + PrivateLinkResourceImpl(PrivateLinkResourceInner innerObject, com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/PrivateLinkResourcesClientImpl.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/PrivateLinkResourcesClientImpl.java index bd2297c901e0..bee3a71c8890 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/PrivateLinkResourcesClientImpl.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/PrivateLinkResourcesClientImpl.java @@ -30,23 +30,28 @@ import com.azure.resourcemanager.cosmosdbforpostgresql.models.PrivateLinkResourceListResult; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in PrivateLinkResourcesClient. */ +/** + * An instance of this class provides access to all the operations defined in PrivateLinkResourcesClient. + */ public final class PrivateLinkResourcesClientImpl implements PrivateLinkResourcesClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final PrivateLinkResourcesService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final CosmosDBForPostgreSqlImpl client; /** * Initializes an instance of PrivateLinkResourcesClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ PrivateLinkResourcesClientImpl(CosmosDBForPostgreSqlImpl client) { - this.service = - RestProxy - .create(PrivateLinkResourcesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service = RestProxy.create(PrivateLinkResourcesService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -57,61 +62,47 @@ public final class PrivateLinkResourcesClientImpl implements PrivateLinkResource @Host("{$host}") @ServiceInterface(name = "CosmosDBForPostgreSq") public interface PrivateLinkResourcesService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/serverGroupsv2/{clusterName}/privateLinkResources") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/serverGroupsv2/{clusterName}/privateLinkResources") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByCluster( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("clusterName") String clusterName, - @HeaderParam("Accept") String accept, - Context context); + Mono> listByCluster(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/serverGroupsv2/{clusterName}/privateLinkResources/{privateLinkResourceName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/serverGroupsv2/{clusterName}/privateLinkResources/{privateLinkResourceName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("clusterName") String clusterName, - @PathParam("privateLinkResourceName") String privateLinkResourceName, - @HeaderParam("Accept") String accept, + Mono> get(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @PathParam("privateLinkResourceName") String privateLinkResourceName, @HeaderParam("Accept") String accept, Context context); } /** * Gets the private link resources for cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @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 link resources for cluster along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByClusterSinglePageAsync( - String resourceGroupName, String clusterName) { + private Mono> listByClusterSinglePageAsync(String resourceGroupName, + String clusterName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -122,27 +113,16 @@ private Mono> listByClusterSinglePageAsy } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByCluster( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - clusterName, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)) + .withContext(context -> service.listByCluster(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets the private link resources for cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param context The context to associate with this operation. @@ -150,22 +130,18 @@ private Mono> listByClusterSinglePageAsy * @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 link resources for cluster along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByClusterSinglePageAsync( - String resourceGroupName, String clusterName, Context context) { + private Mono> listByClusterSinglePageAsync(String resourceGroupName, + String clusterName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -177,23 +153,15 @@ private Mono> listByClusterSinglePageAsy final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByCluster( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - clusterName, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)); + .listByCluster(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), null, null)); } /** * Gets the private link resources for cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -208,7 +176,7 @@ private PagedFlux listByClusterAsync(String resourceGr /** * Gets the private link resources for cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param context The context to associate with this operation. @@ -218,14 +186,14 @@ private PagedFlux listByClusterAsync(String resourceGr * @return the private link resources for cluster as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByClusterAsync( - String resourceGroupName, String clusterName, Context context) { + private PagedFlux listByClusterAsync(String resourceGroupName, String clusterName, + Context context) { return new PagedFlux<>(() -> listByClusterSinglePageAsync(resourceGroupName, clusterName, context)); } /** * Gets the private link resources for cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -240,7 +208,7 @@ public PagedIterable listByCluster(String resourceGrou /** * Gets the private link resources for cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param context The context to associate with this operation. @@ -250,14 +218,14 @@ public PagedIterable listByCluster(String resourceGrou * @return the private link resources for cluster as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByCluster( - String resourceGroupName, String clusterName, Context context) { + public PagedIterable listByCluster(String resourceGroupName, String clusterName, + Context context) { return new PagedIterable<>(listByClusterAsync(resourceGroupName, clusterName, context)); } /** * Gets a private link resource for cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param privateLinkResourceName The name of the private link resource. @@ -267,19 +235,15 @@ public PagedIterable listByCluster( * @return a private link resource for cluster along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String clusterName, String privateLinkResourceName) { + private Mono> getWithResponseAsync(String resourceGroupName, String clusterName, + String privateLinkResourceName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -289,30 +253,18 @@ private Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); } if (privateLinkResourceName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter privateLinkResourceName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter privateLinkResourceName 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, - clusterName, - privateLinkResourceName, - accept, - context)) + return FluxUtil.withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, privateLinkResourceName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a private link resource for cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param privateLinkResourceName The name of the private link resource. @@ -323,19 +275,15 @@ private Mono> getWithResponseAsync( * @return a private link resource for cluster along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String clusterName, String privateLinkResourceName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String clusterName, + String privateLinkResourceName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -345,27 +293,18 @@ private Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); } if (privateLinkResourceName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter privateLinkResourceName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter privateLinkResourceName is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - clusterName, - privateLinkResourceName, - accept, - context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, privateLinkResourceName, accept, context); } /** * Gets a private link resource for cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param privateLinkResourceName The name of the private link resource. @@ -375,15 +314,15 @@ private Mono> getWithResponseAsync( * @return a private link resource for cluster on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String resourceGroupName, String clusterName, String privateLinkResourceName) { + private Mono getAsync(String resourceGroupName, String clusterName, + String privateLinkResourceName) { return getWithResponseAsync(resourceGroupName, clusterName, privateLinkResourceName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Gets a private link resource for cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param privateLinkResourceName The name of the private link resource. @@ -394,14 +333,14 @@ private Mono getAsync( * @return a private link resource for cluster along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String clusterName, String privateLinkResourceName, Context context) { + public Response getWithResponse(String resourceGroupName, String clusterName, + String privateLinkResourceName, Context context) { return getWithResponseAsync(resourceGroupName, clusterName, privateLinkResourceName, context).block(); } /** * Gets a private link resource for cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param privateLinkResourceName The name of the private link resource. diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/PrivateLinkResourcesImpl.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/PrivateLinkResourcesImpl.java index 5e35f3b1806e..1b1333342769 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/PrivateLinkResourcesImpl.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/PrivateLinkResourcesImpl.java @@ -21,35 +21,31 @@ public final class PrivateLinkResourcesImpl implements PrivateLinkResources { private final com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager serviceManager; - public PrivateLinkResourcesImpl( - PrivateLinkResourcesClient innerClient, + public PrivateLinkResourcesImpl(PrivateLinkResourcesClient innerClient, com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } public PagedIterable listByCluster(String resourceGroupName, String clusterName) { - PagedIterable inner = - this.serviceClient().listByCluster(resourceGroupName, clusterName); - return Utils.mapPage(inner, inner1 -> new PrivateLinkResourceImpl(inner1, this.manager())); + PagedIterable inner + = this.serviceClient().listByCluster(resourceGroupName, clusterName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new PrivateLinkResourceImpl(inner1, this.manager())); } - public PagedIterable listByCluster( - String resourceGroupName, String clusterName, Context context) { - PagedIterable inner = - this.serviceClient().listByCluster(resourceGroupName, clusterName, context); - return Utils.mapPage(inner, inner1 -> new PrivateLinkResourceImpl(inner1, this.manager())); + public PagedIterable listByCluster(String resourceGroupName, String clusterName, + Context context) { + PagedIterable inner + = this.serviceClient().listByCluster(resourceGroupName, clusterName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new PrivateLinkResourceImpl(inner1, this.manager())); } - public Response getWithResponse( - String resourceGroupName, String clusterName, String privateLinkResourceName, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, clusterName, privateLinkResourceName, context); + public Response getWithResponse(String resourceGroupName, String clusterName, + String privateLinkResourceName, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, clusterName, privateLinkResourceName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new PrivateLinkResourceImpl(inner.getValue(), this.manager())); } else { return null; @@ -57,8 +53,8 @@ public Response getWithResponse( } public PrivateLinkResource get(String resourceGroupName, String clusterName, String privateLinkResourceName) { - PrivateLinkResourceInner inner = - this.serviceClient().get(resourceGroupName, clusterName, privateLinkResourceName); + PrivateLinkResourceInner inner + = this.serviceClient().get(resourceGroupName, clusterName, privateLinkResourceName); if (inner != null) { return new PrivateLinkResourceImpl(inner, this.manager()); } else { diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/Utils.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/ResourceManagerUtils.java similarity index 80% rename from sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/Utils.java rename to sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/ResourceManagerUtils.java index d44e406b390c..5670f936554e 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/Utils.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/ResourceManagerUtils.java @@ -19,7 +19,10 @@ import java.util.stream.Stream; import reactor.core.publisher.Flux; -final class Utils { +final class ResourceManagerUtils { + private ResourceManagerUtils() { + } + static String getValueFromIdByName(String id, String name) { if (id == null) { return null; @@ -38,6 +41,7 @@ static String getValueFromIdByName(String id, String name) { } } return null; + } static String getValueFromIdByParameterName(String id, String pathTemplate, String parameterName) { @@ -60,7 +64,7 @@ static String getValueFromIdByParameterName(String id, String pathTemplate, Stri segments.add(idSegment); idItrReverted.forEachRemaining(segments::add); Collections.reverse(segments); - if (segments.size() > 0 && segments.get(0).isEmpty()) { + if (!segments.isEmpty() && segments.get(0).isEmpty()) { segments.remove(0); } return String.join("/", segments); @@ -71,10 +75,11 @@ static String getValueFromIdByParameterName(String id, String pathTemplate, Stri } } return null; + } static PagedIterable mapPage(PagedIterable pageIterable, Function mapper) { - return new PagedIterableImpl(pageIterable, mapper); + return new PagedIterableImpl<>(pageIterable, mapper); } private static final class PagedIterableImpl extends PagedIterable { @@ -84,26 +89,17 @@ private static final class PagedIterableImpl extends PagedIterable { private final Function, PagedResponse> pageMapper; private PagedIterableImpl(PagedIterable pagedIterable, Function mapper) { - super( - PagedFlux - .create( - () -> - (continuationToken, pageSize) -> - Flux.fromStream(pagedIterable.streamByPage().map(getPageMapper(mapper))))); + super(PagedFlux.create(() -> (continuationToken, pageSize) -> Flux + .fromStream(pagedIterable.streamByPage().map(getPageMapper(mapper))))); this.pagedIterable = pagedIterable; this.mapper = mapper; this.pageMapper = getPageMapper(mapper); } private static Function, PagedResponse> getPageMapper(Function mapper) { - return page -> - new PagedResponseBase( - page.getRequest(), - page.getStatusCode(), - page.getHeaders(), - page.getElements().stream().map(mapper).collect(Collectors.toList()), - page.getContinuationToken(), - null); + return page -> new PagedResponseBase(page.getRequest(), page.getStatusCode(), page.getHeaders(), + page.getElements().stream().map(mapper).collect(Collectors.toList()), page.getContinuationToken(), + null); } @Override @@ -133,30 +129,27 @@ public Stream> streamByPage(String continuationToken, int prefe @Override public Iterator iterator() { - return new IteratorImpl(pagedIterable.iterator(), mapper); + return new IteratorImpl<>(pagedIterable.iterator(), mapper); } @Override public Iterable> iterableByPage() { - return new IterableImpl, PagedResponse>(pagedIterable.iterableByPage(), pageMapper); + return new IterableImpl<>(pagedIterable.iterableByPage(), pageMapper); } @Override public Iterable> iterableByPage(String continuationToken) { - return new IterableImpl, PagedResponse>( - pagedIterable.iterableByPage(continuationToken), pageMapper); + return new IterableImpl<>(pagedIterable.iterableByPage(continuationToken), pageMapper); } @Override public Iterable> iterableByPage(int preferredPageSize) { - return new IterableImpl, PagedResponse>( - pagedIterable.iterableByPage(preferredPageSize), pageMapper); + return new IterableImpl<>(pagedIterable.iterableByPage(preferredPageSize), pageMapper); } @Override public Iterable> iterableByPage(String continuationToken, int preferredPageSize) { - return new IterableImpl, PagedResponse>( - pagedIterable.iterableByPage(continuationToken, preferredPageSize), pageMapper); + return new IterableImpl<>(pagedIterable.iterableByPage(continuationToken, preferredPageSize), pageMapper); } } @@ -198,7 +191,7 @@ private IterableImpl(Iterable iterable, Function mapper) { @Override public Iterator iterator() { - return new IteratorImpl(iterable.iterator(), mapper); + return new IteratorImpl<>(iterable.iterator(), mapper); } } } diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/RoleImpl.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/RoleImpl.java index 70d5796cd7f2..8558329f045d 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/RoleImpl.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/RoleImpl.java @@ -7,16 +7,17 @@ import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.cosmosdbforpostgresql.fluent.models.RoleInner; +import com.azure.resourcemanager.cosmosdbforpostgresql.models.PrincipalType; import com.azure.resourcemanager.cosmosdbforpostgresql.models.ProvisioningState; import com.azure.resourcemanager.cosmosdbforpostgresql.models.Role; +import com.azure.resourcemanager.cosmosdbforpostgresql.models.RoleType; public final class RoleImpl implements Role, Role.Definition { private RoleInner innerObject; private final com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager serviceManager; - RoleImpl( - RoleInner innerObject, + RoleImpl(RoleInner innerObject, com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; @@ -38,6 +39,10 @@ public SystemData systemData() { return this.innerModel().systemData(); } + public RoleType roleType() { + return this.innerModel().roleType(); + } + public String password() { return this.innerModel().password(); } @@ -46,6 +51,18 @@ public ProvisioningState provisioningState() { return this.innerModel().provisioningState(); } + public String objectId() { + return this.innerModel().objectId(); + } + + public PrincipalType principalType() { + return this.innerModel().principalType(); + } + + public String tenantId() { + return this.innerModel().tenantId(); + } + public RoleInner innerModel() { return this.innerObject; } @@ -67,20 +84,14 @@ public RoleImpl withExistingServerGroupsv2(String resourceGroupName, String clus } public Role create() { - this.innerObject = - serviceManager - .serviceClient() - .getRoles() - .create(resourceGroupName, clusterName, roleName, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient().getRoles().create(resourceGroupName, clusterName, roleName, + this.innerModel(), Context.NONE); return this; } public Role create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getRoles() - .create(resourceGroupName, clusterName, roleName, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient().getRoles().create(resourceGroupName, clusterName, roleName, + this.innerModel(), context); return this; } @@ -91,22 +102,19 @@ public Role create(Context context) { } public Role refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getRoles() - .getWithResponse(resourceGroupName, clusterName, roleName, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getRoles() + .getWithResponse(resourceGroupName, clusterName, roleName, Context.NONE).getValue(); return this; } public Role refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getRoles() - .getWithResponse(resourceGroupName, clusterName, roleName, context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getRoles() + .getWithResponse(resourceGroupName, clusterName, roleName, context).getValue(); + return this; + } + + public RoleImpl withRoleType(RoleType roleType) { + this.innerModel().withRoleType(roleType); return this; } @@ -114,4 +122,19 @@ public RoleImpl withPassword(String password) { this.innerModel().withPassword(password); return this; } + + public RoleImpl withObjectId(String objectId) { + this.innerModel().withObjectId(objectId); + return this; + } + + public RoleImpl withPrincipalType(PrincipalType principalType) { + this.innerModel().withPrincipalType(principalType); + return this; + } + + public RoleImpl withTenantId(String tenantId) { + this.innerModel().withTenantId(tenantId); + return this; + } } diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/RolesClientImpl.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/RolesClientImpl.java index b2d186df4afe..35b785f8264a 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/RolesClientImpl.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/RolesClientImpl.java @@ -38,17 +38,23 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in RolesClient. */ +/** + * An instance of this class provides access to all the operations defined in RolesClient. + */ public final class RolesClientImpl implements RolesClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final RolesService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final CosmosDBForPostgreSqlImpl client; /** * Initializes an instance of RolesClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ RolesClientImpl(CosmosDBForPostgreSqlImpl client) { @@ -57,76 +63,53 @@ public final class RolesClientImpl implements RolesClient { } /** - * The interface defining all the services for CosmosDBForPostgreSqlRoles to be used by the proxy service to perform - * REST calls. + * The interface defining all the services for CosmosDBForPostgreSqlRoles to be used by the proxy service to + * perform REST calls. */ @Host("{$host}") @ServiceInterface(name = "CosmosDBForPostgreSq") public interface RolesService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/serverGroupsv2/{clusterName}/roles/{roleName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/serverGroupsv2/{clusterName}/roles/{roleName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, + Mono> get(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("clusterName") String clusterName, - @PathParam("roleName") String roleName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/serverGroupsv2/{clusterName}/roles/{roleName}") - @ExpectedResponses({200, 201}) + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @PathParam("roleName") String roleName, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/serverGroupsv2/{clusterName}/roles/{roleName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("clusterName") String clusterName, - @PathParam("roleName") String roleName, - @BodyParam("application/json") RoleInner parameters, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/serverGroupsv2/{clusterName}/roles/{roleName}") - @ExpectedResponses({202, 204}) + Mono>> create(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @PathParam("roleName") String roleName, @BodyParam("application/json") RoleInner parameters, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/serverGroupsv2/{clusterName}/roles/{roleName}") + @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("clusterName") String clusterName, - @PathParam("roleName") String roleName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/serverGroupsv2/{clusterName}/roles") - @ExpectedResponses({200}) + Mono>> delete(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @PathParam("roleName") String roleName, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/serverGroupsv2/{clusterName}/roles") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByCluster( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("clusterName") String clusterName, - @HeaderParam("Accept") String accept, - Context context); + Mono> listByCluster(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @HeaderParam("Accept") String accept, Context context); } /** * Gets information about a cluster role. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param roleName The name of the cluster role. @@ -136,19 +119,15 @@ Mono> listByCluster( * @return information about a cluster role along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String clusterName, String roleName) { + private Mono> getWithResponseAsync(String resourceGroupName, String clusterName, + String roleName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -162,24 +141,14 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - clusterName, - roleName, - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, roleName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets information about a cluster role. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param roleName The name of the cluster role. @@ -190,19 +159,15 @@ private Mono> getWithResponseAsync( * @return information about a cluster role along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String clusterName, String roleName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String clusterName, + String roleName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -216,21 +181,13 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - clusterName, - roleName, - accept, - context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, roleName, accept, context); } /** * Gets information about a cluster role. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param roleName The name of the cluster role. @@ -247,7 +204,7 @@ private Mono getAsync(String resourceGroupName, String clusterName, S /** * Gets information about a cluster role. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param roleName The name of the cluster role. @@ -258,14 +215,14 @@ private Mono getAsync(String resourceGroupName, String clusterName, S * @return information about a cluster role along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String clusterName, String roleName, Context context) { + public Response getWithResponse(String resourceGroupName, String clusterName, String roleName, + Context context) { return getWithResponseAsync(resourceGroupName, clusterName, roleName, context).block(); } /** * Gets information about a cluster role. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param roleName The name of the cluster role. @@ -281,7 +238,7 @@ public RoleInner get(String resourceGroupName, String clusterName, String roleNa /** * Creates a new role or updates an existing role. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param roleName The name of the cluster role. @@ -292,19 +249,15 @@ public RoleInner get(String resourceGroupName, String clusterName, String roleNa * @return represents a cluster role along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync( - String resourceGroupName, String clusterName, String roleName, RoleInner parameters) { + private Mono>> createWithResponseAsync(String resourceGroupName, String clusterName, + String roleName, RoleInner parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -323,25 +276,14 @@ private Mono>> createWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .create( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - clusterName, - roleName, - parameters, - accept, - context)) + .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, roleName, parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates a new role or updates an existing role. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param roleName The name of the cluster role. @@ -353,19 +295,15 @@ private Mono>> createWithResponseAsync( * @return represents a cluster role along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync( - String resourceGroupName, String clusterName, String roleName, RoleInner parameters, Context context) { + private Mono>> createWithResponseAsync(String resourceGroupName, String clusterName, + String roleName, RoleInner parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -384,22 +322,13 @@ private Mono>> createWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .create( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - clusterName, - roleName, - parameters, - accept, - context); + return service.create(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, roleName, parameters, accept, context); } /** * Creates a new role or updates an existing role. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param roleName The name of the cluster role. @@ -410,19 +339,17 @@ private Mono>> createWithResponseAsync( * @return the {@link PollerFlux} for polling of represents a cluster role. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, RoleInner> beginCreateAsync( - String resourceGroupName, String clusterName, String roleName, RoleInner parameters) { - Mono>> mono = - createWithResponseAsync(resourceGroupName, clusterName, roleName, parameters); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), RoleInner.class, RoleInner.class, this.client.getContext()); + private PollerFlux, RoleInner> beginCreateAsync(String resourceGroupName, String clusterName, + String roleName, RoleInner parameters) { + Mono>> mono + = createWithResponseAsync(resourceGroupName, clusterName, roleName, parameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), RoleInner.class, + RoleInner.class, this.client.getContext()); } /** * Creates a new role or updates an existing role. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param roleName The name of the cluster role. @@ -434,20 +361,18 @@ private PollerFlux, RoleInner> beginCreateAsync( * @return the {@link PollerFlux} for polling of represents a cluster role. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, RoleInner> beginCreateAsync( - String resourceGroupName, String clusterName, String roleName, RoleInner parameters, Context context) { + private PollerFlux, RoleInner> beginCreateAsync(String resourceGroupName, String clusterName, + String roleName, RoleInner parameters, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - createWithResponseAsync(resourceGroupName, clusterName, roleName, parameters, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), RoleInner.class, RoleInner.class, context); + Mono>> mono + = createWithResponseAsync(resourceGroupName, clusterName, roleName, parameters, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), RoleInner.class, + RoleInner.class, context); } /** * Creates a new role or updates an existing role. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param roleName The name of the cluster role. @@ -458,14 +383,14 @@ private PollerFlux, RoleInner> beginCreateAsync( * @return the {@link SyncPoller} for polling of represents a cluster role. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, RoleInner> beginCreate( - String resourceGroupName, String clusterName, String roleName, RoleInner parameters) { + public SyncPoller, RoleInner> beginCreate(String resourceGroupName, String clusterName, + String roleName, RoleInner parameters) { return this.beginCreateAsync(resourceGroupName, clusterName, roleName, parameters).getSyncPoller(); } /** * Creates a new role or updates an existing role. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param roleName The name of the cluster role. @@ -477,14 +402,14 @@ public SyncPoller, RoleInner> beginCreate( * @return the {@link SyncPoller} for polling of represents a cluster role. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, RoleInner> beginCreate( - String resourceGroupName, String clusterName, String roleName, RoleInner parameters, Context context) { + public SyncPoller, RoleInner> beginCreate(String resourceGroupName, String clusterName, + String roleName, RoleInner parameters, Context context) { return this.beginCreateAsync(resourceGroupName, clusterName, roleName, parameters, context).getSyncPoller(); } /** * Creates a new role or updates an existing role. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param roleName The name of the cluster role. @@ -495,16 +420,15 @@ public SyncPoller, RoleInner> beginCreate( * @return represents a cluster role on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync( - String resourceGroupName, String clusterName, String roleName, RoleInner parameters) { - return beginCreateAsync(resourceGroupName, clusterName, roleName, parameters) - .last() + private Mono createAsync(String resourceGroupName, String clusterName, String roleName, + RoleInner parameters) { + return beginCreateAsync(resourceGroupName, clusterName, roleName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Creates a new role or updates an existing role. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param roleName The name of the cluster role. @@ -516,16 +440,15 @@ private Mono createAsync( * @return represents a cluster role on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync( - String resourceGroupName, String clusterName, String roleName, RoleInner parameters, Context context) { - return beginCreateAsync(resourceGroupName, clusterName, roleName, parameters, context) - .last() + private Mono createAsync(String resourceGroupName, String clusterName, String roleName, + RoleInner parameters, Context context) { + return beginCreateAsync(resourceGroupName, clusterName, roleName, parameters, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Creates a new role or updates an existing role. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param roleName The name of the cluster role. @@ -542,7 +465,7 @@ public RoleInner create(String resourceGroupName, String clusterName, String rol /** * Creates a new role or updates an existing role. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param roleName The name of the cluster role. @@ -554,14 +477,14 @@ public RoleInner create(String resourceGroupName, String clusterName, String rol * @return represents a cluster role. */ @ServiceMethod(returns = ReturnType.SINGLE) - public RoleInner create( - String resourceGroupName, String clusterName, String roleName, RoleInner parameters, Context context) { + public RoleInner create(String resourceGroupName, String clusterName, String roleName, RoleInner parameters, + Context context) { return createAsync(resourceGroupName, clusterName, roleName, parameters, context).block(); } /** * Deletes a cluster role. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param roleName The name of the cluster role. @@ -571,19 +494,15 @@ public RoleInner create( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String clusterName, String roleName) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String clusterName, + String roleName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -597,24 +516,14 @@ private Mono>> deleteWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - clusterName, - roleName, - accept, - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, roleName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes a cluster role. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param roleName The name of the cluster role. @@ -625,19 +534,15 @@ private Mono>> deleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String clusterName, String roleName, Context context) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String clusterName, + String roleName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -651,21 +556,13 @@ private Mono>> deleteWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - clusterName, - roleName, - accept, - context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, roleName, accept, context); } /** * Deletes a cluster role. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param roleName The name of the cluster role. @@ -675,18 +572,16 @@ private Mono>> deleteWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String clusterName, String roleName) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String clusterName, + String roleName) { Mono>> mono = deleteWithResponseAsync(resourceGroupName, clusterName, roleName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Deletes a cluster role. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param roleName The name of the cluster role. @@ -697,19 +592,18 @@ private PollerFlux, Void> beginDeleteAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String clusterName, String roleName, Context context) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String clusterName, + String roleName, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, clusterName, roleName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, clusterName, roleName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * Deletes a cluster role. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param roleName The name of the cluster role. @@ -719,14 +613,14 @@ private PollerFlux, Void> beginDeleteAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String clusterName, String roleName) { + public SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, + String roleName) { return this.beginDeleteAsync(resourceGroupName, clusterName, roleName).getSyncPoller(); } /** * Deletes a cluster role. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param roleName The name of the cluster role. @@ -737,14 +631,14 @@ public SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String clusterName, String roleName, Context context) { + public SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, String roleName, + Context context) { return this.beginDeleteAsync(resourceGroupName, clusterName, roleName, context).getSyncPoller(); } /** * Deletes a cluster role. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param roleName The name of the cluster role. @@ -755,14 +649,13 @@ public SyncPoller, Void> beginDelete( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String clusterName, String roleName) { - return beginDeleteAsync(resourceGroupName, clusterName, roleName) - .last() + return beginDeleteAsync(resourceGroupName, clusterName, roleName).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Deletes a cluster role. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param roleName The name of the cluster role. @@ -774,14 +667,13 @@ private Mono deleteAsync(String resourceGroupName, String clusterName, Str */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String clusterName, String roleName, Context context) { - return beginDeleteAsync(resourceGroupName, clusterName, roleName, context) - .last() + return beginDeleteAsync(resourceGroupName, clusterName, roleName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Deletes a cluster role. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param roleName The name of the cluster role. @@ -796,7 +688,7 @@ public void delete(String resourceGroupName, String clusterName, String roleName /** * Deletes a cluster role. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param roleName The name of the cluster role. @@ -812,7 +704,7 @@ public void delete(String resourceGroupName, String clusterName, String roleName /** * List all the roles in a given cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -823,16 +715,12 @@ public void delete(String resourceGroupName, String clusterName, String roleName @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByClusterSinglePageAsync(String resourceGroupName, String clusterName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -843,27 +731,16 @@ private Mono> listByClusterSinglePageAsync(String resou } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByCluster( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - clusterName, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)) + .withContext(context -> service.listByCluster(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), null, null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * List all the roles in a given cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param context The context to associate with this operation. @@ -873,19 +750,15 @@ private Mono> listByClusterSinglePageAsync(String resou * @return a list of roles along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByClusterSinglePageAsync( - String resourceGroupName, String clusterName, Context context) { + private Mono> listByClusterSinglePageAsync(String resourceGroupName, String clusterName, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -897,23 +770,15 @@ private Mono> listByClusterSinglePageAsync( final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByCluster( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - clusterName, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)); + .listByCluster(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), null, null)); } /** * List all the roles in a given cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -928,7 +793,7 @@ private PagedFlux listByClusterAsync(String resourceGroupName, String /** * List all the roles in a given cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param context The context to associate with this operation. @@ -944,7 +809,7 @@ private PagedFlux listByClusterAsync(String resourceGroupName, String /** * List all the roles in a given cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -959,7 +824,7 @@ public PagedIterable listByCluster(String resourceGroupName, String c /** * List all the roles in a given cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param context The context to associate with this operation. diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/RolesImpl.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/RolesImpl.java index 37a5ec8028da..b251495ea3c3 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/RolesImpl.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/RolesImpl.java @@ -21,22 +21,18 @@ public final class RolesImpl implements Roles { private final com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager serviceManager; - public RolesImpl( - RolesClient innerClient, + public RolesImpl(RolesClient innerClient, com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } - public Response getWithResponse( - String resourceGroupName, String clusterName, String roleName, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, clusterName, roleName, context); + public Response getWithResponse(String resourceGroupName, String clusterName, String roleName, + Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, clusterName, roleName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new RoleImpl(inner.getValue(), this.manager())); } else { return null; @@ -62,118 +58,86 @@ public void delete(String resourceGroupName, String clusterName, String roleName public PagedIterable listByCluster(String resourceGroupName, String clusterName) { PagedIterable inner = this.serviceClient().listByCluster(resourceGroupName, clusterName); - return Utils.mapPage(inner, inner1 -> new RoleImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new RoleImpl(inner1, this.manager())); } public PagedIterable listByCluster(String resourceGroupName, String clusterName, Context context) { PagedIterable inner = this.serviceClient().listByCluster(resourceGroupName, clusterName, context); - return Utils.mapPage(inner, inner1 -> new RoleImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new RoleImpl(inner1, this.manager())); } public Role getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String clusterName = Utils.getValueFromIdByName(id, "serverGroupsv2"); + String clusterName = ResourceManagerUtils.getValueFromIdByName(id, "serverGroupsv2"); if (clusterName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'serverGroupsv2'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'serverGroupsv2'.", id))); } - String roleName = Utils.getValueFromIdByName(id, "roles"); + String roleName = ResourceManagerUtils.getValueFromIdByName(id, "roles"); if (roleName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'roles'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'roles'.", id))); } return this.getWithResponse(resourceGroupName, clusterName, roleName, Context.NONE).getValue(); } public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String clusterName = Utils.getValueFromIdByName(id, "serverGroupsv2"); + String clusterName = ResourceManagerUtils.getValueFromIdByName(id, "serverGroupsv2"); if (clusterName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'serverGroupsv2'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'serverGroupsv2'.", id))); } - String roleName = Utils.getValueFromIdByName(id, "roles"); + String roleName = ResourceManagerUtils.getValueFromIdByName(id, "roles"); if (roleName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'roles'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'roles'.", id))); } return this.getWithResponse(resourceGroupName, clusterName, roleName, context); } public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String clusterName = Utils.getValueFromIdByName(id, "serverGroupsv2"); + String clusterName = ResourceManagerUtils.getValueFromIdByName(id, "serverGroupsv2"); if (clusterName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'serverGroupsv2'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'serverGroupsv2'.", id))); } - String roleName = Utils.getValueFromIdByName(id, "roles"); + String roleName = ResourceManagerUtils.getValueFromIdByName(id, "roles"); if (roleName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'roles'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'roles'.", id))); } this.delete(resourceGroupName, clusterName, roleName, Context.NONE); } public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String clusterName = Utils.getValueFromIdByName(id, "serverGroupsv2"); + String clusterName = ResourceManagerUtils.getValueFromIdByName(id, "serverGroupsv2"); if (clusterName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'serverGroupsv2'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'serverGroupsv2'.", id))); } - String roleName = Utils.getValueFromIdByName(id, "roles"); + String roleName = ResourceManagerUtils.getValueFromIdByName(id, "roles"); if (roleName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'roles'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'roles'.", id))); } this.delete(resourceGroupName, clusterName, roleName, context); } diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/ServerConfigurationImpl.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/ServerConfigurationImpl.java index 4c559b001c00..8e2d93ebdf62 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/ServerConfigurationImpl.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/ServerConfigurationImpl.java @@ -15,8 +15,7 @@ public final class ServerConfigurationImpl implements ServerConfiguration { private final com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager serviceManager; - ServerConfigurationImpl( - ServerConfigurationInner innerObject, + ServerConfigurationImpl(ServerConfigurationInner innerObject, com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/ServersClientImpl.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/ServersClientImpl.java index 84091644adca..854e42811f41 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/ServersClientImpl.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/ServersClientImpl.java @@ -30,17 +30,23 @@ import com.azure.resourcemanager.cosmosdbforpostgresql.models.ClusterServerListResult; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in ServersClient. */ +/** + * An instance of this class provides access to all the operations defined in ServersClient. + */ public final class ServersClientImpl implements ServersClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final ServersService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final CosmosDBForPostgreSqlImpl client; /** * Initializes an instance of ServersClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ ServersClientImpl(CosmosDBForPostgreSqlImpl client) { @@ -55,39 +61,28 @@ public final class ServersClientImpl implements ServersClient { @Host("{$host}") @ServiceInterface(name = "CosmosDBForPostgreSq") public interface ServersService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/serverGroupsv2/{clusterName}/servers") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/serverGroupsv2/{clusterName}/servers") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByCluster( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("clusterName") String clusterName, - @HeaderParam("Accept") String accept, - Context context); + Mono> listByCluster(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/serverGroupsv2/{clusterName}/servers/{serverName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/serverGroupsv2/{clusterName}/servers/{serverName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("clusterName") String clusterName, - @PathParam("serverName") String serverName, - @HeaderParam("Accept") String accept, - Context context); + Mono> get(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @PathParam("serverName") String serverName, @HeaderParam("Accept") String accept, Context context); } /** * Lists servers of a cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -96,19 +91,15 @@ Mono> get( * @return a list of servers in a cluster along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByClusterSinglePageAsync( - String resourceGroupName, String clusterName) { + private Mono> listByClusterSinglePageAsync(String resourceGroupName, + String clusterName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -119,27 +110,16 @@ private Mono> listByClusterSinglePageAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByCluster( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - clusterName, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)) + .withContext(context -> service.listByCluster(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Lists servers of a cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param context The context to associate with this operation. @@ -149,19 +129,15 @@ private Mono> listByClusterSinglePageAsync( * @return a list of servers in a cluster along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByClusterSinglePageAsync( - String resourceGroupName, String clusterName, Context context) { + private Mono> listByClusterSinglePageAsync(String resourceGroupName, + String clusterName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -173,23 +149,15 @@ private Mono> listByClusterSinglePageAsync( final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByCluster( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - clusterName, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)); + .listByCluster(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), null, null)); } /** * Lists servers of a cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -204,7 +172,7 @@ private PagedFlux listByClusterAsync(String resourceGroupNam /** * Lists servers of a cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param context The context to associate with this operation. @@ -214,14 +182,14 @@ private PagedFlux listByClusterAsync(String resourceGroupNam * @return a list of servers in a cluster as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByClusterAsync( - String resourceGroupName, String clusterName, Context context) { + private PagedFlux listByClusterAsync(String resourceGroupName, String clusterName, + Context context) { return new PagedFlux<>(() -> listByClusterSinglePageAsync(resourceGroupName, clusterName, context)); } /** * Lists servers of a cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -236,7 +204,7 @@ public PagedIterable listByCluster(String resourceGroupName, /** * Lists servers of a cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param context The context to associate with this operation. @@ -246,37 +214,33 @@ public PagedIterable listByCluster(String resourceGroupName, * @return a list of servers in a cluster as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByCluster( - String resourceGroupName, String clusterName, Context context) { + public PagedIterable listByCluster(String resourceGroupName, String clusterName, + Context context) { return new PagedIterable<>(listByClusterAsync(resourceGroupName, clusterName, context)); } /** * Gets information about a server in cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @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 a server in cluster along with {@link Response} on successful completion of {@link - * Mono}. + * @return information about a server in cluster along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String clusterName, String serverName) { + private Mono> getWithResponseAsync(String resourceGroupName, String clusterName, + String serverName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -290,24 +254,14 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - clusterName, - serverName, - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, serverName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets information about a server in cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param serverName The name of the server. @@ -315,23 +269,19 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @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 in cluster along with {@link Response} on successful completion of {@link - * Mono}. + * @return information about a server in cluster along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String clusterName, String serverName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String clusterName, + String serverName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -345,21 +295,13 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - clusterName, - serverName, - accept, - context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, serverName, accept, context); } /** * Gets information about a server in cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param serverName The name of the server. @@ -376,7 +318,7 @@ private Mono getAsync(String resourceGroupName, String clust /** * Gets information about a server in cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param serverName The name of the server. @@ -387,14 +329,14 @@ private Mono getAsync(String resourceGroupName, String clust * @return information about a server in cluster along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String clusterName, String serverName, Context context) { + public Response getWithResponse(String resourceGroupName, String clusterName, String serverName, + Context context) { return getWithResponseAsync(resourceGroupName, clusterName, serverName, context).block(); } /** * Gets information about a server in cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param serverName The name of the server. diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/ServersImpl.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/ServersImpl.java index 2da19edec5da..8cc1b0f03ec4 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/ServersImpl.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/ServersImpl.java @@ -21,8 +21,7 @@ public final class ServersImpl implements Servers { private final com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager serviceManager; - public ServersImpl( - ServersClient innerClient, + public ServersImpl(ServersClient innerClient, com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; @@ -30,24 +29,21 @@ public ServersImpl( public PagedIterable listByCluster(String resourceGroupName, String clusterName) { PagedIterable inner = this.serviceClient().listByCluster(resourceGroupName, clusterName); - return Utils.mapPage(inner, inner1 -> new ClusterServerImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ClusterServerImpl(inner1, this.manager())); } public PagedIterable listByCluster(String resourceGroupName, String clusterName, Context context) { - PagedIterable inner = - this.serviceClient().listByCluster(resourceGroupName, clusterName, context); - return Utils.mapPage(inner, inner1 -> new ClusterServerImpl(inner1, this.manager())); + PagedIterable inner + = this.serviceClient().listByCluster(resourceGroupName, clusterName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ClusterServerImpl(inner1, this.manager())); } - public Response getWithResponse( - String resourceGroupName, String clusterName, String serverName, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, clusterName, serverName, context); + public Response getWithResponse(String resourceGroupName, String clusterName, String serverName, + Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, clusterName, serverName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new ClusterServerImpl(inner.getValue(), this.manager())); } else { return null; diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/package-info.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/package-info.java index 991e493d6890..4a93f27d9480 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/package-info.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/implementation/package-info.java @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. /** - * Package containing the implementations for CosmosDBForPostgreSql. Azure Cosmos DB for PostgreSQL database service - * resource provider REST APIs. + * Package containing the implementations for CosmosDBForPostgreSql. + * Azure Cosmos DB for PostgreSQL database service resource provider REST APIs. */ package com.azure.resourcemanager.cosmosdbforpostgresql.implementation; diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/ActiveDirectoryAuth.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/ActiveDirectoryAuth.java new file mode 100644 index 000000000000..27892b66f633 --- /dev/null +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/ActiveDirectoryAuth.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.cosmosdbforpostgresql.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * Defines values for ActiveDirectoryAuth. + */ +public final class ActiveDirectoryAuth extends ExpandableStringEnum { + /** + * Static value enabled for ActiveDirectoryAuth. + */ + public static final ActiveDirectoryAuth ENABLED = fromString("enabled"); + + /** + * Static value disabled for ActiveDirectoryAuth. + */ + public static final ActiveDirectoryAuth DISABLED = fromString("disabled"); + + /** + * Creates a new instance of ActiveDirectoryAuth value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ActiveDirectoryAuth() { + } + + /** + * Creates or finds a ActiveDirectoryAuth from its string representation. + * + * @param name a name to look for. + * @return the corresponding ActiveDirectoryAuth. + */ + @JsonCreator + public static ActiveDirectoryAuth fromString(String name) { + return fromString(name, ActiveDirectoryAuth.class); + } + + /** + * Gets known ActiveDirectoryAuth values. + * + * @return known ActiveDirectoryAuth values. + */ + public static Collection values() { + return values(ActiveDirectoryAuth.class); + } +} diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/AuthConfig.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/AuthConfig.java new file mode 100644 index 000000000000..4296a13c2917 --- /dev/null +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/AuthConfig.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.cosmosdbforpostgresql.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Authentication configuration of a cluster. + */ +@Fluent +public final class AuthConfig { + /* + * The activeDirectoryAuth property. + */ + @JsonProperty(value = "activeDirectoryAuth") + private ActiveDirectoryAuth activeDirectoryAuth; + + /* + * The passwordAuth property. + */ + @JsonProperty(value = "passwordAuth") + private PasswordAuth passwordAuth; + + /** + * Creates an instance of AuthConfig class. + */ + public AuthConfig() { + } + + /** + * Get the activeDirectoryAuth property: The activeDirectoryAuth property. + * + * @return the activeDirectoryAuth value. + */ + public ActiveDirectoryAuth activeDirectoryAuth() { + return this.activeDirectoryAuth; + } + + /** + * Set the activeDirectoryAuth property: The activeDirectoryAuth property. + * + * @param activeDirectoryAuth the activeDirectoryAuth value to set. + * @return the AuthConfig object itself. + */ + public AuthConfig withActiveDirectoryAuth(ActiveDirectoryAuth activeDirectoryAuth) { + this.activeDirectoryAuth = activeDirectoryAuth; + return this; + } + + /** + * Get the passwordAuth property: The passwordAuth property. + * + * @return the passwordAuth value. + */ + public PasswordAuth passwordAuth() { + return this.passwordAuth; + } + + /** + * Set the passwordAuth property: The passwordAuth property. + * + * @param passwordAuth the passwordAuth value to set. + * @return the AuthConfig object itself. + */ + public AuthConfig withPasswordAuth(PasswordAuth passwordAuth) { + this.passwordAuth = passwordAuth; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/Cluster.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/Cluster.java index b2e31ff60e31..e70be71bc994 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/Cluster.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/Cluster.java @@ -12,102 +12,104 @@ import java.util.List; import java.util.Map; -/** An immutable client-side representation of Cluster. */ +/** + * An immutable client-side representation of Cluster. + */ public interface Cluster { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); /** * Gets the location property: The geo-location where the resource lives. - * + * * @return the location value. */ String location(); /** * Gets the tags property: Resource tags. - * + * * @return the tags value. */ Map tags(); /** * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * + * * @return the systemData value. */ SystemData systemData(); /** * Gets the administratorLogin property: The administrator's login name of the servers in the cluster. - * + * * @return the administratorLogin value. */ String administratorLogin(); /** * Gets the administratorLoginPassword property: The password of the administrator login. Required for creation. - * + * * @return the administratorLoginPassword value. */ String administratorLoginPassword(); /** * Gets the provisioningState property: Provisioning state of the cluster. - * + * * @return the provisioningState value. */ String provisioningState(); /** * Gets the state property: A state of a cluster/server that is visible to user. - * + * * @return the state value. */ String state(); /** * Gets the postgresqlVersion property: The major PostgreSQL version on all cluster servers. - * + * * @return the postgresqlVersion value. */ String postgresqlVersion(); /** * Gets the citusVersion property: The Citus extension version on all cluster servers. - * + * * @return the citusVersion value. */ String citusVersion(); /** * Gets the maintenanceWindow property: Maintenance window of a cluster. - * + * * @return the maintenanceWindow value. */ MaintenanceWindow maintenanceWindow(); /** * Gets the preferredPrimaryZone property: Preferred primary availability zone (AZ) for all cluster servers. - * + * * @return the preferredPrimaryZone value. */ String preferredPrimaryZone(); @@ -115,14 +117,14 @@ public interface Cluster { /** * Gets the enableShardsOnCoordinator property: If distributed tables are placed on coordinator or not. Should be * set to 'true' on single node clusters. Requires shard rebalancing after value is changed. - * + * * @return the enableShardsOnCoordinator value. */ Boolean enableShardsOnCoordinator(); /** * Gets the enableHa property: If high availability (HA) is enabled or not for the cluster. - * + * * @return the enableHa value. */ Boolean enableHa(); @@ -130,7 +132,7 @@ public interface Cluster { /** * Gets the coordinatorServerEdition property: The edition of a coordinator server (default: GeneralPurpose). * Required for creation. - * + * * @return the coordinatorServerEdition value. */ String coordinatorServerEdition(); @@ -138,7 +140,7 @@ public interface Cluster { /** * Gets the coordinatorStorageQuotaInMb property: The storage of a server in MB. Required for creation. See * https://learn.microsoft.com/azure/cosmos-db/postgresql/resources-compute for more information. - * + * * @return the coordinatorStorageQuotaInMb value. */ Integer coordinatorStorageQuotaInMb(); @@ -146,21 +148,21 @@ public interface Cluster { /** * Gets the coordinatorVCores property: The vCores count of a server (max: 96). Required for creation. See * https://learn.microsoft.com/azure/cosmos-db/postgresql/resources-compute for more information. - * + * * @return the coordinatorVCores value. */ Integer coordinatorVCores(); /** * Gets the coordinatorEnablePublicIpAccess property: If public access is enabled on coordinator. - * + * * @return the coordinatorEnablePublicIpAccess value. */ Boolean coordinatorEnablePublicIpAccess(); /** * Gets the nodeServerEdition property: The edition of a node server (default: MemoryOptimized). - * + * * @return the nodeServerEdition value. */ String nodeServerEdition(); @@ -169,7 +171,7 @@ public interface Cluster { * Gets the nodeCount property: Worker node count of the cluster. When node count is 0, it represents a single node * configuration with the ability to create distributed tables on that node. 2 or more worker nodes represent * multi-node configuration. Node count value cannot be 1. Required for creation. - * + * * @return the nodeCount value. */ Integer nodeCount(); @@ -177,7 +179,7 @@ public interface Cluster { /** * Gets the nodeStorageQuotaInMb property: The storage in MB on each worker node. See * https://learn.microsoft.com/azure/cosmos-db/postgresql/resources-compute for more information. - * + * * @return the nodeStorageQuotaInMb value. */ Integer nodeStorageQuotaInMb(); @@ -185,114 +187,141 @@ public interface Cluster { /** * Gets the nodeVCores property: The compute in vCores on each worker node (max: 104). See * https://learn.microsoft.com/azure/cosmos-db/postgresql/resources-compute for more information. - * + * * @return the nodeVCores value. */ Integer nodeVCores(); /** * Gets the nodeEnablePublicIpAccess property: If public access is enabled on worker nodes. - * + * * @return the nodeEnablePublicIpAccess value. */ Boolean nodeEnablePublicIpAccess(); /** * Gets the serverNames property: The list of server names in the cluster. - * + * * @return the serverNames value. */ List serverNames(); /** * Gets the sourceResourceId property: The resource id of source cluster for read replica clusters. - * + * * @return the sourceResourceId value. */ String sourceResourceId(); /** * Gets the sourceLocation property: The Azure region of source cluster for read replica clusters. - * + * * @return the sourceLocation value. */ String sourceLocation(); /** * Gets the pointInTimeUtc property: Date and time in UTC (ISO8601 format) for cluster restore. - * + * * @return the pointInTimeUtc value. */ OffsetDateTime pointInTimeUtc(); /** * Gets the readReplicas property: The array of read replica clusters. - * + * * @return the readReplicas value. */ List readReplicas(); /** * Gets the earliestRestoreTime property: The earliest restore point time (ISO8601 format) for the cluster. - * + * * @return the earliestRestoreTime value. */ OffsetDateTime earliestRestoreTime(); /** * Gets the privateEndpointConnections property: The private endpoint connections for a cluster. - * + * * @return the privateEndpointConnections value. */ List privateEndpointConnections(); + /** + * Gets the databaseName property: The database name of the cluster. Only one database per cluster is supported. + * + * @return the databaseName value. + */ + String databaseName(); + + /** + * Gets the enableGeoBackup property: If cluster backup is stored in another Azure region in addition to the copy of + * the backup stored in the cluster's region. Enabled only at the time of cluster creation. + * + * @return the enableGeoBackup value. + */ + Boolean enableGeoBackup(); + + /** + * Gets the authConfig property: Authentication configuration of a cluster. + * + * @return the authConfig value. + */ + AuthConfig authConfig(); + /** * Gets the region of the resource. - * + * * @return the region of the resource. */ Region region(); /** * Gets the name of the resource region. - * + * * @return the name of the resource region. */ String regionName(); /** * Gets the name of the resource group. - * + * * @return the name of the resource group. */ String resourceGroupName(); /** * Gets the inner com.azure.resourcemanager.cosmosdbforpostgresql.fluent.models.ClusterInner object. - * + * * @return the inner object. */ ClusterInner innerModel(); - /** The entirety of the Cluster definition. */ - interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithLocation, - DefinitionStages.WithResourceGroup, - DefinitionStages.WithCreate { + /** + * The entirety of the Cluster definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, + DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate { } - /** The Cluster definition stages. */ + /** + * The Cluster definition stages. + */ interface DefinitionStages { - /** The first stage of the Cluster definition. */ + /** + * The first stage of the Cluster definition. + */ interface Blank extends WithLocation { } - /** The stage of the Cluster definition allowing to specify location. */ + /** + * The stage of the Cluster definition allowing to specify location. + */ interface WithLocation { /** * Specifies the region for the resource. - * + * * @param location The geo-location where the resource lives. * @return the next definition stage. */ @@ -300,18 +329,20 @@ interface WithLocation { /** * Specifies the region for the resource. - * + * * @param location The geo-location where the resource lives. * @return the next definition stage. */ WithResourceGroup withRegion(String location); } - /** The stage of the Cluster definition allowing to specify parent resource. */ + /** + * The stage of the Cluster definition allowing to specify parent resource. + */ interface WithResourceGroup { /** * Specifies resourceGroupName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @return the next definition stage. */ @@ -322,505 +353,603 @@ interface WithResourceGroup { * The stage of the Cluster definition which contains all the minimum required properties for the resource to be * created, but also allows for any other optional properties to be specified. */ - interface WithCreate - extends DefinitionStages.WithTags, - DefinitionStages.WithAdministratorLoginPassword, - DefinitionStages.WithPostgresqlVersion, - DefinitionStages.WithCitusVersion, - DefinitionStages.WithMaintenanceWindow, - DefinitionStages.WithPreferredPrimaryZone, - DefinitionStages.WithEnableShardsOnCoordinator, - DefinitionStages.WithEnableHa, - DefinitionStages.WithCoordinatorServerEdition, - DefinitionStages.WithCoordinatorStorageQuotaInMb, - DefinitionStages.WithCoordinatorVCores, - DefinitionStages.WithCoordinatorEnablePublicIpAccess, - DefinitionStages.WithNodeServerEdition, - DefinitionStages.WithNodeCount, - DefinitionStages.WithNodeStorageQuotaInMb, - DefinitionStages.WithNodeVCores, - DefinitionStages.WithNodeEnablePublicIpAccess, - DefinitionStages.WithSourceResourceId, - DefinitionStages.WithSourceLocation, - DefinitionStages.WithPointInTimeUtc { + interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithAdministratorLoginPassword, + DefinitionStages.WithPostgresqlVersion, DefinitionStages.WithCitusVersion, + DefinitionStages.WithMaintenanceWindow, DefinitionStages.WithPreferredPrimaryZone, + DefinitionStages.WithEnableShardsOnCoordinator, DefinitionStages.WithEnableHa, + DefinitionStages.WithCoordinatorServerEdition, DefinitionStages.WithCoordinatorStorageQuotaInMb, + DefinitionStages.WithCoordinatorVCores, DefinitionStages.WithCoordinatorEnablePublicIpAccess, + DefinitionStages.WithNodeServerEdition, DefinitionStages.WithNodeCount, + DefinitionStages.WithNodeStorageQuotaInMb, DefinitionStages.WithNodeVCores, + DefinitionStages.WithNodeEnablePublicIpAccess, DefinitionStages.WithSourceResourceId, + DefinitionStages.WithSourceLocation, DefinitionStages.WithPointInTimeUtc, DefinitionStages.WithDatabaseName, + DefinitionStages.WithEnableGeoBackup, DefinitionStages.WithAuthConfig { /** * Executes the create request. - * + * * @return the created resource. */ Cluster create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ Cluster create(Context context); } - /** The stage of the Cluster definition allowing to specify tags. */ + /** + * The stage of the Cluster definition allowing to specify tags. + */ interface WithTags { /** * Specifies the tags property: Resource tags.. - * + * * @param tags Resource tags. * @return the next definition stage. */ WithCreate withTags(Map tags); } - /** The stage of the Cluster definition allowing to specify administratorLoginPassword. */ + /** + * The stage of the Cluster definition allowing to specify administratorLoginPassword. + */ interface WithAdministratorLoginPassword { /** * Specifies the administratorLoginPassword property: The password of the administrator login. Required for * creation.. - * + * * @param administratorLoginPassword The password of the administrator login. Required for creation. * @return the next definition stage. */ WithCreate withAdministratorLoginPassword(String administratorLoginPassword); } - /** The stage of the Cluster definition allowing to specify postgresqlVersion. */ + /** + * The stage of the Cluster definition allowing to specify postgresqlVersion. + */ interface WithPostgresqlVersion { /** * Specifies the postgresqlVersion property: The major PostgreSQL version on all cluster servers.. - * + * * @param postgresqlVersion The major PostgreSQL version on all cluster servers. * @return the next definition stage. */ WithCreate withPostgresqlVersion(String postgresqlVersion); } - /** The stage of the Cluster definition allowing to specify citusVersion. */ + /** + * The stage of the Cluster definition allowing to specify citusVersion. + */ interface WithCitusVersion { /** * Specifies the citusVersion property: The Citus extension version on all cluster servers.. - * + * * @param citusVersion The Citus extension version on all cluster servers. * @return the next definition stage. */ WithCreate withCitusVersion(String citusVersion); } - /** The stage of the Cluster definition allowing to specify maintenanceWindow. */ + /** + * The stage of the Cluster definition allowing to specify maintenanceWindow. + */ interface WithMaintenanceWindow { /** * Specifies the maintenanceWindow property: Maintenance window of a cluster.. - * + * * @param maintenanceWindow Maintenance window of a cluster. * @return the next definition stage. */ WithCreate withMaintenanceWindow(MaintenanceWindow maintenanceWindow); } - /** The stage of the Cluster definition allowing to specify preferredPrimaryZone. */ + /** + * The stage of the Cluster definition allowing to specify preferredPrimaryZone. + */ interface WithPreferredPrimaryZone { /** * Specifies the preferredPrimaryZone property: Preferred primary availability zone (AZ) for all cluster * servers.. - * + * * @param preferredPrimaryZone Preferred primary availability zone (AZ) for all cluster servers. * @return the next definition stage. */ WithCreate withPreferredPrimaryZone(String preferredPrimaryZone); } - /** The stage of the Cluster definition allowing to specify enableShardsOnCoordinator. */ + /** + * The stage of the Cluster definition allowing to specify enableShardsOnCoordinator. + */ interface WithEnableShardsOnCoordinator { /** * Specifies the enableShardsOnCoordinator property: If distributed tables are placed on coordinator or not. * Should be set to 'true' on single node clusters. Requires shard rebalancing after value is changed.. - * + * * @param enableShardsOnCoordinator If distributed tables are placed on coordinator or not. Should be set to - * 'true' on single node clusters. Requires shard rebalancing after value is changed. + * 'true' on single node clusters. Requires shard rebalancing after value is changed. * @return the next definition stage. */ WithCreate withEnableShardsOnCoordinator(Boolean enableShardsOnCoordinator); } - /** The stage of the Cluster definition allowing to specify enableHa. */ + /** + * The stage of the Cluster definition allowing to specify enableHa. + */ interface WithEnableHa { /** * Specifies the enableHa property: If high availability (HA) is enabled or not for the cluster.. - * + * * @param enableHa If high availability (HA) is enabled or not for the cluster. * @return the next definition stage. */ WithCreate withEnableHa(Boolean enableHa); } - /** The stage of the Cluster definition allowing to specify coordinatorServerEdition. */ + /** + * The stage of the Cluster definition allowing to specify coordinatorServerEdition. + */ interface WithCoordinatorServerEdition { /** * Specifies the coordinatorServerEdition property: The edition of a coordinator server (default: * GeneralPurpose). Required for creation.. - * + * * @param coordinatorServerEdition The edition of a coordinator server (default: GeneralPurpose). Required - * for creation. + * for creation. * @return the next definition stage. */ WithCreate withCoordinatorServerEdition(String coordinatorServerEdition); } - /** The stage of the Cluster definition allowing to specify coordinatorStorageQuotaInMb. */ + /** + * The stage of the Cluster definition allowing to specify coordinatorStorageQuotaInMb. + */ interface WithCoordinatorStorageQuotaInMb { /** * Specifies the coordinatorStorageQuotaInMb property: The storage of a server in MB. Required for creation. * See https://learn.microsoft.com/azure/cosmos-db/postgresql/resources-compute for more information.. - * + * * @param coordinatorStorageQuotaInMb The storage of a server in MB. Required for creation. See - * https://learn.microsoft.com/azure/cosmos-db/postgresql/resources-compute for more information. + * https://learn.microsoft.com/azure/cosmos-db/postgresql/resources-compute for more information. * @return the next definition stage. */ WithCreate withCoordinatorStorageQuotaInMb(Integer coordinatorStorageQuotaInMb); } - /** The stage of the Cluster definition allowing to specify coordinatorVCores. */ + /** + * The stage of the Cluster definition allowing to specify coordinatorVCores. + */ interface WithCoordinatorVCores { /** * Specifies the coordinatorVCores property: The vCores count of a server (max: 96). Required for creation. * See https://learn.microsoft.com/azure/cosmos-db/postgresql/resources-compute for more information.. - * + * * @param coordinatorVCores The vCores count of a server (max: 96). Required for creation. See - * https://learn.microsoft.com/azure/cosmos-db/postgresql/resources-compute for more information. + * https://learn.microsoft.com/azure/cosmos-db/postgresql/resources-compute for more information. * @return the next definition stage. */ WithCreate withCoordinatorVCores(Integer coordinatorVCores); } - /** The stage of the Cluster definition allowing to specify coordinatorEnablePublicIpAccess. */ + /** + * The stage of the Cluster definition allowing to specify coordinatorEnablePublicIpAccess. + */ interface WithCoordinatorEnablePublicIpAccess { /** * Specifies the coordinatorEnablePublicIpAccess property: If public access is enabled on coordinator.. - * + * * @param coordinatorEnablePublicIpAccess If public access is enabled on coordinator. * @return the next definition stage. */ WithCreate withCoordinatorEnablePublicIpAccess(Boolean coordinatorEnablePublicIpAccess); } - /** The stage of the Cluster definition allowing to specify nodeServerEdition. */ + /** + * The stage of the Cluster definition allowing to specify nodeServerEdition. + */ interface WithNodeServerEdition { /** * Specifies the nodeServerEdition property: The edition of a node server (default: MemoryOptimized).. - * + * * @param nodeServerEdition The edition of a node server (default: MemoryOptimized). * @return the next definition stage. */ WithCreate withNodeServerEdition(String nodeServerEdition); } - /** The stage of the Cluster definition allowing to specify nodeCount. */ + /** + * The stage of the Cluster definition allowing to specify nodeCount. + */ interface WithNodeCount { /** * Specifies the nodeCount property: Worker node count of the cluster. When node count is 0, it represents a * single node configuration with the ability to create distributed tables on that node. 2 or more worker * nodes represent multi-node configuration. Node count value cannot be 1. Required for creation.. - * + * * @param nodeCount Worker node count of the cluster. When node count is 0, it represents a single node - * configuration with the ability to create distributed tables on that node. 2 or more worker nodes - * represent multi-node configuration. Node count value cannot be 1. Required for creation. + * configuration with the ability to create distributed tables on that node. 2 or more worker nodes + * represent multi-node configuration. Node count value cannot be 1. Required for creation. * @return the next definition stage. */ WithCreate withNodeCount(Integer nodeCount); } - /** The stage of the Cluster definition allowing to specify nodeStorageQuotaInMb. */ + /** + * The stage of the Cluster definition allowing to specify nodeStorageQuotaInMb. + */ interface WithNodeStorageQuotaInMb { /** * Specifies the nodeStorageQuotaInMb property: The storage in MB on each worker node. See * https://learn.microsoft.com/azure/cosmos-db/postgresql/resources-compute for more information.. - * + * * @param nodeStorageQuotaInMb The storage in MB on each worker node. See - * https://learn.microsoft.com/azure/cosmos-db/postgresql/resources-compute for more information. + * https://learn.microsoft.com/azure/cosmos-db/postgresql/resources-compute for more information. * @return the next definition stage. */ WithCreate withNodeStorageQuotaInMb(Integer nodeStorageQuotaInMb); } - /** The stage of the Cluster definition allowing to specify nodeVCores. */ + /** + * The stage of the Cluster definition allowing to specify nodeVCores. + */ interface WithNodeVCores { /** * Specifies the nodeVCores property: The compute in vCores on each worker node (max: 104). See * https://learn.microsoft.com/azure/cosmos-db/postgresql/resources-compute for more information.. - * + * * @param nodeVCores The compute in vCores on each worker node (max: 104). See - * https://learn.microsoft.com/azure/cosmos-db/postgresql/resources-compute for more information. + * https://learn.microsoft.com/azure/cosmos-db/postgresql/resources-compute for more information. * @return the next definition stage. */ WithCreate withNodeVCores(Integer nodeVCores); } - /** The stage of the Cluster definition allowing to specify nodeEnablePublicIpAccess. */ + /** + * The stage of the Cluster definition allowing to specify nodeEnablePublicIpAccess. + */ interface WithNodeEnablePublicIpAccess { /** * Specifies the nodeEnablePublicIpAccess property: If public access is enabled on worker nodes.. - * + * * @param nodeEnablePublicIpAccess If public access is enabled on worker nodes. * @return the next definition stage. */ WithCreate withNodeEnablePublicIpAccess(Boolean nodeEnablePublicIpAccess); } - /** The stage of the Cluster definition allowing to specify sourceResourceId. */ + /** + * The stage of the Cluster definition allowing to specify sourceResourceId. + */ interface WithSourceResourceId { /** * Specifies the sourceResourceId property: The resource id of source cluster for read replica clusters.. - * + * * @param sourceResourceId The resource id of source cluster for read replica clusters. * @return the next definition stage. */ WithCreate withSourceResourceId(String sourceResourceId); } - /** The stage of the Cluster definition allowing to specify sourceLocation. */ + /** + * The stage of the Cluster definition allowing to specify sourceLocation. + */ interface WithSourceLocation { /** * Specifies the sourceLocation property: The Azure region of source cluster for read replica clusters.. - * + * * @param sourceLocation The Azure region of source cluster for read replica clusters. * @return the next definition stage. */ WithCreate withSourceLocation(String sourceLocation); } - /** The stage of the Cluster definition allowing to specify pointInTimeUtc. */ + /** + * The stage of the Cluster definition allowing to specify pointInTimeUtc. + */ interface WithPointInTimeUtc { /** * Specifies the pointInTimeUtc property: Date and time in UTC (ISO8601 format) for cluster restore.. - * + * * @param pointInTimeUtc Date and time in UTC (ISO8601 format) for cluster restore. * @return the next definition stage. */ WithCreate withPointInTimeUtc(OffsetDateTime pointInTimeUtc); } + + /** + * The stage of the Cluster definition allowing to specify databaseName. + */ + interface WithDatabaseName { + /** + * Specifies the databaseName property: The database name of the cluster. Only one database per cluster is + * supported.. + * + * @param databaseName The database name of the cluster. Only one database per cluster is supported. + * @return the next definition stage. + */ + WithCreate withDatabaseName(String databaseName); + } + + /** + * The stage of the Cluster definition allowing to specify enableGeoBackup. + */ + interface WithEnableGeoBackup { + /** + * Specifies the enableGeoBackup property: If cluster backup is stored in another Azure region in addition + * to the copy of the backup stored in the cluster's region. Enabled only at the time of cluster creation.. + * + * @param enableGeoBackup If cluster backup is stored in another Azure region in addition to the copy of the + * backup stored in the cluster's region. Enabled only at the time of cluster creation. + * @return the next definition stage. + */ + WithCreate withEnableGeoBackup(Boolean enableGeoBackup); + } + + /** + * The stage of the Cluster definition allowing to specify authConfig. + */ + interface WithAuthConfig { + /** + * Specifies the authConfig property: Authentication configuration of a cluster.. + * + * @param authConfig Authentication configuration of a cluster. + * @return the next definition stage. + */ + WithCreate withAuthConfig(AuthConfig authConfig); + } } /** * Begins update for the Cluster resource. - * + * * @return the stage of resource update. */ Cluster.Update update(); - /** The template for Cluster update. */ - interface Update - extends UpdateStages.WithTags, - UpdateStages.WithAdministratorLoginPassword, - UpdateStages.WithPostgresqlVersion, - UpdateStages.WithCitusVersion, - UpdateStages.WithEnableShardsOnCoordinator, - UpdateStages.WithEnableHa, - UpdateStages.WithPreferredPrimaryZone, - UpdateStages.WithCoordinatorServerEdition, - UpdateStages.WithCoordinatorStorageQuotaInMb, - UpdateStages.WithCoordinatorVCores, - UpdateStages.WithCoordinatorEnablePublicIpAccess, - UpdateStages.WithNodeServerEdition, - UpdateStages.WithNodeCount, - UpdateStages.WithNodeStorageQuotaInMb, - UpdateStages.WithNodeVCores, - UpdateStages.WithMaintenanceWindow { + /** + * The template for Cluster update. + */ + interface Update extends UpdateStages.WithTags, UpdateStages.WithAdministratorLoginPassword, + UpdateStages.WithPostgresqlVersion, UpdateStages.WithCitusVersion, UpdateStages.WithEnableShardsOnCoordinator, + UpdateStages.WithEnableHa, UpdateStages.WithPreferredPrimaryZone, UpdateStages.WithCoordinatorServerEdition, + UpdateStages.WithCoordinatorStorageQuotaInMb, UpdateStages.WithCoordinatorVCores, + UpdateStages.WithCoordinatorEnablePublicIpAccess, UpdateStages.WithNodeServerEdition, + UpdateStages.WithNodeCount, UpdateStages.WithNodeStorageQuotaInMb, UpdateStages.WithNodeVCores, + UpdateStages.WithMaintenanceWindow { /** * Executes the update request. - * + * * @return the updated resource. */ Cluster apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ Cluster apply(Context context); } - /** The Cluster update stages. */ + /** + * The Cluster update stages. + */ interface UpdateStages { - /** The stage of the Cluster update allowing to specify tags. */ + /** + * The stage of the Cluster update allowing to specify tags. + */ interface WithTags { /** * Specifies the tags property: Application-specific metadata in the form of key-value pairs.. - * + * * @param tags Application-specific metadata in the form of key-value pairs. * @return the next definition stage. */ Update withTags(Map tags); } - /** The stage of the Cluster update allowing to specify administratorLoginPassword. */ + /** + * The stage of the Cluster update allowing to specify administratorLoginPassword. + */ interface WithAdministratorLoginPassword { /** * Specifies the administratorLoginPassword property: The password of the administrator login. Each cluster * is created with pre-defined administrative role called ‘citus’. . - * + * * @param administratorLoginPassword The password of the administrator login. Each cluster is created with - * pre-defined administrative role called ‘citus’. . + * pre-defined administrative role called ‘citus’. . * @return the next definition stage. */ Update withAdministratorLoginPassword(String administratorLoginPassword); } - /** The stage of the Cluster update allowing to specify postgresqlVersion. */ + /** + * The stage of the Cluster update allowing to specify postgresqlVersion. + */ interface WithPostgresqlVersion { /** * Specifies the postgresqlVersion property: The major PostgreSQL version on all cluster servers.. - * + * * @param postgresqlVersion The major PostgreSQL version on all cluster servers. * @return the next definition stage. */ Update withPostgresqlVersion(String postgresqlVersion); } - /** The stage of the Cluster update allowing to specify citusVersion. */ + /** + * The stage of the Cluster update allowing to specify citusVersion. + */ interface WithCitusVersion { /** * Specifies the citusVersion property: The Citus extension version on all cluster servers.. - * + * * @param citusVersion The Citus extension version on all cluster servers. * @return the next definition stage. */ Update withCitusVersion(String citusVersion); } - /** The stage of the Cluster update allowing to specify enableShardsOnCoordinator. */ + /** + * The stage of the Cluster update allowing to specify enableShardsOnCoordinator. + */ interface WithEnableShardsOnCoordinator { /** * Specifies the enableShardsOnCoordinator property: If distributed tables are placed on coordinator or not. * Should be set to 'true' on single node clusters. Requires shard rebalancing after value is changed.. - * + * * @param enableShardsOnCoordinator If distributed tables are placed on coordinator or not. Should be set to - * 'true' on single node clusters. Requires shard rebalancing after value is changed. + * 'true' on single node clusters. Requires shard rebalancing after value is changed. * @return the next definition stage. */ Update withEnableShardsOnCoordinator(Boolean enableShardsOnCoordinator); } - /** The stage of the Cluster update allowing to specify enableHa. */ + /** + * The stage of the Cluster update allowing to specify enableHa. + */ interface WithEnableHa { /** * Specifies the enableHa property: If high availability (HA) is enabled or not for the cluster.. - * + * * @param enableHa If high availability (HA) is enabled or not for the cluster. * @return the next definition stage. */ Update withEnableHa(Boolean enableHa); } - /** The stage of the Cluster update allowing to specify preferredPrimaryZone. */ + /** + * The stage of the Cluster update allowing to specify preferredPrimaryZone. + */ interface WithPreferredPrimaryZone { /** * Specifies the preferredPrimaryZone property: Preferred primary availability zone (AZ) for all cluster * servers.. - * + * * @param preferredPrimaryZone Preferred primary availability zone (AZ) for all cluster servers. * @return the next definition stage. */ Update withPreferredPrimaryZone(String preferredPrimaryZone); } - /** The stage of the Cluster update allowing to specify coordinatorServerEdition. */ + /** + * The stage of the Cluster update allowing to specify coordinatorServerEdition. + */ interface WithCoordinatorServerEdition { /** * Specifies the coordinatorServerEdition property: The edition of the coordinator (default: * GeneralPurpose).. - * + * * @param coordinatorServerEdition The edition of the coordinator (default: GeneralPurpose). * @return the next definition stage. */ Update withCoordinatorServerEdition(String coordinatorServerEdition); } - /** The stage of the Cluster update allowing to specify coordinatorStorageQuotaInMb. */ + /** + * The stage of the Cluster update allowing to specify coordinatorStorageQuotaInMb. + */ interface WithCoordinatorStorageQuotaInMb { /** * Specifies the coordinatorStorageQuotaInMb property: The storage of the coordinator in MB.. - * + * * @param coordinatorStorageQuotaInMb The storage of the coordinator in MB. * @return the next definition stage. */ Update withCoordinatorStorageQuotaInMb(Integer coordinatorStorageQuotaInMb); } - /** The stage of the Cluster update allowing to specify coordinatorVCores. */ + /** + * The stage of the Cluster update allowing to specify coordinatorVCores. + */ interface WithCoordinatorVCores { /** * Specifies the coordinatorVCores property: The vCores count of the coordinator (max: 96).. - * + * * @param coordinatorVCores The vCores count of the coordinator (max: 96). * @return the next definition stage. */ Update withCoordinatorVCores(Integer coordinatorVCores); } - /** The stage of the Cluster update allowing to specify coordinatorEnablePublicIpAccess. */ + /** + * The stage of the Cluster update allowing to specify coordinatorEnablePublicIpAccess. + */ interface WithCoordinatorEnablePublicIpAccess { /** * Specifies the coordinatorEnablePublicIpAccess property: If public access is enabled on coordinator.. - * + * * @param coordinatorEnablePublicIpAccess If public access is enabled on coordinator. * @return the next definition stage. */ Update withCoordinatorEnablePublicIpAccess(Boolean coordinatorEnablePublicIpAccess); } - /** The stage of the Cluster update allowing to specify nodeServerEdition. */ + /** + * The stage of the Cluster update allowing to specify nodeServerEdition. + */ interface WithNodeServerEdition { /** * Specifies the nodeServerEdition property: The edition of a node (default: MemoryOptimized).. - * + * * @param nodeServerEdition The edition of a node (default: MemoryOptimized). * @return the next definition stage. */ Update withNodeServerEdition(String nodeServerEdition); } - /** The stage of the Cluster update allowing to specify nodeCount. */ + /** + * The stage of the Cluster update allowing to specify nodeCount. + */ interface WithNodeCount { /** * Specifies the nodeCount property: Worker node count of the cluster. When node count is 0, it represents a * single node configuration with the ability to create distributed tables on that node. 2 or more worker * nodes represent multi-node configuration. Node count value cannot be 1.. - * + * * @param nodeCount Worker node count of the cluster. When node count is 0, it represents a single node - * configuration with the ability to create distributed tables on that node. 2 or more worker nodes - * represent multi-node configuration. Node count value cannot be 1. + * configuration with the ability to create distributed tables on that node. 2 or more worker nodes + * represent multi-node configuration. Node count value cannot be 1. * @return the next definition stage. */ Update withNodeCount(Integer nodeCount); } - /** The stage of the Cluster update allowing to specify nodeStorageQuotaInMb. */ + /** + * The stage of the Cluster update allowing to specify nodeStorageQuotaInMb. + */ interface WithNodeStorageQuotaInMb { /** * Specifies the nodeStorageQuotaInMb property: The storage in MB on each worker node.. - * + * * @param nodeStorageQuotaInMb The storage in MB on each worker node. * @return the next definition stage. */ Update withNodeStorageQuotaInMb(Integer nodeStorageQuotaInMb); } - /** The stage of the Cluster update allowing to specify nodeVCores. */ + /** + * The stage of the Cluster update allowing to specify nodeVCores. + */ interface WithNodeVCores { /** * Specifies the nodeVCores property: The compute in vCores on each worker node (max: 104).. - * + * * @param nodeVCores The compute in vCores on each worker node (max: 104). * @return the next definition stage. */ Update withNodeVCores(Integer nodeVCores); } - /** The stage of the Cluster update allowing to specify maintenanceWindow. */ + /** + * The stage of the Cluster update allowing to specify maintenanceWindow. + */ interface WithMaintenanceWindow { /** * Specifies the maintenanceWindow property: Maintenance window of a cluster.. - * + * * @param maintenanceWindow Maintenance window of a cluster. * @return the next definition stage. */ @@ -830,14 +959,14 @@ interface WithMaintenanceWindow { /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ Cluster refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ @@ -845,7 +974,7 @@ interface WithMaintenanceWindow { /** * Restarts all nodes in the cluster. - * + * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @@ -853,7 +982,7 @@ interface WithMaintenanceWindow { /** * Restarts all nodes in the cluster. - * + * * @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. @@ -863,7 +992,7 @@ interface WithMaintenanceWindow { /** * Starts stopped compute on all cluster nodes. - * + * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @@ -871,7 +1000,7 @@ interface WithMaintenanceWindow { /** * Starts stopped compute on all cluster nodes. - * + * * @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. @@ -881,7 +1010,7 @@ interface WithMaintenanceWindow { /** * Stops compute on all cluster nodes. - * + * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @@ -889,7 +1018,7 @@ interface WithMaintenanceWindow { /** * Stops compute on all cluster nodes. - * + * * @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. @@ -899,7 +1028,7 @@ interface WithMaintenanceWindow { /** * Promotes read replica cluster to an independent read-write cluster. - * + * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @@ -907,11 +1036,12 @@ interface WithMaintenanceWindow { /** * Promotes read replica cluster to an independent read-write cluster. - * + * + * @param promoteRequest The parameter for enabling geo-redundant backup while promoting read replica. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ - void promoteReadReplica(Context context); + void promoteReadReplica(PromoteRequest promoteRequest, Context context); } diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/ClusterConfigurationListResult.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/ClusterConfigurationListResult.java index a5b2b46fed93..d33bb3fdf0cf 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/ClusterConfigurationListResult.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/ClusterConfigurationListResult.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** A list of cluster configurations. */ +/** + * A list of cluster configurations. + */ @Fluent public final class ClusterConfigurationListResult { /* @@ -24,13 +26,15 @@ public final class ClusterConfigurationListResult { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of ClusterConfigurationListResult class. */ + /** + * Creates an instance of ClusterConfigurationListResult class. + */ public ClusterConfigurationListResult() { } /** * Get the value property: The list of cluster configurations. - * + * * @return the value value. */ public List value() { @@ -39,7 +43,7 @@ public List value() { /** * Set the value property: The list of cluster configurations. - * + * * @param value the value value to set. * @return the ClusterConfigurationListResult object itself. */ @@ -50,7 +54,7 @@ public ClusterConfigurationListResult withValue(List value) /** * Get the nextLink property: Link to retrieve next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -59,7 +63,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/ClusterForUpdate.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/ClusterForUpdate.java index c2735b25a05e..80cc4349a7ea 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/ClusterForUpdate.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/ClusterForUpdate.java @@ -10,7 +10,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; -/** Represents a cluster for update. */ +/** + * Represents a cluster for update. + */ @Fluent public final class ClusterForUpdate { /* @@ -26,13 +28,15 @@ public final class ClusterForUpdate { @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map tags; - /** Creates an instance of ClusterForUpdate class. */ + /** + * Creates an instance of ClusterForUpdate class. + */ public ClusterForUpdate() { } /** * Get the innerProperties property: Properties of the cluster. - * + * * @return the innerProperties value. */ private ClusterPropertiesForUpdate innerProperties() { @@ -41,7 +45,7 @@ private ClusterPropertiesForUpdate innerProperties() { /** * Get the tags property: Application-specific metadata in the form of key-value pairs. - * + * * @return the tags value. */ public Map tags() { @@ -50,7 +54,7 @@ public Map tags() { /** * Set the tags property: Application-specific metadata in the form of key-value pairs. - * + * * @param tags the tags value to set. * @return the ClusterForUpdate object itself. */ @@ -62,7 +66,7 @@ public ClusterForUpdate withTags(Map tags) { /** * Get the administratorLoginPassword property: The password of the administrator login. Each cluster is created * with pre-defined administrative role called ‘citus’. . - * + * * @return the administratorLoginPassword value. */ public String administratorLoginPassword() { @@ -72,7 +76,7 @@ public String administratorLoginPassword() { /** * Set the administratorLoginPassword property: The password of the administrator login. Each cluster is created * with pre-defined administrative role called ‘citus’. . - * + * * @param administratorLoginPassword the administratorLoginPassword value to set. * @return the ClusterForUpdate object itself. */ @@ -86,7 +90,7 @@ public ClusterForUpdate withAdministratorLoginPassword(String administratorLogin /** * Get the postgresqlVersion property: The major PostgreSQL version on all cluster servers. - * + * * @return the postgresqlVersion value. */ public String postgresqlVersion() { @@ -95,7 +99,7 @@ public String postgresqlVersion() { /** * Set the postgresqlVersion property: The major PostgreSQL version on all cluster servers. - * + * * @param postgresqlVersion the postgresqlVersion value to set. * @return the ClusterForUpdate object itself. */ @@ -109,7 +113,7 @@ public ClusterForUpdate withPostgresqlVersion(String postgresqlVersion) { /** * Get the citusVersion property: The Citus extension version on all cluster servers. - * + * * @return the citusVersion value. */ public String citusVersion() { @@ -118,7 +122,7 @@ public String citusVersion() { /** * Set the citusVersion property: The Citus extension version on all cluster servers. - * + * * @param citusVersion the citusVersion value to set. * @return the ClusterForUpdate object itself. */ @@ -131,9 +135,9 @@ public ClusterForUpdate withCitusVersion(String citusVersion) { } /** - * Get the enableShardsOnCoordinator property: If distributed tables are placed on coordinator or not. Should be set - * to 'true' on single node clusters. Requires shard rebalancing after value is changed. - * + * Get the enableShardsOnCoordinator property: If distributed tables are placed on coordinator or not. Should be + * set to 'true' on single node clusters. Requires shard rebalancing after value is changed. + * * @return the enableShardsOnCoordinator value. */ public Boolean enableShardsOnCoordinator() { @@ -141,9 +145,9 @@ public Boolean enableShardsOnCoordinator() { } /** - * Set the enableShardsOnCoordinator property: If distributed tables are placed on coordinator or not. Should be set - * to 'true' on single node clusters. Requires shard rebalancing after value is changed. - * + * Set the enableShardsOnCoordinator property: If distributed tables are placed on coordinator or not. Should be + * set to 'true' on single node clusters. Requires shard rebalancing after value is changed. + * * @param enableShardsOnCoordinator the enableShardsOnCoordinator value to set. * @return the ClusterForUpdate object itself. */ @@ -157,7 +161,7 @@ public ClusterForUpdate withEnableShardsOnCoordinator(Boolean enableShardsOnCoor /** * Get the enableHa property: If high availability (HA) is enabled or not for the cluster. - * + * * @return the enableHa value. */ public Boolean enableHa() { @@ -166,7 +170,7 @@ public Boolean enableHa() { /** * Set the enableHa property: If high availability (HA) is enabled or not for the cluster. - * + * * @param enableHa the enableHa value to set. * @return the ClusterForUpdate object itself. */ @@ -180,7 +184,7 @@ public ClusterForUpdate withEnableHa(Boolean enableHa) { /** * Get the preferredPrimaryZone property: Preferred primary availability zone (AZ) for all cluster servers. - * + * * @return the preferredPrimaryZone value. */ public String preferredPrimaryZone() { @@ -189,7 +193,7 @@ public String preferredPrimaryZone() { /** * Set the preferredPrimaryZone property: Preferred primary availability zone (AZ) for all cluster servers. - * + * * @param preferredPrimaryZone the preferredPrimaryZone value to set. * @return the ClusterForUpdate object itself. */ @@ -203,7 +207,7 @@ public ClusterForUpdate withPreferredPrimaryZone(String preferredPrimaryZone) { /** * Get the coordinatorServerEdition property: The edition of the coordinator (default: GeneralPurpose). - * + * * @return the coordinatorServerEdition value. */ public String coordinatorServerEdition() { @@ -212,7 +216,7 @@ public String coordinatorServerEdition() { /** * Set the coordinatorServerEdition property: The edition of the coordinator (default: GeneralPurpose). - * + * * @param coordinatorServerEdition the coordinatorServerEdition value to set. * @return the ClusterForUpdate object itself. */ @@ -226,7 +230,7 @@ public ClusterForUpdate withCoordinatorServerEdition(String coordinatorServerEdi /** * Get the coordinatorStorageQuotaInMb property: The storage of the coordinator in MB. - * + * * @return the coordinatorStorageQuotaInMb value. */ public Integer coordinatorStorageQuotaInMb() { @@ -235,7 +239,7 @@ public Integer coordinatorStorageQuotaInMb() { /** * Set the coordinatorStorageQuotaInMb property: The storage of the coordinator in MB. - * + * * @param coordinatorStorageQuotaInMb the coordinatorStorageQuotaInMb value to set. * @return the ClusterForUpdate object itself. */ @@ -249,7 +253,7 @@ public ClusterForUpdate withCoordinatorStorageQuotaInMb(Integer coordinatorStora /** * Get the coordinatorVCores property: The vCores count of the coordinator (max: 96). - * + * * @return the coordinatorVCores value. */ public Integer coordinatorVCores() { @@ -258,7 +262,7 @@ public Integer coordinatorVCores() { /** * Set the coordinatorVCores property: The vCores count of the coordinator (max: 96). - * + * * @param coordinatorVCores the coordinatorVCores value to set. * @return the ClusterForUpdate object itself. */ @@ -272,7 +276,7 @@ public ClusterForUpdate withCoordinatorVCores(Integer coordinatorVCores) { /** * Get the coordinatorEnablePublicIpAccess property: If public access is enabled on coordinator. - * + * * @return the coordinatorEnablePublicIpAccess value. */ public Boolean coordinatorEnablePublicIpAccess() { @@ -281,7 +285,7 @@ public Boolean coordinatorEnablePublicIpAccess() { /** * Set the coordinatorEnablePublicIpAccess property: If public access is enabled on coordinator. - * + * * @param coordinatorEnablePublicIpAccess the coordinatorEnablePublicIpAccess value to set. * @return the ClusterForUpdate object itself. */ @@ -295,7 +299,7 @@ public ClusterForUpdate withCoordinatorEnablePublicIpAccess(Boolean coordinatorE /** * Get the nodeServerEdition property: The edition of a node (default: MemoryOptimized). - * + * * @return the nodeServerEdition value. */ public String nodeServerEdition() { @@ -304,7 +308,7 @@ public String nodeServerEdition() { /** * Set the nodeServerEdition property: The edition of a node (default: MemoryOptimized). - * + * * @param nodeServerEdition the nodeServerEdition value to set. * @return the ClusterForUpdate object itself. */ @@ -320,7 +324,7 @@ public ClusterForUpdate withNodeServerEdition(String nodeServerEdition) { * Get the nodeCount property: Worker node count of the cluster. When node count is 0, it represents a single node * configuration with the ability to create distributed tables on that node. 2 or more worker nodes represent * multi-node configuration. Node count value cannot be 1. - * + * * @return the nodeCount value. */ public Integer nodeCount() { @@ -331,7 +335,7 @@ public Integer nodeCount() { * Set the nodeCount property: Worker node count of the cluster. When node count is 0, it represents a single node * configuration with the ability to create distributed tables on that node. 2 or more worker nodes represent * multi-node configuration. Node count value cannot be 1. - * + * * @param nodeCount the nodeCount value to set. * @return the ClusterForUpdate object itself. */ @@ -345,7 +349,7 @@ public ClusterForUpdate withNodeCount(Integer nodeCount) { /** * Get the nodeStorageQuotaInMb property: The storage in MB on each worker node. - * + * * @return the nodeStorageQuotaInMb value. */ public Integer nodeStorageQuotaInMb() { @@ -354,7 +358,7 @@ public Integer nodeStorageQuotaInMb() { /** * Set the nodeStorageQuotaInMb property: The storage in MB on each worker node. - * + * * @param nodeStorageQuotaInMb the nodeStorageQuotaInMb value to set. * @return the ClusterForUpdate object itself. */ @@ -368,7 +372,7 @@ public ClusterForUpdate withNodeStorageQuotaInMb(Integer nodeStorageQuotaInMb) { /** * Get the nodeVCores property: The compute in vCores on each worker node (max: 104). - * + * * @return the nodeVCores value. */ public Integer nodeVCores() { @@ -377,7 +381,7 @@ public Integer nodeVCores() { /** * Set the nodeVCores property: The compute in vCores on each worker node (max: 104). - * + * * @param nodeVCores the nodeVCores value to set. * @return the ClusterForUpdate object itself. */ @@ -391,7 +395,7 @@ public ClusterForUpdate withNodeVCores(Integer nodeVCores) { /** * Get the nodeEnablePublicIpAccess property: If public access is enabled on worker nodes. - * + * * @return the nodeEnablePublicIpAccess value. */ public Boolean nodeEnablePublicIpAccess() { @@ -400,7 +404,7 @@ public Boolean nodeEnablePublicIpAccess() { /** * Get the maintenanceWindow property: Maintenance window of a cluster. - * + * * @return the maintenanceWindow value. */ public MaintenanceWindow maintenanceWindow() { @@ -409,7 +413,7 @@ public MaintenanceWindow maintenanceWindow() { /** * Set the maintenanceWindow property: Maintenance window of a cluster. - * + * * @param maintenanceWindow the maintenanceWindow value to set. * @return the ClusterForUpdate object itself. */ @@ -423,7 +427,7 @@ public ClusterForUpdate withMaintenanceWindow(MaintenanceWindow maintenanceWindo /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/ClusterListResult.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/ClusterListResult.java index 44806cc1dfcd..8ae8f653c303 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/ClusterListResult.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/ClusterListResult.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** A list of clusters. */ +/** + * A list of clusters. + */ @Fluent public final class ClusterListResult { /* @@ -24,13 +26,15 @@ public final class ClusterListResult { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of ClusterListResult class. */ + /** + * Creates an instance of ClusterListResult class. + */ public ClusterListResult() { } /** * Get the value property: The list of clusters. - * + * * @return the value value. */ public List value() { @@ -39,7 +43,7 @@ public List value() { /** * Set the value property: The list of clusters. - * + * * @param value the value value to set. * @return the ClusterListResult object itself. */ @@ -50,7 +54,7 @@ public ClusterListResult withValue(List value) { /** * Get the nextLink property: The link used to get the next page of cluster list. - * + * * @return the nextLink value. */ public String nextLink() { @@ -59,7 +63,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/ClusterServer.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/ClusterServer.java index 075e004700cd..ac0964d5384a 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/ClusterServer.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/ClusterServer.java @@ -7,116 +7,118 @@ import com.azure.core.management.SystemData; import com.azure.resourcemanager.cosmosdbforpostgresql.fluent.models.ClusterServerInner; -/** An immutable client-side representation of ClusterServer. */ +/** + * An immutable client-side representation of ClusterServer. + */ public interface ClusterServer { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); /** * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * + * * @return the systemData value. */ SystemData systemData(); /** * Gets the fullyQualifiedDomainName property: The fully qualified domain name of a server. - * + * * @return the fullyQualifiedDomainName value. */ String fullyQualifiedDomainName(); /** * Gets the role property: The role of server in the cluster. - * + * * @return the role value. */ ServerRole role(); /** * Gets the state property: A state of a cluster/server that is visible to user. - * + * * @return the state value. */ String state(); /** * Gets the haState property: A state of HA feature for the cluster. - * + * * @return the haState value. */ String haState(); /** * Gets the availabilityZone property: Availability Zone information of the server. - * + * * @return the availabilityZone value. */ String availabilityZone(); /** * Gets the postgresqlVersion property: The major PostgreSQL version of server. - * + * * @return the postgresqlVersion value. */ String postgresqlVersion(); /** * Gets the citusVersion property: The Citus extension version of server. - * + * * @return the citusVersion value. */ String citusVersion(); /** * Gets the serverEdition property: The edition of a server. - * + * * @return the serverEdition value. */ String serverEdition(); /** * Gets the storageQuotaInMb property: The storage of a server in MB. - * + * * @return the storageQuotaInMb value. */ Integer storageQuotaInMb(); /** * Gets the vCores property: The vCores count of a server. - * + * * @return the vCores value. */ Integer vCores(); /** * Gets the enableHa property: If high availability (HA) is enabled or not for the server. - * + * * @return the enableHa value. */ Boolean enableHa(); /** * Gets the enablePublicIpAccess property: If public access is enabled on server. - * + * * @return the enablePublicIpAccess value. */ Boolean enablePublicIpAccess(); @@ -124,21 +126,21 @@ public interface ClusterServer { /** * Gets the isReadOnly property: If server database is set to read-only by system maintenance depending on high disk * space usage. - * + * * @return the isReadOnly value. */ Boolean isReadOnly(); /** * Gets the administratorLogin property: The administrator's login name of the servers in the cluster. - * + * * @return the administratorLogin value. */ String administratorLogin(); /** * Gets the inner com.azure.resourcemanager.cosmosdbforpostgresql.fluent.models.ClusterServerInner object. - * + * * @return the inner object. */ ClusterServerInner innerModel(); diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/ClusterServerListResult.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/ClusterServerListResult.java index da1026cc60b5..bc13329a1b18 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/ClusterServerListResult.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/ClusterServerListResult.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** A list of servers in a cluster. */ +/** + * A list of servers in a cluster. + */ @Fluent public final class ClusterServerListResult { /* @@ -18,13 +20,15 @@ public final class ClusterServerListResult { @JsonProperty(value = "value") private List value; - /** Creates an instance of ClusterServerListResult class. */ + /** + * Creates an instance of ClusterServerListResult class. + */ public ClusterServerListResult() { } /** * Get the value property: The list of servers in a cluster. - * + * * @return the value value. */ public List value() { @@ -33,7 +37,7 @@ public List value() { /** * Set the value property: The list of servers in a cluster. - * + * * @param value the value value to set. * @return the ClusterServerListResult object itself. */ @@ -44,7 +48,7 @@ public ClusterServerListResult withValue(List value) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/Clusters.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/Clusters.java index 37a82e5cf613..24408eb38a34 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/Clusters.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/Clusters.java @@ -8,11 +8,13 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of Clusters. */ +/** + * Resource collection API of Clusters. + */ public interface Clusters { /** * Lists all clusters in a subscription. - * + * * @throws com.azure.core.management.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 list of clusters as paginated response with {@link PagedIterable}. @@ -21,7 +23,7 @@ public interface Clusters { /** * Lists all clusters in a subscription. - * + * * @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. @@ -32,7 +34,7 @@ public interface Clusters { /** * Lists all clusters in a resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -43,7 +45,7 @@ public interface Clusters { /** * Lists all clusters in a resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -56,7 +58,7 @@ public interface Clusters { /** * Gets information about a cluster such as compute and storage configuration and cluster lifecycle metadata such as * cluster creation date and time. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param context The context to associate with this operation. @@ -64,27 +66,27 @@ public interface Clusters { * @throws com.azure.core.management.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 cluster such as compute and storage configuration and cluster lifecycle metadata such - * as cluster creation date and time along with {@link Response}. + * as cluster creation date and time along with {@link Response}. */ Response getByResourceGroupWithResponse(String resourceGroupName, String clusterName, Context context); /** * Gets information about a cluster such as compute and storage configuration and cluster lifecycle metadata such as * cluster creation date and time. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.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 cluster such as compute and storage configuration and cluster lifecycle metadata such - * as cluster creation date and time. + * as cluster creation date and time. */ Cluster getByResourceGroup(String resourceGroupName, String clusterName); /** * Deletes a cluster together with servers in it. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -95,7 +97,7 @@ public interface Clusters { /** * Deletes a cluster together with servers in it. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param context The context to associate with this operation. @@ -107,7 +109,7 @@ public interface Clusters { /** * Restarts all nodes in the cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -118,7 +120,7 @@ public interface Clusters { /** * Restarts all nodes in the cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param context The context to associate with this operation. @@ -130,7 +132,7 @@ public interface Clusters { /** * Starts stopped compute on all cluster nodes. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -141,7 +143,7 @@ public interface Clusters { /** * Starts stopped compute on all cluster nodes. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param context The context to associate with this operation. @@ -153,7 +155,7 @@ public interface Clusters { /** * Stops compute on all cluster nodes. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -164,7 +166,7 @@ public interface Clusters { /** * Stops compute on all cluster nodes. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param context The context to associate with this operation. @@ -176,7 +178,7 @@ public interface Clusters { /** * Promotes read replica cluster to an independent read-write cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -187,21 +189,23 @@ public interface Clusters { /** * Promotes read replica cluster to an independent read-write cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. + * @param promoteRequest The parameter for enabling geo-redundant backup while promoting read replica. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ - void promoteReadReplica(String resourceGroupName, String clusterName, Context context); + void promoteReadReplica(String resourceGroupName, String clusterName, PromoteRequest promoteRequest, + Context context); /** * Checks availability of a cluster name. Cluster names should be globally unique; at least 3 characters and at most * 40 characters long; they must only contain lowercase letters, numbers, and hyphens; and must not start or end * with a hyphen. - * + * * @param nameAvailabilityRequest The required parameters for checking if cluster name is available. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -209,14 +213,14 @@ public interface Clusters { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return represents cluster name availability along with {@link Response}. */ - Response checkNameAvailabilityWithResponse( - NameAvailabilityRequest nameAvailabilityRequest, Context context); + Response checkNameAvailabilityWithResponse(NameAvailabilityRequest nameAvailabilityRequest, + Context context); /** * Checks availability of a cluster name. Cluster names should be globally unique; at least 3 characters and at most * 40 characters long; they must only contain lowercase letters, numbers, and hyphens; and must not start or end * with a hyphen. - * + * * @param nameAvailabilityRequest The required parameters for checking if cluster name is available. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -228,33 +232,33 @@ Response checkNameAvailabilityWithResponse( /** * Gets information about a cluster such as compute and storage configuration and cluster lifecycle metadata such as * cluster creation date and time. - * + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.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 cluster such as compute and storage configuration and cluster lifecycle metadata such - * as cluster creation date and time along with {@link Response}. + * as cluster creation date and time along with {@link Response}. */ Cluster getById(String id); /** * Gets information about a cluster such as compute and storage configuration and cluster lifecycle metadata such as * cluster creation date and time. - * + * * @param id the resource ID. * @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 cluster such as compute and storage configuration and cluster lifecycle metadata such - * as cluster creation date and time along with {@link Response}. + * as cluster creation date and time along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); /** * Deletes a cluster together with servers in it. - * + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -264,7 +268,7 @@ Response checkNameAvailabilityWithResponse( /** * Deletes a cluster together with servers in it. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -275,7 +279,7 @@ Response checkNameAvailabilityWithResponse( /** * Begins definition for a new Cluster resource. - * + * * @param name resource name. * @return the first stage of the new Cluster definition. */ diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/Configuration.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/Configuration.java index 0a23e288c556..cb275e9861c8 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/Configuration.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/Configuration.java @@ -8,81 +8,83 @@ import com.azure.resourcemanager.cosmosdbforpostgresql.fluent.models.ConfigurationInner; import java.util.List; -/** An immutable client-side representation of Configuration. */ +/** + * An immutable client-side representation of Configuration. + */ public interface Configuration { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); /** * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * + * * @return the systemData value. */ SystemData systemData(); /** * Gets the description property: Description of the configuration. - * + * * @return the description value. */ String description(); /** * Gets the dataType property: Data type of the configuration. - * + * * @return the dataType value. */ ConfigurationDataType dataType(); /** * Gets the allowedValues property: Allowed values of the configuration. - * + * * @return the allowedValues value. */ String allowedValues(); /** * Gets the requiresRestart property: If configuration change requires restart. - * + * * @return the requiresRestart value. */ Boolean requiresRestart(); /** * Gets the serverRoleGroupConfigurations property: The list of server role group configuration values. - * + * * @return the serverRoleGroupConfigurations value. */ List serverRoleGroupConfigurations(); /** * Gets the provisioningState property: Provisioning state of the configuration. - * + * * @return the provisioningState value. */ ProvisioningState provisioningState(); /** * Gets the inner com.azure.resourcemanager.cosmosdbforpostgresql.fluent.models.ConfigurationInner object. - * + * * @return the inner object. */ ConfigurationInner innerModel(); diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/ConfigurationDataType.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/ConfigurationDataType.java index d7e0e3a6ddc8..1b7892fd664f 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/ConfigurationDataType.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/ConfigurationDataType.java @@ -8,23 +8,33 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Data type of the configuration. */ +/** + * Data type of the configuration. + */ public final class ConfigurationDataType extends ExpandableStringEnum { - /** Static value Boolean for ConfigurationDataType. */ + /** + * Static value Boolean for ConfigurationDataType. + */ public static final ConfigurationDataType BOOLEAN = fromString("Boolean"); - /** Static value Numeric for ConfigurationDataType. */ + /** + * Static value Numeric for ConfigurationDataType. + */ public static final ConfigurationDataType NUMERIC = fromString("Numeric"); - /** Static value Integer for ConfigurationDataType. */ + /** + * Static value Integer for ConfigurationDataType. + */ public static final ConfigurationDataType INTEGER = fromString("Integer"); - /** Static value Enumeration for ConfigurationDataType. */ + /** + * Static value Enumeration for ConfigurationDataType. + */ public static final ConfigurationDataType ENUMERATION = fromString("Enumeration"); /** * Creates a new instance of ConfigurationDataType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -33,7 +43,7 @@ public ConfigurationDataType() { /** * Creates or finds a ConfigurationDataType from its string representation. - * + * * @param name a name to look for. * @return the corresponding ConfigurationDataType. */ @@ -44,7 +54,7 @@ public static ConfigurationDataType fromString(String name) { /** * Gets known ConfigurationDataType values. - * + * * @return known ConfigurationDataType values. */ public static Collection values() { diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/Configurations.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/Configurations.java index 00f79ceb0daa..9be26396d9b8 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/Configurations.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/Configurations.java @@ -9,11 +9,13 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.cosmosdbforpostgresql.fluent.models.ServerConfigurationInner; -/** Resource collection API of Configurations. */ +/** + * Resource collection API of Configurations. + */ public interface Configurations { /** * List all the configurations of a server in cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param serverName The name of the server. @@ -26,7 +28,7 @@ public interface Configurations { /** * List all the configurations of a server in cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param serverName The name of the server. @@ -36,12 +38,12 @@ public interface Configurations { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of server configurations as paginated response with {@link PagedIterable}. */ - PagedIterable listByServer( - String resourceGroupName, String clusterName, String serverName, Context context); + PagedIterable listByServer(String resourceGroupName, String clusterName, String serverName, + Context context); /** * List all the configurations of a cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -53,7 +55,7 @@ PagedIterable listByServer( /** * List all the configurations of a cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param context The context to associate with this operation. @@ -66,7 +68,7 @@ PagedIterable listByServer( /** * Gets information of a configuration for coordinator and nodes. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param configurationName The name of the cluster configuration. @@ -76,12 +78,12 @@ PagedIterable listByServer( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return information of a configuration for coordinator and nodes along with {@link Response}. */ - Response getWithResponse( - String resourceGroupName, String clusterName, String configurationName, Context context); + Response getWithResponse(String resourceGroupName, String clusterName, String configurationName, + Context context); /** * Gets information of a configuration for coordinator and nodes. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param configurationName The name of the cluster configuration. @@ -94,7 +96,7 @@ Response getWithResponse( /** * Gets information of a configuration for coordinator. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param configurationName The name of the cluster configuration. @@ -104,12 +106,12 @@ Response getWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return information of a configuration for coordinator along with {@link Response}. */ - Response getCoordinatorWithResponse( - String resourceGroupName, String clusterName, String configurationName, Context context); + Response getCoordinatorWithResponse(String resourceGroupName, String clusterName, + String configurationName, Context context); /** * Gets information of a configuration for coordinator. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param configurationName The name of the cluster configuration. @@ -122,7 +124,7 @@ Response getCoordinatorWithResponse( /** * Updates configuration of coordinator in a cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param configurationName The name of the cluster configuration. @@ -132,12 +134,12 @@ Response getCoordinatorWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return represents a configuration. */ - ServerConfiguration updateOnCoordinator( - String resourceGroupName, String clusterName, String configurationName, ServerConfigurationInner parameters); + ServerConfiguration updateOnCoordinator(String resourceGroupName, String clusterName, String configurationName, + ServerConfigurationInner parameters); /** * Updates configuration of coordinator in a cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param configurationName The name of the cluster configuration. @@ -148,16 +150,12 @@ ServerConfiguration updateOnCoordinator( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return represents a configuration. */ - ServerConfiguration updateOnCoordinator( - String resourceGroupName, - String clusterName, - String configurationName, - ServerConfigurationInner parameters, - Context context); + ServerConfiguration updateOnCoordinator(String resourceGroupName, String clusterName, String configurationName, + ServerConfigurationInner parameters, Context context); /** * Gets information of a configuration for worker nodes. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param configurationName The name of the cluster configuration. @@ -167,12 +165,12 @@ ServerConfiguration updateOnCoordinator( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return information of a configuration for worker nodes along with {@link Response}. */ - Response getNodeWithResponse( - String resourceGroupName, String clusterName, String configurationName, Context context); + Response getNodeWithResponse(String resourceGroupName, String clusterName, + String configurationName, Context context); /** * Gets information of a configuration for worker nodes. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param configurationName The name of the cluster configuration. @@ -185,7 +183,7 @@ Response getNodeWithResponse( /** * Updates configuration of worker nodes in a cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param configurationName The name of the cluster configuration. @@ -195,12 +193,12 @@ Response getNodeWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return represents a configuration. */ - ServerConfiguration updateOnNode( - String resourceGroupName, String clusterName, String configurationName, ServerConfigurationInner parameters); + ServerConfiguration updateOnNode(String resourceGroupName, String clusterName, String configurationName, + ServerConfigurationInner parameters); /** * Updates configuration of worker nodes in a cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param configurationName The name of the cluster configuration. @@ -211,10 +209,6 @@ ServerConfiguration updateOnNode( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return represents a configuration. */ - ServerConfiguration updateOnNode( - String resourceGroupName, - String clusterName, - String configurationName, - ServerConfigurationInner parameters, - Context context); + ServerConfiguration updateOnNode(String resourceGroupName, String clusterName, String configurationName, + ServerConfigurationInner parameters, Context context); } diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/FirewallRule.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/FirewallRule.java index 067e56856672..cd06165f30b4 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/FirewallRule.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/FirewallRule.java @@ -8,91 +8,97 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.cosmosdbforpostgresql.fluent.models.FirewallRuleInner; -/** An immutable client-side representation of FirewallRule. */ +/** + * An immutable client-side representation of FirewallRule. + */ public interface FirewallRule { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); /** * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * + * * @return the systemData value. */ SystemData systemData(); /** * Gets the startIpAddress property: The start IP address of the cluster firewall rule. Must be IPv4 format. - * + * * @return the startIpAddress value. */ String startIpAddress(); /** * Gets the endIpAddress property: The end IP address of the cluster firewall rule. Must be IPv4 format. - * + * * @return the endIpAddress value. */ String endIpAddress(); /** * Gets the provisioningState property: Provisioning state of the firewall rule. - * + * * @return the provisioningState value. */ ProvisioningState provisioningState(); /** * Gets the name of the resource group. - * + * * @return the name of the resource group. */ String resourceGroupName(); /** * Gets the inner com.azure.resourcemanager.cosmosdbforpostgresql.fluent.models.FirewallRuleInner object. - * + * * @return the inner object. */ FirewallRuleInner innerModel(); - /** The entirety of the FirewallRule definition. */ - interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithParentResource, - DefinitionStages.WithStartIpAddress, - DefinitionStages.WithEndIpAddress, - DefinitionStages.WithCreate { + /** + * The entirety of the FirewallRule definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, + DefinitionStages.WithStartIpAddress, DefinitionStages.WithEndIpAddress, DefinitionStages.WithCreate { } - /** The FirewallRule definition stages. */ + /** + * The FirewallRule definition stages. + */ interface DefinitionStages { - /** The first stage of the FirewallRule definition. */ + /** + * The first stage of the FirewallRule definition. + */ interface Blank extends WithParentResource { } - /** The stage of the FirewallRule definition allowing to specify parent resource. */ + /** + * The stage of the FirewallRule definition allowing to specify parent resource. + */ interface WithParentResource { /** * Specifies resourceGroupName, clusterName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @return the next definition stage. @@ -100,24 +106,28 @@ interface WithParentResource { WithStartIpAddress withExistingServerGroupsv2(String resourceGroupName, String clusterName); } - /** The stage of the FirewallRule definition allowing to specify startIpAddress. */ + /** + * The stage of the FirewallRule definition allowing to specify startIpAddress. + */ interface WithStartIpAddress { /** * Specifies the startIpAddress property: The start IP address of the cluster firewall rule. Must be IPv4 * format.. - * + * * @param startIpAddress The start IP address of the cluster firewall rule. Must be IPv4 format. * @return the next definition stage. */ WithEndIpAddress withStartIpAddress(String startIpAddress); } - /** The stage of the FirewallRule definition allowing to specify endIpAddress. */ + /** + * The stage of the FirewallRule definition allowing to specify endIpAddress. + */ interface WithEndIpAddress { /** * Specifies the endIpAddress property: The end IP address of the cluster firewall rule. Must be IPv4 * format.. - * + * * @param endIpAddress The end IP address of the cluster firewall rule. Must be IPv4 format. * @return the next definition stage. */ @@ -131,14 +141,14 @@ interface WithEndIpAddress { interface WithCreate { /** * Executes the create request. - * + * * @return the created resource. */ FirewallRule create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ @@ -148,49 +158,57 @@ interface WithCreate { /** * Begins update for the FirewallRule resource. - * + * * @return the stage of resource update. */ FirewallRule.Update update(); - /** The template for FirewallRule update. */ + /** + * The template for FirewallRule update. + */ interface Update extends UpdateStages.WithStartIpAddress, UpdateStages.WithEndIpAddress { /** * Executes the update request. - * + * * @return the updated resource. */ FirewallRule apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ FirewallRule apply(Context context); } - /** The FirewallRule update stages. */ + /** + * The FirewallRule update stages. + */ interface UpdateStages { - /** The stage of the FirewallRule update allowing to specify startIpAddress. */ + /** + * The stage of the FirewallRule update allowing to specify startIpAddress. + */ interface WithStartIpAddress { /** * Specifies the startIpAddress property: The start IP address of the cluster firewall rule. Must be IPv4 * format.. - * + * * @param startIpAddress The start IP address of the cluster firewall rule. Must be IPv4 format. * @return the next definition stage. */ Update withStartIpAddress(String startIpAddress); } - /** The stage of the FirewallRule update allowing to specify endIpAddress. */ + /** + * The stage of the FirewallRule update allowing to specify endIpAddress. + */ interface WithEndIpAddress { /** * Specifies the endIpAddress property: The end IP address of the cluster firewall rule. Must be IPv4 * format.. - * + * * @param endIpAddress The end IP address of the cluster firewall rule. Must be IPv4 format. * @return the next definition stage. */ @@ -200,14 +218,14 @@ interface WithEndIpAddress { /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ FirewallRule refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/FirewallRuleListResult.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/FirewallRuleListResult.java index 99b8c283fc4e..90db75b3e62d 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/FirewallRuleListResult.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/FirewallRuleListResult.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** A list of firewall rules. */ +/** + * A list of firewall rules. + */ @Fluent public final class FirewallRuleListResult { /* @@ -18,13 +20,15 @@ public final class FirewallRuleListResult { @JsonProperty(value = "value") private List value; - /** Creates an instance of FirewallRuleListResult class. */ + /** + * Creates an instance of FirewallRuleListResult class. + */ public FirewallRuleListResult() { } /** * Get the value property: The list of firewall rules in a cluster. - * + * * @return the value value. */ public List value() { @@ -33,7 +37,7 @@ public List value() { /** * Set the value property: The list of firewall rules in a cluster. - * + * * @param value the value value to set. * @return the FirewallRuleListResult object itself. */ @@ -44,7 +48,7 @@ public FirewallRuleListResult withValue(List value) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/FirewallRules.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/FirewallRules.java index 4b689655587a..1f44d82ea9c7 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/FirewallRules.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/FirewallRules.java @@ -8,11 +8,13 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of FirewallRules. */ +/** + * Resource collection API of FirewallRules. + */ public interface FirewallRules { /** * Deletes a cluster firewall rule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param firewallRuleName The name of the cluster firewall rule. @@ -24,7 +26,7 @@ public interface FirewallRules { /** * Deletes a cluster firewall rule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param firewallRuleName The name of the cluster firewall rule. @@ -37,7 +39,7 @@ public interface FirewallRules { /** * Gets information about a cluster firewall rule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param firewallRuleName The name of the cluster firewall rule. @@ -47,12 +49,12 @@ public interface FirewallRules { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return information about a cluster firewall rule along with {@link Response}. */ - Response getWithResponse( - String resourceGroupName, String clusterName, String firewallRuleName, Context context); + Response getWithResponse(String resourceGroupName, String clusterName, String firewallRuleName, + Context context); /** * Gets information about a cluster firewall rule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param firewallRuleName The name of the cluster firewall rule. @@ -65,7 +67,7 @@ Response getWithResponse( /** * Lists all the firewall rules on cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -77,7 +79,7 @@ Response getWithResponse( /** * Lists all the firewall rules on cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param context The context to associate with this operation. @@ -90,7 +92,7 @@ Response getWithResponse( /** * Gets information about a cluster firewall rule. - * + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -101,7 +103,7 @@ Response getWithResponse( /** * Gets information about a cluster firewall rule. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -113,7 +115,7 @@ Response getWithResponse( /** * Deletes a cluster firewall rule. - * + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -123,7 +125,7 @@ Response getWithResponse( /** * Deletes a cluster firewall rule. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -134,7 +136,7 @@ Response getWithResponse( /** * Begins definition for a new FirewallRule resource. - * + * * @param name resource name. * @return the first stage of the new FirewallRule definition. */ diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/MaintenanceWindow.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/MaintenanceWindow.java index 6d900314f95d..911b6ca54def 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/MaintenanceWindow.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/MaintenanceWindow.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Schedule settings for regular cluster updates. */ +/** + * Schedule settings for regular cluster updates. + */ @Fluent public final class MaintenanceWindow { /* @@ -34,13 +36,15 @@ public final class MaintenanceWindow { @JsonProperty(value = "dayOfWeek") private Integer dayOfWeek; - /** Creates an instance of MaintenanceWindow class. */ + /** + * Creates an instance of MaintenanceWindow class. + */ public MaintenanceWindow() { } /** * Get the customWindow property: Indicates whether custom maintenance window is enabled or not. - * + * * @return the customWindow value. */ public String customWindow() { @@ -49,7 +53,7 @@ public String customWindow() { /** * Set the customWindow property: Indicates whether custom maintenance window is enabled or not. - * + * * @param customWindow the customWindow value to set. * @return the MaintenanceWindow object itself. */ @@ -60,7 +64,7 @@ public MaintenanceWindow withCustomWindow(String customWindow) { /** * Get the startHour property: Start hour within preferred day of the week for maintenance window. - * + * * @return the startHour value. */ public Integer startHour() { @@ -69,7 +73,7 @@ public Integer startHour() { /** * Set the startHour property: Start hour within preferred day of the week for maintenance window. - * + * * @param startHour the startHour value to set. * @return the MaintenanceWindow object itself. */ @@ -80,7 +84,7 @@ public MaintenanceWindow withStartHour(Integer startHour) { /** * Get the startMinute property: Start minute within the start hour for maintenance window. - * + * * @return the startMinute value. */ public Integer startMinute() { @@ -89,7 +93,7 @@ public Integer startMinute() { /** * Set the startMinute property: Start minute within the start hour for maintenance window. - * + * * @param startMinute the startMinute value to set. * @return the MaintenanceWindow object itself. */ @@ -100,7 +104,7 @@ public MaintenanceWindow withStartMinute(Integer startMinute) { /** * Get the dayOfWeek property: Preferred day of the week for maintenance window. - * + * * @return the dayOfWeek value. */ public Integer dayOfWeek() { @@ -109,7 +113,7 @@ public Integer dayOfWeek() { /** * Set the dayOfWeek property: Preferred day of the week for maintenance window. - * + * * @param dayOfWeek the dayOfWeek value to set. * @return the MaintenanceWindow object itself. */ @@ -120,7 +124,7 @@ public MaintenanceWindow withDayOfWeek(Integer dayOfWeek) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/NameAvailability.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/NameAvailability.java index 85e8ff44120f..d862334a4c98 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/NameAvailability.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/NameAvailability.java @@ -6,39 +6,41 @@ import com.azure.resourcemanager.cosmosdbforpostgresql.fluent.models.NameAvailabilityInner; -/** An immutable client-side representation of NameAvailability. */ +/** + * An immutable client-side representation of NameAvailability. + */ public interface NameAvailability { /** * Gets the message property: Error message. - * + * * @return the message value. */ String message(); /** * Gets the nameAvailable property: Indicates whether the cluster name is available. - * + * * @return the nameAvailable value. */ Boolean nameAvailable(); /** * Gets the name property: Name of the cluster. - * + * * @return the name value. */ String name(); /** * Gets the type property: Type of the cluster. - * + * * @return the type value. */ String type(); /** * Gets the inner com.azure.resourcemanager.cosmosdbforpostgresql.fluent.models.NameAvailabilityInner object. - * + * * @return the inner object. */ NameAvailabilityInner innerModel(); diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/NameAvailabilityRequest.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/NameAvailabilityRequest.java index 22707627b26d..33208b8b64aa 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/NameAvailabilityRequest.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/NameAvailabilityRequest.java @@ -8,7 +8,9 @@ import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonProperty; -/** Request from client to check cluster name availability. */ +/** + * Request from client to check cluster name availability. + */ @Fluent public final class NameAvailabilityRequest { /* @@ -23,14 +25,15 @@ public final class NameAvailabilityRequest { @JsonProperty(value = "type", required = true) private String type = "Microsoft.DBforPostgreSQL/serverGroupsv2"; - /** Creates an instance of NameAvailabilityRequest class. */ + /** + * Creates an instance of NameAvailabilityRequest class. + */ public NameAvailabilityRequest() { - type = "Microsoft.DBforPostgreSQL/serverGroupsv2"; } /** * Get the name property: Cluster name to verify. - * + * * @return the name value. */ public String name() { @@ -39,7 +42,7 @@ public String name() { /** * Set the name property: Cluster name to verify. - * + * * @param name the name value to set. * @return the NameAvailabilityRequest object itself. */ @@ -50,7 +53,7 @@ public NameAvailabilityRequest withName(String name) { /** * Get the type property: Resource type used for verification. - * + * * @return the type value. */ public String type() { @@ -59,7 +62,7 @@ public String type() { /** * Set the type property: Resource type used for verification. - * + * * @param type the type value to set. * @return the NameAvailabilityRequest object itself. */ @@ -70,14 +73,13 @@ public NameAvailabilityRequest withType(String type) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (name() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property name in model NameAvailabilityRequest")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property name in model NameAvailabilityRequest")); } } diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/Operation.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/Operation.java index 67d4ea4ac64f..d351c2ba9c8e 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/Operation.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/Operation.java @@ -7,46 +7,48 @@ import com.azure.resourcemanager.cosmosdbforpostgresql.fluent.models.OperationInner; import java.util.Map; -/** An immutable client-side representation of Operation. */ +/** + * An immutable client-side representation of Operation. + */ public interface Operation { /** * Gets the name property: The name of the operation being performed on this particular object. - * + * * @return the name value. */ String name(); /** * Gets the display property: The localized display information for this particular operation or action. - * + * * @return the display value. */ OperationDisplay display(); /** * Gets the isDataAction property: Indicates whether the operation is a data action. - * + * * @return the isDataAction value. */ Boolean isDataAction(); /** * Gets the origin property: The intended executor of the operation. - * + * * @return the origin value. */ OperationOrigin origin(); /** * Gets the properties property: Additional descriptions for the operation. - * + * * @return the properties value. */ Map properties(); /** * Gets the inner com.azure.resourcemanager.cosmosdbforpostgresql.fluent.models.OperationInner object. - * + * * @return the inner object. */ OperationInner innerModel(); diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/OperationDisplay.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/OperationDisplay.java index 306850501bb7..f328ca5d1b73 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/OperationDisplay.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/OperationDisplay.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Immutable; import com.fasterxml.jackson.annotation.JsonProperty; -/** Display metadata associated with the operation. */ +/** + * Display metadata associated with the operation. + */ @Immutable public final class OperationDisplay { /* @@ -34,13 +36,15 @@ public final class OperationDisplay { @JsonProperty(value = "description", access = JsonProperty.Access.WRITE_ONLY) private String description; - /** Creates an instance of OperationDisplay class. */ + /** + * Creates an instance of OperationDisplay class. + */ public OperationDisplay() { } /** * Get the provider property: Operation resource provider name. - * + * * @return the provider value. */ public String provider() { @@ -49,7 +53,7 @@ public String provider() { /** * Get the resource property: Resource on which the operation is performed. - * + * * @return the resource value. */ public String resource() { @@ -58,7 +62,7 @@ public String resource() { /** * Get the operation property: Localized friendly name for the operation. - * + * * @return the operation value. */ public String operation() { @@ -67,7 +71,7 @@ public String operation() { /** * Get the description property: Operation description. - * + * * @return the description value. */ public String description() { @@ -76,7 +80,7 @@ public String description() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/OperationListResult.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/OperationListResult.java index 1cbb0a54cdbe..50408822fbf8 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/OperationListResult.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/OperationListResult.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** A list of resource provider operations. */ +/** + * A list of resource provider operations. + */ @Fluent public final class OperationListResult { /* @@ -25,13 +27,15 @@ public final class OperationListResult { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of OperationListResult class. */ + /** + * Creates an instance of OperationListResult class. + */ public OperationListResult() { } /** * Get the value property: Collection of available operation details. - * + * * @return the value value. */ public List value() { @@ -40,7 +44,7 @@ public List value() { /** * Set the value property: Collection of available operation details. - * + * * @param value the value value to set. * @return the OperationListResult object itself. */ @@ -50,9 +54,9 @@ public OperationListResult withValue(List value) { } /** - * Get the nextLink property: URL client should use to fetch the next page (per server side paging). It's null for - * now, added for future use. - * + * Get the nextLink property: URL client should use to fetch the next page (per server side paging). + * It's null for now, added for future use. + * * @return the nextLink value. */ public String nextLink() { @@ -61,7 +65,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/OperationOrigin.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/OperationOrigin.java index 9e6f0dd815c4..b47412a93975 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/OperationOrigin.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/OperationOrigin.java @@ -8,20 +8,28 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The intended executor of the operation. */ +/** + * The intended executor of the operation. + */ public final class OperationOrigin extends ExpandableStringEnum { - /** Static value NotSpecified for OperationOrigin. */ + /** + * Static value NotSpecified for OperationOrigin. + */ public static final OperationOrigin NOT_SPECIFIED = fromString("NotSpecified"); - /** Static value user for OperationOrigin. */ + /** + * Static value user for OperationOrigin. + */ public static final OperationOrigin USER = fromString("user"); - /** Static value system for OperationOrigin. */ + /** + * Static value system for OperationOrigin. + */ public static final OperationOrigin SYSTEM = fromString("system"); /** * Creates a new instance of OperationOrigin value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -30,7 +38,7 @@ public OperationOrigin() { /** * Creates or finds a OperationOrigin from its string representation. - * + * * @param name a name to look for. * @return the corresponding OperationOrigin. */ @@ -41,7 +49,7 @@ public static OperationOrigin fromString(String name) { /** * Gets known OperationOrigin values. - * + * * @return known OperationOrigin values. */ public static Collection values() { diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/Operations.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/Operations.java index 4aeb8142743e..b16d5b1a8c82 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/Operations.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/Operations.java @@ -7,11 +7,13 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.core.util.Context; -/** Resource collection API of Operations. */ +/** + * Resource collection API of Operations. + */ public interface Operations { /** * Lists all of the available REST API operations. - * + * * @throws com.azure.core.management.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 list of resource provider operations as paginated response with {@link PagedIterable}. @@ -20,7 +22,7 @@ public interface Operations { /** * Lists all of the available REST API operations. - * + * * @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/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/PasswordAuth.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/PasswordAuth.java new file mode 100644 index 000000000000..0d5541043c4a --- /dev/null +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/PasswordAuth.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.cosmosdbforpostgresql.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * Defines values for PasswordAuth. + */ +public final class PasswordAuth extends ExpandableStringEnum { + /** + * Static value enabled for PasswordAuth. + */ + public static final PasswordAuth ENABLED = fromString("enabled"); + + /** + * Static value disabled for PasswordAuth. + */ + public static final PasswordAuth DISABLED = fromString("disabled"); + + /** + * Creates a new instance of PasswordAuth value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public PasswordAuth() { + } + + /** + * Creates or finds a PasswordAuth from its string representation. + * + * @param name a name to look for. + * @return the corresponding PasswordAuth. + */ + @JsonCreator + public static PasswordAuth fromString(String name) { + return fromString(name, PasswordAuth.class); + } + + /** + * Gets known PasswordAuth values. + * + * @return known PasswordAuth values. + */ + public static Collection values() { + return values(PasswordAuth.class); + } +} diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/PrincipalType.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/PrincipalType.java new file mode 100644 index 000000000000..f6afaaf1d081 --- /dev/null +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/PrincipalType.java @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.cosmosdbforpostgresql.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * Defines values for PrincipalType. + */ +public final class PrincipalType extends ExpandableStringEnum { + /** + * Static value user for PrincipalType. + */ + public static final PrincipalType USER = fromString("user"); + + /** + * Static value servicePrincipal for PrincipalType. + */ + public static final PrincipalType SERVICE_PRINCIPAL = fromString("servicePrincipal"); + + /** + * Static value group for PrincipalType. + */ + public static final PrincipalType GROUP = fromString("group"); + + /** + * Creates a new instance of PrincipalType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public PrincipalType() { + } + + /** + * Creates or finds a PrincipalType from its string representation. + * + * @param name a name to look for. + * @return the corresponding PrincipalType. + */ + @JsonCreator + public static PrincipalType fromString(String name) { + return fromString(name, PrincipalType.class); + } + + /** + * Gets known PrincipalType values. + * + * @return known PrincipalType values. + */ + public static Collection values() { + return values(PrincipalType.class); + } +} diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/PrivateEndpoint.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/PrivateEndpoint.java index b30b74adc9fd..d37c299cdace 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/PrivateEndpoint.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/PrivateEndpoint.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Immutable; import com.fasterxml.jackson.annotation.JsonProperty; -/** The private endpoint resource. */ +/** + * The private endpoint resource. + */ @Immutable public final class PrivateEndpoint { /* @@ -16,13 +18,15 @@ public final class PrivateEndpoint { @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) private String id; - /** Creates an instance of PrivateEndpoint class. */ + /** + * Creates an instance of PrivateEndpoint class. + */ public PrivateEndpoint() { } /** * Get the id property: The ARM identifier for private endpoint. - * + * * @return the id value. */ public String id() { @@ -31,7 +35,7 @@ public String id() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/PrivateEndpointConnection.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/PrivateEndpointConnection.java index 5d0353c5bedf..c9fe933c6446 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/PrivateEndpointConnection.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/PrivateEndpointConnection.java @@ -9,46 +9,48 @@ import com.azure.resourcemanager.cosmosdbforpostgresql.fluent.models.PrivateEndpointConnectionInner; import java.util.List; -/** An immutable client-side representation of PrivateEndpointConnection. */ +/** + * An immutable client-side representation of PrivateEndpointConnection. + */ public interface PrivateEndpointConnection { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); /** * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * + * * @return the systemData value. */ SystemData systemData(); /** * Gets the groupIds property: The group ids for the private endpoint resource. - * + * * @return the groupIds value. */ List groupIds(); /** * Gets the privateEndpoint property: The private endpoint resource. - * + * * @return the privateEndpoint value. */ PrivateEndpoint privateEndpoint(); @@ -56,21 +58,21 @@ public interface PrivateEndpointConnection { /** * Gets the privateLinkServiceConnectionState property: A collection of information about the state of the * connection between service consumer and provider. - * + * * @return the privateLinkServiceConnectionState value. */ PrivateLinkServiceConnectionState privateLinkServiceConnectionState(); /** * Gets the provisioningState property: The provisioning state of the private endpoint connection resource. - * + * * @return the provisioningState value. */ PrivateEndpointConnectionProvisioningState provisioningState(); /** * Gets the name of the resource group. - * + * * @return the name of the resource group. */ String resourceGroupName(); @@ -78,27 +80,35 @@ public interface PrivateEndpointConnection { /** * Gets the inner com.azure.resourcemanager.cosmosdbforpostgresql.fluent.models.PrivateEndpointConnectionInner * object. - * + * * @return the inner object. */ PrivateEndpointConnectionInner innerModel(); - /** The entirety of the PrivateEndpointConnection definition. */ + /** + * The entirety of the PrivateEndpointConnection definition. + */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { } - /** The PrivateEndpointConnection definition stages. */ + /** + * The PrivateEndpointConnection definition stages. + */ interface DefinitionStages { - /** The first stage of the PrivateEndpointConnection definition. */ + /** + * The first stage of the PrivateEndpointConnection definition. + */ interface Blank extends WithParentResource { } - /** The stage of the PrivateEndpointConnection definition allowing to specify parent resource. */ + /** + * The stage of the PrivateEndpointConnection definition allowing to specify parent resource. + */ interface WithParentResource { /** * Specifies resourceGroupName, clusterName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @return the next definition stage. @@ -114,25 +124,27 @@ interface WithCreate extends DefinitionStages.WithPrivateEndpoint, DefinitionStages.WithPrivateLinkServiceConnectionState { /** * Executes the create request. - * + * * @return the created resource. */ PrivateEndpointConnection create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ PrivateEndpointConnection create(Context context); } - /** The stage of the PrivateEndpointConnection definition allowing to specify privateEndpoint. */ + /** + * The stage of the PrivateEndpointConnection definition allowing to specify privateEndpoint. + */ interface WithPrivateEndpoint { /** * Specifies the privateEndpoint property: The private endpoint resource.. - * + * * @param privateEndpoint The private endpoint resource. * @return the next definition stage. */ @@ -146,9 +158,9 @@ interface WithPrivateLinkServiceConnectionState { /** * Specifies the privateLinkServiceConnectionState property: A collection of information about the state of * the connection between service consumer and provider.. - * + * * @param privateLinkServiceConnectionState A collection of information about the state of the connection - * between service consumer and provider. + * between service consumer and provider. * @return the next definition stage. */ WithCreate withPrivateLinkServiceConnectionState( @@ -158,50 +170,58 @@ WithCreate withPrivateLinkServiceConnectionState( /** * Begins update for the PrivateEndpointConnection resource. - * + * * @return the stage of resource update. */ PrivateEndpointConnection.Update update(); - /** The template for PrivateEndpointConnection update. */ + /** + * The template for PrivateEndpointConnection update. + */ interface Update extends UpdateStages.WithPrivateEndpoint, UpdateStages.WithPrivateLinkServiceConnectionState { /** * Executes the update request. - * + * * @return the updated resource. */ PrivateEndpointConnection apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ PrivateEndpointConnection apply(Context context); } - /** The PrivateEndpointConnection update stages. */ + /** + * The PrivateEndpointConnection update stages. + */ interface UpdateStages { - /** The stage of the PrivateEndpointConnection update allowing to specify privateEndpoint. */ + /** + * The stage of the PrivateEndpointConnection update allowing to specify privateEndpoint. + */ interface WithPrivateEndpoint { /** * Specifies the privateEndpoint property: The private endpoint resource.. - * + * * @param privateEndpoint The private endpoint resource. * @return the next definition stage. */ Update withPrivateEndpoint(PrivateEndpoint privateEndpoint); } - /** The stage of the PrivateEndpointConnection update allowing to specify privateLinkServiceConnectionState. */ + /** + * The stage of the PrivateEndpointConnection update allowing to specify privateLinkServiceConnectionState. + */ interface WithPrivateLinkServiceConnectionState { /** * Specifies the privateLinkServiceConnectionState property: A collection of information about the state of * the connection between service consumer and provider.. - * + * * @param privateLinkServiceConnectionState A collection of information about the state of the connection - * between service consumer and provider. + * between service consumer and provider. * @return the next definition stage. */ Update withPrivateLinkServiceConnectionState( @@ -211,14 +231,14 @@ Update withPrivateLinkServiceConnectionState( /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ PrivateEndpointConnection refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/PrivateEndpointConnectionListResult.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/PrivateEndpointConnectionListResult.java index 2019a80aab2a..66a99c69e3c9 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/PrivateEndpointConnectionListResult.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/PrivateEndpointConnectionListResult.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** List of private endpoint connections associated with the specified resource. */ +/** + * List of private endpoint connections associated with the specified resource. + */ @Fluent public final class PrivateEndpointConnectionListResult { /* @@ -18,13 +20,15 @@ public final class PrivateEndpointConnectionListResult { @JsonProperty(value = "value") private List value; - /** Creates an instance of PrivateEndpointConnectionListResult class. */ + /** + * Creates an instance of PrivateEndpointConnectionListResult class. + */ public PrivateEndpointConnectionListResult() { } /** * Get the value property: Array of private endpoint connections. - * + * * @return the value value. */ public List value() { @@ -33,7 +37,7 @@ public List value() { /** * Set the value property: Array of private endpoint connections. - * + * * @param value the value value to set. * @return the PrivateEndpointConnectionListResult object itself. */ @@ -44,7 +48,7 @@ public PrivateEndpointConnectionListResult withValue(List { - /** Static value Succeeded for PrivateEndpointConnectionProvisioningState. */ + /** + * Static value Succeeded for PrivateEndpointConnectionProvisioningState. + */ public static final PrivateEndpointConnectionProvisioningState SUCCEEDED = fromString("Succeeded"); - /** Static value Creating for PrivateEndpointConnectionProvisioningState. */ + /** + * Static value Creating for PrivateEndpointConnectionProvisioningState. + */ public static final PrivateEndpointConnectionProvisioningState CREATING = fromString("Creating"); - /** Static value Deleting for PrivateEndpointConnectionProvisioningState. */ + /** + * Static value Deleting for PrivateEndpointConnectionProvisioningState. + */ public static final PrivateEndpointConnectionProvisioningState DELETING = fromString("Deleting"); - /** Static value Failed for PrivateEndpointConnectionProvisioningState. */ + /** + * Static value Failed for PrivateEndpointConnectionProvisioningState. + */ public static final PrivateEndpointConnectionProvisioningState FAILED = fromString("Failed"); /** * Creates a new instance of PrivateEndpointConnectionProvisioningState value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -34,7 +44,7 @@ public PrivateEndpointConnectionProvisioningState() { /** * Creates or finds a PrivateEndpointConnectionProvisioningState from its string representation. - * + * * @param name a name to look for. * @return the corresponding PrivateEndpointConnectionProvisioningState. */ @@ -45,7 +55,7 @@ public static PrivateEndpointConnectionProvisioningState fromString(String name) /** * Gets known PrivateEndpointConnectionProvisioningState values. - * + * * @return known PrivateEndpointConnectionProvisioningState values. */ public static Collection values() { diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/PrivateEndpointConnections.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/PrivateEndpointConnections.java index 2a5fd762a993..ab1349e89d07 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/PrivateEndpointConnections.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/PrivateEndpointConnections.java @@ -8,11 +8,13 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of PrivateEndpointConnections. */ +/** + * Resource collection API of PrivateEndpointConnections. + */ public interface PrivateEndpointConnections { /** * Gets list of private endpoint connections on a cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -24,7 +26,7 @@ public interface PrivateEndpointConnections { /** * Gets list of private endpoint connections on a cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param context The context to associate with this operation. @@ -33,12 +35,12 @@ public interface PrivateEndpointConnections { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of private endpoint connections on a cluster as paginated response with {@link PagedIterable}. */ - PagedIterable listByCluster( - String resourceGroupName, String clusterName, Context context); + PagedIterable listByCluster(String resourceGroupName, String clusterName, + Context context); /** * Gets private endpoint connection. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the cluster. @@ -48,12 +50,12 @@ PagedIterable listByCluster( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return private endpoint connection along with {@link Response}. */ - Response getWithResponse( - String resourceGroupName, String clusterName, String privateEndpointConnectionName, Context context); + Response getWithResponse(String resourceGroupName, String clusterName, + String privateEndpointConnectionName, Context context); /** * Gets private endpoint connection. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the cluster. @@ -66,7 +68,7 @@ Response getWithResponse( /** * Deletes a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the cluster. @@ -78,7 +80,7 @@ Response getWithResponse( /** * Deletes a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the cluster. @@ -91,7 +93,7 @@ Response getWithResponse( /** * Gets private endpoint connection. - * + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -102,7 +104,7 @@ Response getWithResponse( /** * Gets private endpoint connection. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -114,7 +116,7 @@ Response getWithResponse( /** * Deletes a private endpoint connection with a given name. - * + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -124,7 +126,7 @@ Response getWithResponse( /** * Deletes a private endpoint connection with a given name. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -135,7 +137,7 @@ Response getWithResponse( /** * Begins definition for a new PrivateEndpointConnection resource. - * + * * @param name resource name. * @return the first stage of the new PrivateEndpointConnection definition. */ diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/PrivateEndpointProperty.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/PrivateEndpointProperty.java index 2e32607cdb04..60f7cba5c402 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/PrivateEndpointProperty.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/PrivateEndpointProperty.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Property to represent resource id of the private endpoint. */ +/** + * Property to represent resource id of the private endpoint. + */ @Fluent public final class PrivateEndpointProperty { /* @@ -16,13 +18,15 @@ public final class PrivateEndpointProperty { @JsonProperty(value = "id") private String id; - /** Creates an instance of PrivateEndpointProperty class. */ + /** + * Creates an instance of PrivateEndpointProperty class. + */ public PrivateEndpointProperty() { } /** * Get the id property: Resource id of the private endpoint. - * + * * @return the id value. */ public String id() { @@ -31,7 +35,7 @@ public String id() { /** * Set the id property: Resource id of the private endpoint. - * + * * @param id the id value to set. * @return the PrivateEndpointProperty object itself. */ @@ -42,7 +46,7 @@ public PrivateEndpointProperty withId(String id) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/PrivateEndpointServiceConnectionStatus.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/PrivateEndpointServiceConnectionStatus.java index 9ffbe7724570..192680e51942 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/PrivateEndpointServiceConnectionStatus.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/PrivateEndpointServiceConnectionStatus.java @@ -8,21 +8,29 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The private endpoint connection status. */ +/** + * The private endpoint connection status. + */ public final class PrivateEndpointServiceConnectionStatus extends ExpandableStringEnum { - /** Static value Pending for PrivateEndpointServiceConnectionStatus. */ + /** + * Static value Pending for PrivateEndpointServiceConnectionStatus. + */ public static final PrivateEndpointServiceConnectionStatus PENDING = fromString("Pending"); - /** Static value Approved for PrivateEndpointServiceConnectionStatus. */ + /** + * Static value Approved for PrivateEndpointServiceConnectionStatus. + */ public static final PrivateEndpointServiceConnectionStatus APPROVED = fromString("Approved"); - /** Static value Rejected for PrivateEndpointServiceConnectionStatus. */ + /** + * Static value Rejected for PrivateEndpointServiceConnectionStatus. + */ public static final PrivateEndpointServiceConnectionStatus REJECTED = fromString("Rejected"); /** * Creates a new instance of PrivateEndpointServiceConnectionStatus value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -31,7 +39,7 @@ public PrivateEndpointServiceConnectionStatus() { /** * Creates or finds a PrivateEndpointServiceConnectionStatus from its string representation. - * + * * @param name a name to look for. * @return the corresponding PrivateEndpointServiceConnectionStatus. */ @@ -42,7 +50,7 @@ public static PrivateEndpointServiceConnectionStatus fromString(String name) { /** * Gets known PrivateEndpointServiceConnectionStatus values. - * + * * @return known PrivateEndpointServiceConnectionStatus values. */ public static Collection values() { diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/PrivateLinkResource.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/PrivateLinkResource.java index 3f3bf70ae08a..ee83152d8aec 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/PrivateLinkResource.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/PrivateLinkResource.java @@ -8,60 +8,62 @@ import com.azure.resourcemanager.cosmosdbforpostgresql.fluent.models.PrivateLinkResourceInner; import java.util.List; -/** An immutable client-side representation of PrivateLinkResource. */ +/** + * An immutable client-side representation of PrivateLinkResource. + */ public interface PrivateLinkResource { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); /** * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * + * * @return the systemData value. */ SystemData systemData(); /** * Gets the groupId property: The private link resource group id. - * + * * @return the groupId value. */ String groupId(); /** * Gets the requiredMembers property: The private link resource required member names. - * + * * @return the requiredMembers value. */ List requiredMembers(); /** * Gets the requiredZoneNames property: The private link resource private link DNS zone name. - * + * * @return the requiredZoneNames value. */ List requiredZoneNames(); /** * Gets the inner com.azure.resourcemanager.cosmosdbforpostgresql.fluent.models.PrivateLinkResourceInner object. - * + * * @return the inner object. */ PrivateLinkResourceInner innerModel(); diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/PrivateLinkResourceListResult.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/PrivateLinkResourceListResult.java index 345d6f4119ef..9e8af53f75fa 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/PrivateLinkResourceListResult.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/PrivateLinkResourceListResult.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** A list of private link resources. */ +/** + * A list of private link resources. + */ @Fluent public final class PrivateLinkResourceListResult { /* @@ -18,13 +20,15 @@ public final class PrivateLinkResourceListResult { @JsonProperty(value = "value") private List value; - /** Creates an instance of PrivateLinkResourceListResult class. */ + /** + * Creates an instance of PrivateLinkResourceListResult class. + */ public PrivateLinkResourceListResult() { } /** * Get the value property: Array of private link resources. - * + * * @return the value value. */ public List value() { @@ -33,7 +37,7 @@ public List value() { /** * Set the value property: Array of private link resources. - * + * * @param value the value value to set. * @return the PrivateLinkResourceListResult object itself. */ @@ -44,7 +48,7 @@ public PrivateLinkResourceListResult withValue(List va /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/PrivateLinkResources.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/PrivateLinkResources.java index acf0cc3f1e66..d5d75b6d72b7 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/PrivateLinkResources.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/PrivateLinkResources.java @@ -8,11 +8,13 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of PrivateLinkResources. */ +/** + * Resource collection API of PrivateLinkResources. + */ public interface PrivateLinkResources { /** * Gets the private link resources for cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -24,7 +26,7 @@ public interface PrivateLinkResources { /** * Gets the private link resources for cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param context The context to associate with this operation. @@ -37,7 +39,7 @@ public interface PrivateLinkResources { /** * Gets a private link resource for cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param privateLinkResourceName The name of the private link resource. @@ -47,12 +49,12 @@ public interface PrivateLinkResources { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a private link resource for cluster along with {@link Response}. */ - Response getWithResponse( - String resourceGroupName, String clusterName, String privateLinkResourceName, Context context); + Response getWithResponse(String resourceGroupName, String clusterName, + String privateLinkResourceName, Context context); /** * Gets a private link resource for cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param privateLinkResourceName The name of the private link resource. diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/PrivateLinkServiceConnectionState.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/PrivateLinkServiceConnectionState.java index 9f618eec6eb3..9bacb78d0a19 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/PrivateLinkServiceConnectionState.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/PrivateLinkServiceConnectionState.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** A collection of information about the state of the connection between service consumer and provider. */ +/** + * A collection of information about the state of the connection between service consumer and provider. + */ @Fluent public final class PrivateLinkServiceConnectionState { /* @@ -28,14 +30,16 @@ public final class PrivateLinkServiceConnectionState { @JsonProperty(value = "actionsRequired") private String actionsRequired; - /** Creates an instance of PrivateLinkServiceConnectionState class. */ + /** + * Creates an instance of PrivateLinkServiceConnectionState class. + */ public PrivateLinkServiceConnectionState() { } /** * Get the status property: Indicates whether the connection has been Approved/Rejected/Removed by the owner of the * service. - * + * * @return the status value. */ public PrivateEndpointServiceConnectionStatus status() { @@ -45,7 +49,7 @@ public PrivateEndpointServiceConnectionStatus status() { /** * Set the status property: Indicates whether the connection has been Approved/Rejected/Removed by the owner of the * service. - * + * * @param status the status value to set. * @return the PrivateLinkServiceConnectionState object itself. */ @@ -56,7 +60,7 @@ public PrivateLinkServiceConnectionState withStatus(PrivateEndpointServiceConnec /** * Get the description property: The reason for approval/rejection of the connection. - * + * * @return the description value. */ public String description() { @@ -65,7 +69,7 @@ public String description() { /** * Set the description property: The reason for approval/rejection of the connection. - * + * * @param description the description value to set. * @return the PrivateLinkServiceConnectionState object itself. */ @@ -77,7 +81,7 @@ public PrivateLinkServiceConnectionState withDescription(String description) { /** * Get the actionsRequired property: A message indicating if changes on the service provider require any updates on * the consumer. - * + * * @return the actionsRequired value. */ public String actionsRequired() { @@ -87,7 +91,7 @@ public String actionsRequired() { /** * Set the actionsRequired property: A message indicating if changes on the service provider require any updates on * the consumer. - * + * * @param actionsRequired the actionsRequired value to set. * @return the PrivateLinkServiceConnectionState object itself. */ @@ -98,7 +102,7 @@ public PrivateLinkServiceConnectionState withActionsRequired(String actionsRequi /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/PromoteRequest.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/PromoteRequest.java new file mode 100644 index 000000000000..34229bb7c306 --- /dev/null +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/PromoteRequest.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.cosmosdbforpostgresql.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Request from client to promote geo-redundant replica. + */ +@Fluent +public final class PromoteRequest { + /* + * Cluster name to verify. + */ + @JsonProperty(value = "enableGeoBackup") + private Boolean enableGeoBackup; + + /** + * Creates an instance of PromoteRequest class. + */ + public PromoteRequest() { + } + + /** + * Get the enableGeoBackup property: Cluster name to verify. + * + * @return the enableGeoBackup value. + */ + public Boolean enableGeoBackup() { + return this.enableGeoBackup; + } + + /** + * Set the enableGeoBackup property: Cluster name to verify. + * + * @param enableGeoBackup the enableGeoBackup value to set. + * @return the PromoteRequest object itself. + */ + public PromoteRequest withEnableGeoBackup(Boolean enableGeoBackup) { + this.enableGeoBackup = enableGeoBackup; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/ProvisioningState.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/ProvisioningState.java index 015c13bb1f43..ab307dc7128a 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/ProvisioningState.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/ProvisioningState.java @@ -8,23 +8,33 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The current provisioning state. */ +/** + * The current provisioning state. + */ public final class ProvisioningState extends ExpandableStringEnum { - /** Static value Succeeded for ProvisioningState. */ + /** + * Static value Succeeded for ProvisioningState. + */ public static final ProvisioningState SUCCEEDED = fromString("Succeeded"); - /** Static value Canceled for ProvisioningState. */ + /** + * Static value Canceled for ProvisioningState. + */ public static final ProvisioningState CANCELED = fromString("Canceled"); - /** Static value InProgress for ProvisioningState. */ + /** + * Static value InProgress for ProvisioningState. + */ public static final ProvisioningState IN_PROGRESS = fromString("InProgress"); - /** Static value Failed for ProvisioningState. */ + /** + * Static value Failed for ProvisioningState. + */ public static final ProvisioningState FAILED = fromString("Failed"); /** * Creates a new instance of ProvisioningState value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -33,7 +43,7 @@ public ProvisioningState() { /** * Creates or finds a ProvisioningState from its string representation. - * + * * @param name a name to look for. * @return the corresponding ProvisioningState. */ @@ -44,7 +54,7 @@ public static ProvisioningState fromString(String name) { /** * Gets known ProvisioningState values. - * + * * @return known ProvisioningState values. */ public static Collection values() { diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/Role.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/Role.java index 4e5ad1747f0a..0b4ff876b9db 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/Role.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/Role.java @@ -8,126 +8,218 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.cosmosdbforpostgresql.fluent.models.RoleInner; -/** An immutable client-side representation of Role. */ +/** + * An immutable client-side representation of Role. + */ public interface Role { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); /** * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * + * * @return the systemData value. */ SystemData systemData(); /** - * Gets the password property: The password of the cluster role. - * + * Gets the roleType property: The roleType property. + * + * @return the roleType value. + */ + RoleType roleType(); + + /** + * Gets the password property: The password of the cluster role. If an identity is used, password will not be + * required. + * * @return the password value. */ String password(); /** * Gets the provisioningState property: Provisioning state of the role. - * + * * @return the provisioningState value. */ ProvisioningState provisioningState(); + /** + * Gets the objectId property: The objectId property. + * + * @return the objectId value. + */ + String objectId(); + + /** + * Gets the principalType property: The principalType property. + * + * @return the principalType value. + */ + PrincipalType principalType(); + + /** + * Gets the tenantId property: The tenantId property. + * + * @return the tenantId value. + */ + String tenantId(); + /** * Gets the inner com.azure.resourcemanager.cosmosdbforpostgresql.fluent.models.RoleInner object. - * + * * @return the inner object. */ RoleInner innerModel(); - /** The entirety of the Role definition. */ + /** + * The entirety of the Role definition. + */ interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithParentResource, - DefinitionStages.WithPassword, - DefinitionStages.WithCreate { + extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { } - /** The Role definition stages. */ + /** + * The Role definition stages. + */ interface DefinitionStages { - /** The first stage of the Role definition. */ + /** + * The first stage of the Role definition. + */ interface Blank extends WithParentResource { } - /** The stage of the Role definition allowing to specify parent resource. */ + /** + * The stage of the Role definition allowing to specify parent resource. + */ interface WithParentResource { /** * Specifies resourceGroupName, clusterName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @return the next definition stage. */ - WithPassword withExistingServerGroupsv2(String resourceGroupName, String clusterName); - } - - /** The stage of the Role definition allowing to specify password. */ - interface WithPassword { - /** - * Specifies the password property: The password of the cluster role.. - * - * @param password The password of the cluster role. - * @return the next definition stage. - */ - WithCreate withPassword(String password); + WithCreate withExistingServerGroupsv2(String resourceGroupName, String clusterName); } /** * The stage of the Role definition which contains all the minimum required properties for the resource to be * created, but also allows for any other optional properties to be specified. */ - interface WithCreate { + interface WithCreate extends DefinitionStages.WithRoleType, DefinitionStages.WithPassword, + DefinitionStages.WithObjectId, DefinitionStages.WithPrincipalType, DefinitionStages.WithTenantId { /** * Executes the create request. - * + * * @return the created resource. */ Role create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ Role create(Context context); } + + /** + * The stage of the Role definition allowing to specify roleType. + */ + interface WithRoleType { + /** + * Specifies the roleType property: The roleType property.. + * + * @param roleType The roleType property. + * @return the next definition stage. + */ + WithCreate withRoleType(RoleType roleType); + } + + /** + * The stage of the Role definition allowing to specify password. + */ + interface WithPassword { + /** + * Specifies the password property: The password of the cluster role. If an identity is used, password will + * not be required.. + * + * @param password The password of the cluster role. If an identity is used, password will not be required. + * @return the next definition stage. + */ + WithCreate withPassword(String password); + } + + /** + * The stage of the Role definition allowing to specify objectId. + */ + interface WithObjectId { + /** + * Specifies the objectId property: The objectId property.. + * + * @param objectId The objectId property. + * @return the next definition stage. + */ + WithCreate withObjectId(String objectId); + } + + /** + * The stage of the Role definition allowing to specify principalType. + */ + interface WithPrincipalType { + /** + * Specifies the principalType property: The principalType property.. + * + * @param principalType The principalType property. + * @return the next definition stage. + */ + WithCreate withPrincipalType(PrincipalType principalType); + } + + /** + * The stage of the Role definition allowing to specify tenantId. + */ + interface WithTenantId { + /** + * Specifies the tenantId property: The tenantId property.. + * + * @param tenantId The tenantId property. + * @return the next definition stage. + */ + WithCreate withTenantId(String tenantId); + } } /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ Role refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/RoleListResult.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/RoleListResult.java index efb7c6f842b5..74cf6495e5b2 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/RoleListResult.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/RoleListResult.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** A list of roles. */ +/** + * A list of roles. + */ @Fluent public final class RoleListResult { /* @@ -18,13 +20,15 @@ public final class RoleListResult { @JsonProperty(value = "value") private List value; - /** Creates an instance of RoleListResult class. */ + /** + * Creates an instance of RoleListResult class. + */ public RoleListResult() { } /** * Get the value property: The list of roles in a cluster. - * + * * @return the value value. */ public List value() { @@ -33,7 +37,7 @@ public List value() { /** * Set the value property: The list of roles in a cluster. - * + * * @param value the value value to set. * @return the RoleListResult object itself. */ @@ -44,7 +48,7 @@ public RoleListResult withValue(List value) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/RoleType.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/RoleType.java new file mode 100644 index 000000000000..aa192a2eb546 --- /dev/null +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/RoleType.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.cosmosdbforpostgresql.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * Defines values for RoleType. + */ +public final class RoleType extends ExpandableStringEnum { + /** + * Static value user for RoleType. + */ + public static final RoleType USER = fromString("user"); + + /** + * Static value admin for RoleType. + */ + public static final RoleType ADMIN = fromString("admin"); + + /** + * Creates a new instance of RoleType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public RoleType() { + } + + /** + * Creates or finds a RoleType from its string representation. + * + * @param name a name to look for. + * @return the corresponding RoleType. + */ + @JsonCreator + public static RoleType fromString(String name) { + return fromString(name, RoleType.class); + } + + /** + * Gets known RoleType values. + * + * @return known RoleType values. + */ + public static Collection values() { + return values(RoleType.class); + } +} diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/Roles.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/Roles.java index 0dba9feb7d15..1a01eec396cf 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/Roles.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/Roles.java @@ -8,11 +8,13 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of Roles. */ +/** + * Resource collection API of Roles. + */ public interface Roles { /** * Gets information about a cluster role. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param roleName The name of the cluster role. @@ -26,7 +28,7 @@ public interface Roles { /** * Gets information about a cluster role. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param roleName The name of the cluster role. @@ -39,7 +41,7 @@ public interface Roles { /** * Deletes a cluster role. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param roleName The name of the cluster role. @@ -51,7 +53,7 @@ public interface Roles { /** * Deletes a cluster role. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param roleName The name of the cluster role. @@ -64,7 +66,7 @@ public interface Roles { /** * List all the roles in a given cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -76,7 +78,7 @@ public interface Roles { /** * List all the roles in a given cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param context The context to associate with this operation. @@ -89,7 +91,7 @@ public interface Roles { /** * Gets information about a cluster role. - * + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -100,7 +102,7 @@ public interface Roles { /** * Gets information about a cluster role. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -112,7 +114,7 @@ public interface Roles { /** * Deletes a cluster role. - * + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -122,7 +124,7 @@ public interface Roles { /** * Deletes a cluster role. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -133,7 +135,7 @@ public interface Roles { /** * Begins definition for a new Role resource. - * + * * @param name resource name. * @return the first stage of the new Role definition. */ diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/ServerConfiguration.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/ServerConfiguration.java index aa4e7412d498..082967230aa0 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/ServerConfiguration.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/ServerConfiguration.java @@ -7,95 +7,97 @@ import com.azure.core.management.SystemData; import com.azure.resourcemanager.cosmosdbforpostgresql.fluent.models.ServerConfigurationInner; -/** An immutable client-side representation of ServerConfiguration. */ +/** + * An immutable client-side representation of ServerConfiguration. + */ public interface ServerConfiguration { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); /** * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * + * * @return the systemData value. */ SystemData systemData(); /** * Gets the value property: Value of the configuration. - * + * * @return the value value. */ String value(); /** * Gets the source property: Source of the configuration. - * + * * @return the source value. */ String source(); /** * Gets the description property: Description of the configuration. - * + * * @return the description value. */ String description(); /** * Gets the defaultValue property: Default value of the configuration. - * + * * @return the defaultValue value. */ String defaultValue(); /** * Gets the dataType property: Data type of the configuration. - * + * * @return the dataType value. */ ConfigurationDataType dataType(); /** * Gets the allowedValues property: Allowed values of the configuration. - * + * * @return the allowedValues value. */ String allowedValues(); /** * Gets the requiresRestart property: If configuration change requires restart. - * + * * @return the requiresRestart value. */ Boolean requiresRestart(); /** * Gets the provisioningState property: Provisioning state of the configuration. - * + * * @return the provisioningState value. */ ProvisioningState provisioningState(); /** * Gets the inner com.azure.resourcemanager.cosmosdbforpostgresql.fluent.models.ServerConfigurationInner object. - * + * * @return the inner object. */ ServerConfigurationInner innerModel(); diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/ServerConfigurationListResult.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/ServerConfigurationListResult.java index f61d904c7298..ae8465a417d7 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/ServerConfigurationListResult.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/ServerConfigurationListResult.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** A list of server configurations. */ +/** + * A list of server configurations. + */ @Fluent public final class ServerConfigurationListResult { /* @@ -24,13 +26,15 @@ public final class ServerConfigurationListResult { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of ServerConfigurationListResult class. */ + /** + * Creates an instance of ServerConfigurationListResult class. + */ public ServerConfigurationListResult() { } /** * Get the value property: The list of server configurations. - * + * * @return the value value. */ public List value() { @@ -39,7 +43,7 @@ public List value() { /** * Set the value property: The list of server configurations. - * + * * @param value the value value to set. * @return the ServerConfigurationListResult object itself. */ @@ -50,7 +54,7 @@ public ServerConfigurationListResult withValue(List va /** * Get the nextLink property: Link to retrieve next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -59,7 +63,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/ServerNameItem.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/ServerNameItem.java index 10590b063b1f..a915dd7ac73d 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/ServerNameItem.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/ServerNameItem.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The name object for a server. */ +/** + * The name object for a server. + */ @Fluent public final class ServerNameItem { /* @@ -22,13 +24,15 @@ public final class ServerNameItem { @JsonProperty(value = "fullyQualifiedDomainName", access = JsonProperty.Access.WRITE_ONLY) private String fullyQualifiedDomainName; - /** Creates an instance of ServerNameItem class. */ + /** + * Creates an instance of ServerNameItem class. + */ public ServerNameItem() { } /** * Get the name property: The name of a server. - * + * * @return the name value. */ public String name() { @@ -37,7 +41,7 @@ public String name() { /** * Set the name property: The name of a server. - * + * * @param name the name value to set. * @return the ServerNameItem object itself. */ @@ -48,7 +52,7 @@ public ServerNameItem withName(String name) { /** * Get the fullyQualifiedDomainName property: The fully qualified domain name of a server. - * + * * @return the fullyQualifiedDomainName value. */ public String fullyQualifiedDomainName() { @@ -57,7 +61,7 @@ public String fullyQualifiedDomainName() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/ServerProperties.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/ServerProperties.java index 4d4f8127bec3..4779ba98fb46 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/ServerProperties.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/ServerProperties.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The properties of a server. */ +/** + * The properties of a server. + */ @Fluent public class ServerProperties { /* @@ -52,13 +54,15 @@ public class ServerProperties { @JsonProperty(value = "administratorLogin", access = JsonProperty.Access.WRITE_ONLY) private String administratorLogin; - /** Creates an instance of ServerProperties class. */ + /** + * Creates an instance of ServerProperties class. + */ public ServerProperties() { } /** * Get the serverEdition property: The edition of a server. - * + * * @return the serverEdition value. */ public String serverEdition() { @@ -67,7 +71,7 @@ public String serverEdition() { /** * Set the serverEdition property: The edition of a server. - * + * * @param serverEdition the serverEdition value to set. * @return the ServerProperties object itself. */ @@ -78,7 +82,7 @@ public ServerProperties withServerEdition(String serverEdition) { /** * Get the storageQuotaInMb property: The storage of a server in MB. - * + * * @return the storageQuotaInMb value. */ public Integer storageQuotaInMb() { @@ -87,7 +91,7 @@ public Integer storageQuotaInMb() { /** * Set the storageQuotaInMb property: The storage of a server in MB. - * + * * @param storageQuotaInMb the storageQuotaInMb value to set. * @return the ServerProperties object itself. */ @@ -98,7 +102,7 @@ public ServerProperties withStorageQuotaInMb(Integer storageQuotaInMb) { /** * Get the vCores property: The vCores count of a server. - * + * * @return the vCores value. */ public Integer vCores() { @@ -107,7 +111,7 @@ public Integer vCores() { /** * Set the vCores property: The vCores count of a server. - * + * * @param vCores the vCores value to set. * @return the ServerProperties object itself. */ @@ -118,7 +122,7 @@ public ServerProperties withVCores(Integer vCores) { /** * Get the enableHa property: If high availability (HA) is enabled or not for the server. - * + * * @return the enableHa value. */ public Boolean enableHa() { @@ -127,7 +131,7 @@ public Boolean enableHa() { /** * Set the enableHa property: If high availability (HA) is enabled or not for the server. - * + * * @param enableHa the enableHa value to set. * @return the ServerProperties object itself. */ @@ -138,7 +142,7 @@ public ServerProperties withEnableHa(Boolean enableHa) { /** * Get the enablePublicIpAccess property: If public access is enabled on server. - * + * * @return the enablePublicIpAccess value. */ public Boolean enablePublicIpAccess() { @@ -148,7 +152,7 @@ public Boolean enablePublicIpAccess() { /** * Get the isReadOnly property: If server database is set to read-only by system maintenance depending on high disk * space usage. - * + * * @return the isReadOnly value. */ public Boolean isReadOnly() { @@ -157,7 +161,7 @@ public Boolean isReadOnly() { /** * Get the administratorLogin property: The administrator's login name of the servers in the cluster. - * + * * @return the administratorLogin value. */ public String administratorLogin() { @@ -166,7 +170,7 @@ public String administratorLogin() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/ServerRole.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/ServerRole.java index 0f381b510c48..e36d803e6ba2 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/ServerRole.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/ServerRole.java @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The role of a server. */ +/** + * The role of a server. + */ public final class ServerRole extends ExpandableStringEnum { - /** Static value Coordinator for ServerRole. */ + /** + * Static value Coordinator for ServerRole. + */ public static final ServerRole COORDINATOR = fromString("Coordinator"); - /** Static value Worker for ServerRole. */ + /** + * Static value Worker for ServerRole. + */ public static final ServerRole WORKER = fromString("Worker"); /** * Creates a new instance of ServerRole value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public ServerRole() { /** * Creates or finds a ServerRole from its string representation. - * + * * @param name a name to look for. * @return the corresponding ServerRole. */ @@ -38,7 +44,7 @@ public static ServerRole fromString(String name) { /** * Gets known ServerRole values. - * + * * @return known ServerRole values. */ public static Collection values() { diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/ServerRoleGroupConfiguration.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/ServerRoleGroupConfiguration.java index dc3a44a74b15..91d07dd0ebed 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/ServerRoleGroupConfiguration.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/ServerRoleGroupConfiguration.java @@ -8,7 +8,9 @@ import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonProperty; -/** Represents server role group configuration value. */ +/** + * Represents server role group configuration value. + */ @Fluent public final class ServerRoleGroupConfiguration { /* @@ -35,13 +37,15 @@ public final class ServerRoleGroupConfiguration { @JsonProperty(value = "source", access = JsonProperty.Access.WRITE_ONLY) private String source; - /** Creates an instance of ServerRoleGroupConfiguration class. */ + /** + * Creates an instance of ServerRoleGroupConfiguration class. + */ public ServerRoleGroupConfiguration() { } /** * Get the role property: The role of servers in the server role group. - * + * * @return the role value. */ public ServerRole role() { @@ -50,7 +54,7 @@ public ServerRole role() { /** * Set the role property: The role of servers in the server role group. - * + * * @param role the role value to set. * @return the ServerRoleGroupConfiguration object itself. */ @@ -61,7 +65,7 @@ public ServerRoleGroupConfiguration withRole(ServerRole role) { /** * Get the value property: Value of the configuration. - * + * * @return the value value. */ public String value() { @@ -70,7 +74,7 @@ public String value() { /** * Set the value property: Value of the configuration. - * + * * @param value the value value to set. * @return the ServerRoleGroupConfiguration object itself. */ @@ -81,7 +85,7 @@ public ServerRoleGroupConfiguration withValue(String value) { /** * Get the defaultValue property: Default value of the configuration. - * + * * @return the defaultValue value. */ public String defaultValue() { @@ -90,7 +94,7 @@ public String defaultValue() { /** * Get the source property: Source of the configuration. - * + * * @return the source value. */ public String source() { @@ -99,21 +103,17 @@ public String source() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (role() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property role in model ServerRoleGroupConfiguration")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property role in model ServerRoleGroupConfiguration")); } if (value() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property value in model ServerRoleGroupConfiguration")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property value in model ServerRoleGroupConfiguration")); } } diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/Servers.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/Servers.java index 12af652857c7..711e67d56c03 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/Servers.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/Servers.java @@ -8,11 +8,13 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of Servers. */ +/** + * Resource collection API of Servers. + */ public interface Servers { /** * Lists servers of a cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -24,7 +26,7 @@ public interface Servers { /** * Lists servers of a cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param context The context to associate with this operation. @@ -37,7 +39,7 @@ public interface Servers { /** * Gets information about a server in cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param serverName The name of the server. @@ -47,12 +49,12 @@ public interface Servers { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return information about a server in cluster along with {@link Response}. */ - Response getWithResponse( - String resourceGroupName, String clusterName, String serverName, Context context); + Response getWithResponse(String resourceGroupName, String clusterName, String serverName, + Context context); /** * Gets information about a server in cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param serverName The name of the server. diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/SimplePrivateEndpointConnection.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/SimplePrivateEndpointConnection.java index 953864c5a9b1..c2380997f831 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/SimplePrivateEndpointConnection.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/SimplePrivateEndpointConnection.java @@ -11,7 +11,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** A private endpoint connection. */ +/** + * A private endpoint connection. + */ @Fluent public final class SimplePrivateEndpointConnection extends ProxyResource { /* @@ -26,13 +28,15 @@ public final class SimplePrivateEndpointConnection extends ProxyResource { @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; - /** Creates an instance of SimplePrivateEndpointConnection class. */ + /** + * Creates an instance of SimplePrivateEndpointConnection class. + */ public SimplePrivateEndpointConnection() { } /** * Get the innerProperties property: Properties of the private endpoint connection. - * + * * @return the innerProperties value. */ private PrivateEndpointConnectionSimpleProperties innerProperties() { @@ -41,7 +45,7 @@ private PrivateEndpointConnectionSimpleProperties innerProperties() { /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * + * * @return the systemData value. */ public SystemData systemData() { @@ -50,7 +54,7 @@ public SystemData systemData() { /** * Get the privateEndpoint property: Private endpoint which the connection belongs to. - * + * * @return the privateEndpoint value. */ public PrivateEndpointProperty privateEndpoint() { @@ -59,7 +63,7 @@ public PrivateEndpointProperty privateEndpoint() { /** * Set the privateEndpoint property: Private endpoint which the connection belongs to. - * + * * @param privateEndpoint the privateEndpoint value to set. * @return the SimplePrivateEndpointConnection object itself. */ @@ -73,7 +77,7 @@ public SimplePrivateEndpointConnection withPrivateEndpoint(PrivateEndpointProper /** * Get the groupIds property: Group ids of the private endpoint connection. - * + * * @return the groupIds value. */ public List groupIds() { @@ -82,7 +86,7 @@ public List groupIds() { /** * Set the groupIds property: Group ids of the private endpoint connection. - * + * * @param groupIds the groupIds value to set. * @return the SimplePrivateEndpointConnection object itself. */ @@ -95,9 +99,9 @@ public SimplePrivateEndpointConnection withGroupIds(List groupIds) { } /** - * Get the privateLinkServiceConnectionState property: A collection of information about the state of the connection - * between service consumer and provider. - * + * Get the privateLinkServiceConnectionState property: A collection of information about the state of the + * connection between service consumer and provider. + * * @return the privateLinkServiceConnectionState value. */ public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() { @@ -105,14 +109,14 @@ public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() { } /** - * Set the privateLinkServiceConnectionState property: A collection of information about the state of the connection - * between service consumer and provider. - * + * Set the privateLinkServiceConnectionState property: A collection of information about the state of the + * connection between service consumer and provider. + * * @param privateLinkServiceConnectionState the privateLinkServiceConnectionState value to set. * @return the SimplePrivateEndpointConnection object itself. */ - public SimplePrivateEndpointConnection withPrivateLinkServiceConnectionState( - PrivateLinkServiceConnectionState privateLinkServiceConnectionState) { + public SimplePrivateEndpointConnection + withPrivateLinkServiceConnectionState(PrivateLinkServiceConnectionState privateLinkServiceConnectionState) { if (this.innerProperties() == null) { this.innerProperties = new PrivateEndpointConnectionSimpleProperties(); } @@ -122,7 +126,7 @@ public SimplePrivateEndpointConnection withPrivateLinkServiceConnectionState( /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/package-info.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/package-info.java index b223517568c5..d87850199035 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/package-info.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/models/package-info.java @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. /** - * Package containing the data models for CosmosDBForPostgreSql. Azure Cosmos DB for PostgreSQL database service - * resource provider REST APIs. + * Package containing the data models for CosmosDBForPostgreSql. + * Azure Cosmos DB for PostgreSQL database service resource provider REST APIs. */ package com.azure.resourcemanager.cosmosdbforpostgresql.models; diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/package-info.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/package-info.java index 08b96dc0f25e..c37290e21a82 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/package-info.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/com/azure/resourcemanager/cosmosdbforpostgresql/package-info.java @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. /** - * Package containing the classes for CosmosDBForPostgreSql. Azure Cosmos DB for PostgreSQL database service resource - * provider REST APIs. + * Package containing the classes for CosmosDBForPostgreSql. + * Azure Cosmos DB for PostgreSQL database service resource provider REST APIs. */ package com.azure.resourcemanager.cosmosdbforpostgresql; diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/module-info.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/module-info.java index 55d14d9dbc1a..374b549ed9c4 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/module-info.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/java/module-info.java @@ -4,16 +4,10 @@ module com.azure.resourcemanager.cosmosdbforpostgresql { requires transitive com.azure.core.management; - exports com.azure.resourcemanager.cosmosdbforpostgresql; exports com.azure.resourcemanager.cosmosdbforpostgresql.fluent; exports com.azure.resourcemanager.cosmosdbforpostgresql.fluent.models; exports com.azure.resourcemanager.cosmosdbforpostgresql.models; - - opens com.azure.resourcemanager.cosmosdbforpostgresql.fluent.models to - com.azure.core, - com.fasterxml.jackson.databind; - opens com.azure.resourcemanager.cosmosdbforpostgresql.models to - com.azure.core, - com.fasterxml.jackson.databind; + opens com.azure.resourcemanager.cosmosdbforpostgresql.fluent.models to com.azure.core, com.fasterxml.jackson.databind; + opens com.azure.resourcemanager.cosmosdbforpostgresql.models to com.azure.core, com.fasterxml.jackson.databind; } diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-cosmosdbforpostgresql/proxy-config.json b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-cosmosdbforpostgresql/proxy-config.json new file mode 100644 index 000000000000..9d763140b293 --- /dev/null +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-cosmosdbforpostgresql/proxy-config.json @@ -0,0 +1 @@ +[ [ "com.azure.resourcemanager.cosmosdbforpostgresql.implementation.ClustersClientImpl$ClustersService" ], [ "com.azure.resourcemanager.cosmosdbforpostgresql.implementation.ServersClientImpl$ServersService" ], [ "com.azure.resourcemanager.cosmosdbforpostgresql.implementation.ConfigurationsClientImpl$ConfigurationsService" ], [ "com.azure.resourcemanager.cosmosdbforpostgresql.implementation.FirewallRulesClientImpl$FirewallRulesService" ], [ "com.azure.resourcemanager.cosmosdbforpostgresql.implementation.RolesClientImpl$RolesService" ], [ "com.azure.resourcemanager.cosmosdbforpostgresql.implementation.OperationsClientImpl$OperationsService" ], [ "com.azure.resourcemanager.cosmosdbforpostgresql.implementation.PrivateEndpointConnectionsClientImpl$PrivateEndpointConnectionsService" ], [ "com.azure.resourcemanager.cosmosdbforpostgresql.implementation.PrivateLinkResourcesClientImpl$PrivateLinkResourcesService" ] ] \ No newline at end of file diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-cosmosdbforpostgresql/reflect-config.json b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-cosmosdbforpostgresql/reflect-config.json new file mode 100644 index 000000000000..342b813f0f23 --- /dev/null +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-cosmosdbforpostgresql/reflect-config.json @@ -0,0 +1,266 @@ +[ { + "name" : "com.azure.resourcemanager.cosmosdbforpostgresql.models.ClusterListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.cosmosdbforpostgresql.fluent.models.ClusterInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.cosmosdbforpostgresql.fluent.models.ClusterProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.cosmosdbforpostgresql.models.MaintenanceWindow", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.cosmosdbforpostgresql.models.ServerNameItem", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.cosmosdbforpostgresql.models.SimplePrivateEndpointConnection", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.cosmosdbforpostgresql.fluent.models.PrivateEndpointConnectionSimpleProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.cosmosdbforpostgresql.models.PrivateEndpointProperty", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.cosmosdbforpostgresql.models.PrivateLinkServiceConnectionState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.cosmosdbforpostgresql.models.AuthConfig", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.cosmosdbforpostgresql.models.ClusterForUpdate", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.cosmosdbforpostgresql.fluent.models.ClusterPropertiesForUpdate", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.cosmosdbforpostgresql.models.ClusterServerListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.cosmosdbforpostgresql.fluent.models.ClusterServerInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.cosmosdbforpostgresql.fluent.models.ClusterServerProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.cosmosdbforpostgresql.models.ServerProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.cosmosdbforpostgresql.models.ServerConfigurationListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.cosmosdbforpostgresql.fluent.models.ServerConfigurationInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.cosmosdbforpostgresql.fluent.models.ServerConfigurationProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.cosmosdbforpostgresql.models.ClusterConfigurationListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.cosmosdbforpostgresql.fluent.models.ConfigurationInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.cosmosdbforpostgresql.fluent.models.ConfigurationProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.cosmosdbforpostgresql.models.ServerRoleGroupConfiguration", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.cosmosdbforpostgresql.fluent.models.FirewallRuleInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.cosmosdbforpostgresql.fluent.models.FirewallRuleProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.cosmosdbforpostgresql.models.FirewallRuleListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.cosmosdbforpostgresql.fluent.models.RoleInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.cosmosdbforpostgresql.fluent.models.RoleProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.cosmosdbforpostgresql.fluent.models.RolePropertiesExternalIdentity", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.cosmosdbforpostgresql.models.RoleListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.cosmosdbforpostgresql.models.PromoteRequest", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.cosmosdbforpostgresql.models.NameAvailabilityRequest", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.cosmosdbforpostgresql.fluent.models.NameAvailabilityInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.cosmosdbforpostgresql.models.OperationListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.cosmosdbforpostgresql.fluent.models.OperationInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.cosmosdbforpostgresql.models.OperationDisplay", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.cosmosdbforpostgresql.models.PrivateEndpointConnectionListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.cosmosdbforpostgresql.fluent.models.PrivateEndpointConnectionInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.cosmosdbforpostgresql.fluent.models.PrivateEndpointConnectionProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.cosmosdbforpostgresql.models.PrivateEndpoint", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.cosmosdbforpostgresql.models.PrivateLinkResourceListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.cosmosdbforpostgresql.fluent.models.PrivateLinkResourceInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.cosmosdbforpostgresql.fluent.models.PrivateLinkResourceProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.cosmosdbforpostgresql.models.PrivateEndpointServiceConnectionStatus", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.cosmosdbforpostgresql.models.ActiveDirectoryAuth", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.cosmosdbforpostgresql.models.PasswordAuth", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.cosmosdbforpostgresql.models.ServerRole", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.cosmosdbforpostgresql.models.ConfigurationDataType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.cosmosdbforpostgresql.models.ProvisioningState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.cosmosdbforpostgresql.models.RoleType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.cosmosdbforpostgresql.models.PrincipalType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.cosmosdbforpostgresql.models.OperationOrigin", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.cosmosdbforpostgresql.models.PrivateEndpointConnectionProvisioningState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +} ] \ No newline at end of file diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ClustersCheckNameAvailabilitySamples.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ClustersCheckNameAvailabilitySamples.java index 531a2fd06426..529e927eed9c 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ClustersCheckNameAvailabilitySamples.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ClustersCheckNameAvailabilitySamples.java @@ -6,21 +6,23 @@ import com.azure.resourcemanager.cosmosdbforpostgresql.models.NameAvailabilityRequest; -/** Samples for Clusters CheckNameAvailability. */ +/** + * Samples for Clusters CheckNameAvailability. + */ public final class ClustersCheckNameAvailabilitySamples { /* - * x-ms-original-file: specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/CheckNameAvailability.json + * x-ms-original-file: + * specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-02-preview/examples/ + * CheckNameAvailability.json */ /** * Sample code: Check name availability. - * + * * @param manager Entry point to CosmosDBForPostgreSqlManager. */ - public static void checkNameAvailability( - com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager manager) { - manager - .clusters() - .checkNameAvailabilityWithResponse( - new NameAvailabilityRequest().withName("name1"), com.azure.core.util.Context.NONE); + public static void + checkNameAvailability(com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager manager) { + manager.clusters().checkNameAvailabilityWithResponse(new NameAvailabilityRequest().withName("name1"), + com.azure.core.util.Context.NONE); } } diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ClustersCreateSamples.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ClustersCreateSamples.java index fb6d0c1ac0a4..7d4acdbf12d7 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ClustersCreateSamples.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ClustersCreateSamples.java @@ -8,173 +8,124 @@ import java.util.HashMap; import java.util.Map; -/** Samples for Clusters Create. */ +/** + * Samples for Clusters Create. + */ public final class ClustersCreateSamples { /* - * x-ms-original-file: specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/ClusterCreateSingleNode.json + * x-ms-original-file: + * specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-02-preview/examples/ + * ClusterCreateSingleNode.json */ /** * Sample code: Create a new single node cluster. - * + * * @param manager Entry point to CosmosDBForPostgreSqlManager. */ public static void createANewSingleNodeCluster( com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager manager) { - manager - .clusters() - .define("testcluster-singlenode") - .withRegion("westus") - .withExistingResourceGroup("TestGroup") - .withTags(mapOf("owner", "JohnDoe")) - .withAdministratorLoginPassword("password") - .withPostgresqlVersion("15") - .withCitusVersion("11.3") - .withPreferredPrimaryZone("1") - .withEnableShardsOnCoordinator(true) - .withEnableHa(true) - .withCoordinatorServerEdition("GeneralPurpose") - .withCoordinatorStorageQuotaInMb(131072) - .withCoordinatorVCores(8) - .withCoordinatorEnablePublicIpAccess(true) - .withNodeCount(0) - .create(); + manager.clusters().define("testcluster-singlenode").withRegion("westus").withExistingResourceGroup("TestGroup") + .withTags(mapOf("owner", "JohnDoe")).withAdministratorLoginPassword("password").withPostgresqlVersion("15") + .withCitusVersion("11.3").withPreferredPrimaryZone("1").withEnableShardsOnCoordinator(true) + .withEnableHa(true).withCoordinatorServerEdition("GeneralPurpose").withCoordinatorStorageQuotaInMb(131072) + .withCoordinatorVCores(8).withCoordinatorEnablePublicIpAccess(true).withNodeCount(0).create(); } /* - * x-ms-original-file: specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/ClusterCreateBurstablev1.json + * x-ms-original-file: + * specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-02-preview/examples/ + * ClusterCreateBurstablev1.json */ /** * Sample code: Create a new single node Burstable 1 vCore cluster. - * + * * @param manager Entry point to CosmosDBForPostgreSqlManager. */ public static void createANewSingleNodeBurstable1VCoreCluster( com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager manager) { - manager - .clusters() - .define("testcluster-burstablev1") - .withRegion("westus") - .withExistingResourceGroup("TestGroup") - .withTags(mapOf("owner", "JohnDoe")) - .withAdministratorLoginPassword("password") - .withPostgresqlVersion("15") - .withCitusVersion("11.3") - .withPreferredPrimaryZone("1") - .withEnableShardsOnCoordinator(true) - .withEnableHa(false) - .withCoordinatorServerEdition("BurstableMemoryOptimized") - .withCoordinatorStorageQuotaInMb(131072) - .withCoordinatorVCores(1) - .withCoordinatorEnablePublicIpAccess(true) - .withNodeCount(0) - .create(); + manager.clusters().define("testcluster-burstablev1").withRegion("westus").withExistingResourceGroup("TestGroup") + .withTags(mapOf("owner", "JohnDoe")).withAdministratorLoginPassword("password").withPostgresqlVersion("15") + .withCitusVersion("11.3").withPreferredPrimaryZone("1").withEnableShardsOnCoordinator(true) + .withEnableHa(false).withCoordinatorServerEdition("BurstableMemoryOptimized") + .withCoordinatorStorageQuotaInMb(131072).withCoordinatorVCores(1).withCoordinatorEnablePublicIpAccess(true) + .withNodeCount(0).create(); } /* - * x-ms-original-file: specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/ClusterCreateBurstablev2.json + * x-ms-original-file: + * specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-02-preview/examples/ + * ClusterCreateBurstablev2.json */ /** * Sample code: Create a new single node Burstable 2 vCores cluster. - * + * * @param manager Entry point to CosmosDBForPostgreSqlManager. */ public static void createANewSingleNodeBurstable2VCoresCluster( com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager manager) { - manager - .clusters() - .define("testcluster-burstablev2") - .withRegion("westus") - .withExistingResourceGroup("TestGroup") - .withTags(mapOf("owner", "JohnDoe")) - .withAdministratorLoginPassword("password") - .withPostgresqlVersion("15") - .withCitusVersion("11.3") - .withPreferredPrimaryZone("1") - .withEnableShardsOnCoordinator(true) - .withEnableHa(false) - .withCoordinatorServerEdition("BurstableGeneralPurpose") - .withCoordinatorStorageQuotaInMb(131072) - .withCoordinatorVCores(2) - .withCoordinatorEnablePublicIpAccess(true) - .withNodeCount(0) - .create(); + manager.clusters().define("testcluster-burstablev2").withRegion("westus").withExistingResourceGroup("TestGroup") + .withTags(mapOf("owner", "JohnDoe")).withAdministratorLoginPassword("password").withPostgresqlVersion("15") + .withCitusVersion("11.3").withPreferredPrimaryZone("1").withEnableShardsOnCoordinator(true) + .withEnableHa(false).withCoordinatorServerEdition("BurstableGeneralPurpose") + .withCoordinatorStorageQuotaInMb(131072).withCoordinatorVCores(2).withCoordinatorEnablePublicIpAccess(true) + .withNodeCount(0).create(); } /* - * x-ms-original-file: specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/ClusterCreateMultiNode.json + * x-ms-original-file: + * specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-02-preview/examples/ + * ClusterCreateMultiNode.json */ /** * Sample code: Create a new multi-node cluster. - * + * * @param manager Entry point to CosmosDBForPostgreSqlManager. */ public static void createANewMultiNodeCluster( com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager manager) { - manager - .clusters() - .define("testcluster-multinode") - .withRegion("westus") - .withExistingResourceGroup("TestGroup") - .withTags(mapOf()) - .withAdministratorLoginPassword("password") - .withPostgresqlVersion("15") - .withCitusVersion("11.1") - .withPreferredPrimaryZone("1") - .withEnableShardsOnCoordinator(false) - .withEnableHa(true) - .withCoordinatorServerEdition("GeneralPurpose") - .withCoordinatorStorageQuotaInMb(524288) - .withCoordinatorVCores(4) - .withCoordinatorEnablePublicIpAccess(true) - .withNodeServerEdition("MemoryOptimized") - .withNodeCount(3) - .withNodeStorageQuotaInMb(524288) - .withNodeVCores(8) - .withNodeEnablePublicIpAccess(false) + manager.clusters().define("testcluster-multinode").withRegion("westus").withExistingResourceGroup("TestGroup") + .withTags(mapOf()).withAdministratorLoginPassword("password").withPostgresqlVersion("15") + .withCitusVersion("11.1").withPreferredPrimaryZone("1").withEnableShardsOnCoordinator(false) + .withEnableHa(true).withCoordinatorServerEdition("GeneralPurpose").withCoordinatorStorageQuotaInMb(524288) + .withCoordinatorVCores(4).withCoordinatorEnablePublicIpAccess(true).withNodeServerEdition("MemoryOptimized") + .withNodeCount(3).withNodeStorageQuotaInMb(524288).withNodeVCores(8).withNodeEnablePublicIpAccess(false) .create(); } /* - * x-ms-original-file: specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/ClusterCreateReadReplica.json + * x-ms-original-file: + * specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-02-preview/examples/ + * ClusterCreateReadReplica.json */ /** * Sample code: Create a new cluster as a read replica. - * + * * @param manager Entry point to CosmosDBForPostgreSqlManager. */ public static void createANewClusterAsAReadReplica( com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager manager) { - manager - .clusters() - .define("testcluster") - .withRegion("westus") - .withExistingResourceGroup("TestGroup") + manager.clusters().define("testcluster").withRegion("westus").withExistingResourceGroup("TestGroup") .withSourceResourceId( "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestResourceGroup/providers/Microsoft.DBforPostgreSQL/serverGroupsv2/sourcecluster") - .withSourceLocation("westus") - .create(); + .withSourceLocation("westus").create(); } /* - * x-ms-original-file: specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/ClusterCreatePITR.json + * x-ms-original-file: + * specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-02-preview/examples/ + * ClusterCreatePITR.json */ /** * Sample code: Create a new cluster as a point in time restore. - * + * * @param manager Entry point to CosmosDBForPostgreSqlManager. */ public static void createANewClusterAsAPointInTimeRestore( com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager manager) { - manager - .clusters() - .define("testcluster") - .withRegion("westus") - .withExistingResourceGroup("TestGroup") + manager.clusters().define("testcluster").withRegion("westus").withExistingResourceGroup("TestGroup") .withSourceResourceId( "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestResourceGroup/providers/Microsoft.DBforPostgreSQL/serverGroupsv2/source-cluster") - .withSourceLocation("westus") - .withPointInTimeUtc(OffsetDateTime.parse("2017-12-14T00:00:37.467Z")) - .create(); + .withSourceLocation("westus").withPointInTimeUtc(OffsetDateTime.parse("2017-12-14T00:00:37.467Z")).create(); } // Use "Map.of" if available diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ClustersDeleteSamples.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ClustersDeleteSamples.java index d67909a108b8..95dee4c41b72 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ClustersDeleteSamples.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ClustersDeleteSamples.java @@ -4,18 +4,22 @@ package com.azure.resourcemanager.cosmosdbforpostgresql.generated; -/** Samples for Clusters Delete. */ +/** + * Samples for Clusters Delete. + */ public final class ClustersDeleteSamples { /* - * x-ms-original-file: specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/ClusterDelete.json + * x-ms-original-file: + * specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-02-preview/examples/ + * ClusterDelete.json */ /** * Sample code: Delete the cluster. - * + * * @param manager Entry point to CosmosDBForPostgreSqlManager. */ - public static void deleteTheCluster( - com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager manager) { + public static void + deleteTheCluster(com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager manager) { manager.clusters().delete("TestGroup", "testcluster", com.azure.core.util.Context.NONE); } } diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ClustersGetByResourceGroupSamples.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ClustersGetByResourceGroupSamples.java index 307658010167..d26615412f56 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ClustersGetByResourceGroupSamples.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ClustersGetByResourceGroupSamples.java @@ -4,20 +4,23 @@ package com.azure.resourcemanager.cosmosdbforpostgresql.generated; -/** Samples for Clusters GetByResourceGroup. */ +/** + * Samples for Clusters GetByResourceGroup. + */ public final class ClustersGetByResourceGroupSamples { /* - * x-ms-original-file: specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/ClusterGet.json + * x-ms-original-file: + * specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-02-preview/examples/ + * ClusterGet.json */ /** * Sample code: Get the cluster. - * + * * @param manager Entry point to CosmosDBForPostgreSqlManager. */ - public static void getTheCluster( - com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager manager) { - manager - .clusters() - .getByResourceGroupWithResponse("TestGroup", "testcluster1", com.azure.core.util.Context.NONE); + public static void + getTheCluster(com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager manager) { + manager.clusters().getByResourceGroupWithResponse("TestGroup", "testcluster1", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ClustersListByResourceGroupSamples.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ClustersListByResourceGroupSamples.java index c191499d15f1..f5f8b0016b72 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ClustersListByResourceGroupSamples.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ClustersListByResourceGroupSamples.java @@ -4,14 +4,18 @@ package com.azure.resourcemanager.cosmosdbforpostgresql.generated; -/** Samples for Clusters ListByResourceGroup. */ +/** + * Samples for Clusters ListByResourceGroup. + */ public final class ClustersListByResourceGroupSamples { /* - * x-ms-original-file: specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/ClusterListByResourceGroup.json + * x-ms-original-file: + * specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-02-preview/examples/ + * ClusterListByResourceGroup.json */ /** * Sample code: List the clusters by resource group. - * + * * @param manager Entry point to CosmosDBForPostgreSqlManager. */ public static void listTheClustersByResourceGroup( diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ClustersListSamples.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ClustersListSamples.java index e54fa455df2c..1b4ec4737471 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ClustersListSamples.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ClustersListSamples.java @@ -4,18 +4,22 @@ package com.azure.resourcemanager.cosmosdbforpostgresql.generated; -/** Samples for Clusters List. */ +/** + * Samples for Clusters List. + */ public final class ClustersListSamples { /* - * x-ms-original-file: specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/ClusterList.json + * x-ms-original-file: + * specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-02-preview/examples/ + * ClusterList.json */ /** * Sample code: List all the clusters. - * + * * @param manager Entry point to CosmosDBForPostgreSqlManager. */ - public static void listAllTheClusters( - com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager manager) { + public static void + listAllTheClusters(com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager manager) { manager.clusters().list(com.azure.core.util.Context.NONE); } } diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ClustersPromoteReadReplicaSamples.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ClustersPromoteReadReplicaSamples.java index b97398b6b4ab..42b10bbcd90e 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ClustersPromoteReadReplicaSamples.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ClustersPromoteReadReplicaSamples.java @@ -4,18 +4,22 @@ package com.azure.resourcemanager.cosmosdbforpostgresql.generated; -/** Samples for Clusters PromoteReadReplica. */ +/** + * Samples for Clusters PromoteReadReplica. + */ public final class ClustersPromoteReadReplicaSamples { /* - * x-ms-original-file: specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/ClusterPromoteReadReplica.json + * x-ms-original-file: + * specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-02-preview/examples/ + * ClusterPromoteReadReplica.json */ /** * Sample code: Promote read replica cluster to an independent read-write cluster. - * + * * @param manager Entry point to CosmosDBForPostgreSqlManager. */ public static void promoteReadReplicaClusterToAnIndependentReadWriteCluster( com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager manager) { - manager.clusters().promoteReadReplica("TestGroup", "testcluster1", com.azure.core.util.Context.NONE); + manager.clusters().promoteReadReplica("TestGroup", "testcluster1", null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ClustersRestartSamples.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ClustersRestartSamples.java index 8dac9401a54a..707ad8a4fa8a 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ClustersRestartSamples.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ClustersRestartSamples.java @@ -4,14 +4,18 @@ package com.azure.resourcemanager.cosmosdbforpostgresql.generated; -/** Samples for Clusters Restart. */ +/** + * Samples for Clusters Restart. + */ public final class ClustersRestartSamples { /* - * x-ms-original-file: specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/ClusterRestart.json + * x-ms-original-file: + * specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-02-preview/examples/ + * ClusterRestart.json */ /** * Sample code: Restart all servers in the cluster. - * + * * @param manager Entry point to CosmosDBForPostgreSqlManager. */ public static void restartAllServersInTheCluster( diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ClustersStartSamples.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ClustersStartSamples.java index 7fba5d03c0e7..1f8dd52a4f7f 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ClustersStartSamples.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ClustersStartSamples.java @@ -4,14 +4,18 @@ package com.azure.resourcemanager.cosmosdbforpostgresql.generated; -/** Samples for Clusters Start. */ +/** + * Samples for Clusters Start. + */ public final class ClustersStartSamples { /* - * x-ms-original-file: specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/ClusterStart.json + * x-ms-original-file: + * specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-02-preview/examples/ + * ClusterStart.json */ /** * Sample code: Start all servers in the cluster. - * + * * @param manager Entry point to CosmosDBForPostgreSqlManager. */ public static void startAllServersInTheCluster( diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ClustersStopSamples.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ClustersStopSamples.java index 816718089abc..8aa4f0fba1e0 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ClustersStopSamples.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ClustersStopSamples.java @@ -4,14 +4,18 @@ package com.azure.resourcemanager.cosmosdbforpostgresql.generated; -/** Samples for Clusters Stop. */ +/** + * Samples for Clusters Stop. + */ public final class ClustersStopSamples { /* - * x-ms-original-file: specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/ClusterStop.json + * x-ms-original-file: + * specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-02-preview/examples/ + * ClusterStop.json */ /** * Sample code: Stop all servers in the cluster. - * + * * @param manager Entry point to CosmosDBForPostgreSqlManager. */ public static void stopAllServersInTheCluster( diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ClustersUpdateSamples.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ClustersUpdateSamples.java index c55381997b57..bc445689f8ee 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ClustersUpdateSamples.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ClustersUpdateSamples.java @@ -7,109 +7,95 @@ import com.azure.resourcemanager.cosmosdbforpostgresql.models.Cluster; import com.azure.resourcemanager.cosmosdbforpostgresql.models.MaintenanceWindow; -/** Samples for Clusters Update. */ +/** + * Samples for Clusters Update. + */ public final class ClustersUpdateSamples { /* - * x-ms-original-file: specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/ClusterScaleStorage.json + * x-ms-original-file: + * specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-02-preview/examples/ + * ClusterScaleStorage.json */ /** * Sample code: Scale up storage. - * + * * @param manager Entry point to CosmosDBForPostgreSqlManager. */ - public static void scaleUpStorage( - com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager manager) { - Cluster resource = - manager - .clusters() - .getByResourceGroupWithResponse("TestGroup", "testcluster", com.azure.core.util.Context.NONE) - .getValue(); + public static void + scaleUpStorage(com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager manager) { + Cluster resource = manager.clusters() + .getByResourceGroupWithResponse("TestGroup", "testcluster", com.azure.core.util.Context.NONE).getValue(); resource.update().withNodeStorageQuotaInMb(2097152).apply(); } /* - * x-ms-original-file: specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/ClusterUpdate.json + * x-ms-original-file: + * specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-02-preview/examples/ + * ClusterUpdate.json */ /** * Sample code: Update multiple configuration settings of the cluster. - * + * * @param manager Entry point to CosmosDBForPostgreSqlManager. */ public static void updateMultipleConfigurationSettingsOfTheCluster( com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager manager) { - Cluster resource = - manager - .clusters() - .getByResourceGroupWithResponse("TestGroup", "testcluster", com.azure.core.util.Context.NONE) - .getValue(); - resource - .update() - .withAdministratorLoginPassword("newpassword") - .withCoordinatorVCores(16) - .withNodeCount(4) - .withNodeVCores(16) - .apply(); + Cluster resource = manager.clusters() + .getByResourceGroupWithResponse("TestGroup", "testcluster", com.azure.core.util.Context.NONE).getValue(); + resource.update().withAdministratorLoginPassword("newpassword").withCoordinatorVCores(16).withNodeCount(4) + .withNodeVCores(16).apply(); } /* - * x-ms-original-file: specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/ClusterScaleCompute.json + * x-ms-original-file: + * specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-02-preview/examples/ + * ClusterScaleCompute.json */ /** * Sample code: Scale compute up or down. - * + * * @param manager Entry point to CosmosDBForPostgreSqlManager. */ - public static void scaleComputeUpOrDown( - com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager manager) { - Cluster resource = - manager - .clusters() - .getByResourceGroupWithResponse("TestGroup", "testcluster", com.azure.core.util.Context.NONE) - .getValue(); + public static void + scaleComputeUpOrDown(com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager manager) { + Cluster resource = manager.clusters() + .getByResourceGroupWithResponse("TestGroup", "testcluster", com.azure.core.util.Context.NONE).getValue(); resource.update().withNodeVCores(16).apply(); } /* - * x-ms-original-file: specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/ClusterAddNode.json + * x-ms-original-file: + * specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-02-preview/examples/ + * ClusterAddNode.json */ /** * Sample code: Scale out: Add new worker nodes. - * + * * @param manager Entry point to CosmosDBForPostgreSqlManager. */ public static void scaleOutAddNewWorkerNodes( com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager manager) { - Cluster resource = - manager - .clusters() - .getByResourceGroupWithResponse("TestGroup", "testcluster", com.azure.core.util.Context.NONE) - .getValue(); + Cluster resource = manager.clusters() + .getByResourceGroupWithResponse("TestGroup", "testcluster", com.azure.core.util.Context.NONE).getValue(); resource.update().withNodeCount(2).apply(); } /* - * x-ms-original-file: specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/ClusterUpdateMaintenanceWindow.json + * x-ms-original-file: + * specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-02-preview/examples/ + * ClusterUpdateMaintenanceWindow.json */ /** * Sample code: Update or define maintenance window. - * + * * @param manager Entry point to CosmosDBForPostgreSqlManager. */ public static void updateOrDefineMaintenanceWindow( com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager manager) { - Cluster resource = - manager - .clusters() - .getByResourceGroupWithResponse("TestGroup", "testcluster", com.azure.core.util.Context.NONE) - .getValue(); - resource - .update() - .withMaintenanceWindow( - new MaintenanceWindow() - .withCustomWindow("Enabled") - .withStartHour(8) - .withStartMinute(0) - .withDayOfWeek(0)) + Cluster resource = manager.clusters() + .getByResourceGroupWithResponse("TestGroup", "testcluster", com.azure.core.util.Context.NONE).getValue(); + resource.update().withMaintenanceWindow( + new MaintenanceWindow().withCustomWindow("Enabled").withStartHour(8).withStartMinute(0).withDayOfWeek(0)) .apply(); } } diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ConfigurationsGetCoordinatorSamples.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ConfigurationsGetCoordinatorSamples.java index ba1ab4fe63d9..772d0dec8b17 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ConfigurationsGetCoordinatorSamples.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ConfigurationsGetCoordinatorSamples.java @@ -4,21 +4,23 @@ package com.azure.resourcemanager.cosmosdbforpostgresql.generated; -/** Samples for Configurations GetCoordinator. */ +/** + * Samples for Configurations GetCoordinator. + */ public final class ConfigurationsGetCoordinatorSamples { /* - * x-ms-original-file: specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/ConfigurationGetCoordinator.json + * x-ms-original-file: + * specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-02-preview/examples/ + * ConfigurationGetCoordinator.json */ /** * Sample code: Get configuration details for coordinator. - * + * * @param manager Entry point to CosmosDBForPostgreSqlManager. */ public static void getConfigurationDetailsForCoordinator( com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager manager) { - manager - .configurations() - .getCoordinatorWithResponse( - "TestResourceGroup", "testcluster", "array_nulls", com.azure.core.util.Context.NONE); + manager.configurations().getCoordinatorWithResponse("TestResourceGroup", "testcluster", "array_nulls", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ConfigurationsGetNodeSamples.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ConfigurationsGetNodeSamples.java index 86336d96c196..442ac79d35c3 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ConfigurationsGetNodeSamples.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ConfigurationsGetNodeSamples.java @@ -4,20 +4,23 @@ package com.azure.resourcemanager.cosmosdbforpostgresql.generated; -/** Samples for Configurations GetNode. */ +/** + * Samples for Configurations GetNode. + */ public final class ConfigurationsGetNodeSamples { /* - * x-ms-original-file: specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/ConfigurationGetNode.json + * x-ms-original-file: + * specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-02-preview/examples/ + * ConfigurationGetNode.json */ /** * Sample code: Get configuration details for node. - * + * * @param manager Entry point to CosmosDBForPostgreSqlManager. */ public static void getConfigurationDetailsForNode( com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager manager) { - manager - .configurations() - .getNodeWithResponse("TestResourceGroup", "testcluster", "array_nulls", com.azure.core.util.Context.NONE); + manager.configurations().getNodeWithResponse("TestResourceGroup", "testcluster", "array_nulls", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ConfigurationsGetSamples.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ConfigurationsGetSamples.java index dbf8bea6c7fc..9b6656cf893d 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ConfigurationsGetSamples.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ConfigurationsGetSamples.java @@ -4,20 +4,23 @@ package com.azure.resourcemanager.cosmosdbforpostgresql.generated; -/** Samples for Configurations Get. */ +/** + * Samples for Configurations Get. + */ public final class ConfigurationsGetSamples { /* - * x-ms-original-file: specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/ConfigurationGet.json + * x-ms-original-file: + * specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-02-preview/examples/ + * ConfigurationGet.json */ /** * Sample code: Get configuration details. - * + * * @param manager Entry point to CosmosDBForPostgreSqlManager. */ - public static void getConfigurationDetails( - com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager manager) { - manager - .configurations() - .getWithResponse("TestResourceGroup", "testcluster", "client_encoding", com.azure.core.util.Context.NONE); + public static void + getConfigurationDetails(com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager manager) { + manager.configurations().getWithResponse("TestResourceGroup", "testcluster", "client_encoding", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ConfigurationsListByClusterSamples.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ConfigurationsListByClusterSamples.java index 8d1fbbc7dac3..a9d6388e421b 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ConfigurationsListByClusterSamples.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ConfigurationsListByClusterSamples.java @@ -4,14 +4,18 @@ package com.azure.resourcemanager.cosmosdbforpostgresql.generated; -/** Samples for Configurations ListByCluster. */ +/** + * Samples for Configurations ListByCluster. + */ public final class ConfigurationsListByClusterSamples { /* - * x-ms-original-file: specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/ConfigurationListByCluster.json + * x-ms-original-file: + * specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-02-preview/examples/ + * ConfigurationListByCluster.json */ /** * Sample code: List configurations of the cluster. - * + * * @param manager Entry point to CosmosDBForPostgreSqlManager. */ public static void listConfigurationsOfTheCluster( diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ConfigurationsListByServerSamples.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ConfigurationsListByServerSamples.java index f71c75bab2fe..1b3fa8ac2c1c 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ConfigurationsListByServerSamples.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ConfigurationsListByServerSamples.java @@ -4,20 +4,23 @@ package com.azure.resourcemanager.cosmosdbforpostgresql.generated; -/** Samples for Configurations ListByServer. */ +/** + * Samples for Configurations ListByServer. + */ public final class ConfigurationsListByServerSamples { /* - * x-ms-original-file: specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/ConfigurationListByServer.json + * x-ms-original-file: + * specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-02-preview/examples/ + * ConfigurationListByServer.json */ /** * Sample code: List configurations of the server that in the cluster. - * + * * @param manager Entry point to CosmosDBForPostgreSqlManager. */ public static void listConfigurationsOfTheServerThatInTheCluster( com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager manager) { - manager - .configurations() - .listByServer("TestResourceGroup", "testcluster", "testserver", com.azure.core.util.Context.NONE); + manager.configurations().listByServer("TestResourceGroup", "testcluster", "testserver", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ConfigurationsUpdateOnCoordinatorSamples.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ConfigurationsUpdateOnCoordinatorSamples.java index e03eda246539..31a419f5c4b8 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ConfigurationsUpdateOnCoordinatorSamples.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ConfigurationsUpdateOnCoordinatorSamples.java @@ -6,25 +6,23 @@ import com.azure.resourcemanager.cosmosdbforpostgresql.fluent.models.ServerConfigurationInner; -/** Samples for Configurations UpdateOnCoordinator. */ +/** + * Samples for Configurations UpdateOnCoordinator. + */ public final class ConfigurationsUpdateOnCoordinatorSamples { /* - * x-ms-original-file: specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/ConfigurationUpdateCoordinator.json + * x-ms-original-file: + * specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-02-preview/examples/ + * ConfigurationUpdateCoordinator.json */ /** * Sample code: Update single configuration of coordinator. - * + * * @param manager Entry point to CosmosDBForPostgreSqlManager. */ public static void updateSingleConfigurationOfCoordinator( com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager manager) { - manager - .configurations() - .updateOnCoordinator( - "TestResourceGroup", - "testcluster", - "array_nulls", - new ServerConfigurationInner().withValue("on"), - com.azure.core.util.Context.NONE); + manager.configurations().updateOnCoordinator("TestResourceGroup", "testcluster", "array_nulls", + new ServerConfigurationInner().withValue("on"), com.azure.core.util.Context.NONE); } } diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ConfigurationsUpdateOnNodeSamples.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ConfigurationsUpdateOnNodeSamples.java index 52e231989de8..b29c5bee82b6 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ConfigurationsUpdateOnNodeSamples.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ConfigurationsUpdateOnNodeSamples.java @@ -6,25 +6,23 @@ import com.azure.resourcemanager.cosmosdbforpostgresql.fluent.models.ServerConfigurationInner; -/** Samples for Configurations UpdateOnNode. */ +/** + * Samples for Configurations UpdateOnNode. + */ public final class ConfigurationsUpdateOnNodeSamples { /* - * x-ms-original-file: specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/ConfigurationUpdateNode.json + * x-ms-original-file: + * specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-02-preview/examples/ + * ConfigurationUpdateNode.json */ /** * Sample code: Update single configuration of nodes. - * + * * @param manager Entry point to CosmosDBForPostgreSqlManager. */ public static void updateSingleConfigurationOfNodes( com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager manager) { - manager - .configurations() - .updateOnNode( - "TestResourceGroup", - "testcluster", - "array_nulls", - new ServerConfigurationInner().withValue("off"), - com.azure.core.util.Context.NONE); + manager.configurations().updateOnNode("TestResourceGroup", "testcluster", "array_nulls", + new ServerConfigurationInner().withValue("off"), com.azure.core.util.Context.NONE); } } diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/FirewallRulesCreateOrUpdateSamples.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/FirewallRulesCreateOrUpdateSamples.java index 814b438541cd..a36439fa8c93 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/FirewallRulesCreateOrUpdateSamples.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/FirewallRulesCreateOrUpdateSamples.java @@ -4,24 +4,23 @@ package com.azure.resourcemanager.cosmosdbforpostgresql.generated; -/** Samples for FirewallRules CreateOrUpdate. */ +/** + * Samples for FirewallRules CreateOrUpdate. + */ public final class FirewallRulesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/FirewallRuleCreate.json + * x-ms-original-file: + * specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-02-preview/examples/ + * FirewallRuleCreate.json */ /** * Sample code: Create a firewall rule of the cluster. - * + * * @param manager Entry point to CosmosDBForPostgreSqlManager. */ public static void createAFirewallRuleOfTheCluster( com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager manager) { - manager - .firewallRules() - .define("rule1") - .withExistingServerGroupsv2("TestGroup", "pgtestsvc4") - .withStartIpAddress("0.0.0.0") - .withEndIpAddress("255.255.255.255") - .create(); + manager.firewallRules().define("rule1").withExistingServerGroupsv2("TestGroup", "pgtestsvc4") + .withStartIpAddress("0.0.0.0").withEndIpAddress("255.255.255.255").create(); } } diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/FirewallRulesDeleteSamples.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/FirewallRulesDeleteSamples.java index de18999f9cf1..641df7f629a7 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/FirewallRulesDeleteSamples.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/FirewallRulesDeleteSamples.java @@ -4,14 +4,18 @@ package com.azure.resourcemanager.cosmosdbforpostgresql.generated; -/** Samples for FirewallRules Delete. */ +/** + * Samples for FirewallRules Delete. + */ public final class FirewallRulesDeleteSamples { /* - * x-ms-original-file: specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/FirewallRuleDelete.json + * x-ms-original-file: + * specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-02-preview/examples/ + * FirewallRuleDelete.json */ /** * Sample code: Delete the firewall rule of the cluster. - * + * * @param manager Entry point to CosmosDBForPostgreSqlManager. */ public static void deleteTheFirewallRuleOfTheCluster( diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/FirewallRulesGetSamples.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/FirewallRulesGetSamples.java index bbe1bf5ae658..39136341af7d 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/FirewallRulesGetSamples.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/FirewallRulesGetSamples.java @@ -4,14 +4,18 @@ package com.azure.resourcemanager.cosmosdbforpostgresql.generated; -/** Samples for FirewallRules Get. */ +/** + * Samples for FirewallRules Get. + */ public final class FirewallRulesGetSamples { /* - * x-ms-original-file: specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/FirewallRuleGet.json + * x-ms-original-file: + * specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-02-preview/examples/ + * FirewallRuleGet.json */ /** * Sample code: Get the firewall rule of the cluster. - * + * * @param manager Entry point to CosmosDBForPostgreSqlManager. */ public static void getTheFirewallRuleOfTheCluster( diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/FirewallRulesListByClusterSamples.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/FirewallRulesListByClusterSamples.java index 752f2e19d89c..2940fb272ffb 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/FirewallRulesListByClusterSamples.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/FirewallRulesListByClusterSamples.java @@ -4,14 +4,18 @@ package com.azure.resourcemanager.cosmosdbforpostgresql.generated; -/** Samples for FirewallRules ListByCluster. */ +/** + * Samples for FirewallRules ListByCluster. + */ public final class FirewallRulesListByClusterSamples { /* - * x-ms-original-file: specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/FirewallRuleListByCluster.json + * x-ms-original-file: + * specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-02-preview/examples/ + * FirewallRuleListByCluster.json */ /** * Sample code: List firewall rules of the cluster. - * + * * @param manager Entry point to CosmosDBForPostgreSqlManager. */ public static void listFirewallRulesOfTheCluster( diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/OperationsListSamples.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/OperationsListSamples.java index 290714e84d0a..087e2244470d 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/OperationsListSamples.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/OperationsListSamples.java @@ -4,14 +4,18 @@ package com.azure.resourcemanager.cosmosdbforpostgresql.generated; -/** Samples for Operations List. */ +/** + * Samples for Operations List. + */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/OperationList.json + * x-ms-original-file: + * specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-02-preview/examples/ + * OperationList.json */ /** * Sample code: List all available operations. - * + * * @param manager Entry point to CosmosDBForPostgreSqlManager. */ public static void listAllAvailableOperations( diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/PrivateEndpointConnectionsCreateOrUpdateSamples.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/PrivateEndpointConnectionsCreateOrUpdateSamples.java index f58ab7aefd6a..abf21499f25a 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/PrivateEndpointConnectionsCreateOrUpdateSamples.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/PrivateEndpointConnectionsCreateOrUpdateSamples.java @@ -7,25 +7,26 @@ import com.azure.resourcemanager.cosmosdbforpostgresql.models.PrivateEndpointServiceConnectionStatus; import com.azure.resourcemanager.cosmosdbforpostgresql.models.PrivateLinkServiceConnectionState; -/** Samples for PrivateEndpointConnections CreateOrUpdate. */ +/** + * Samples for PrivateEndpointConnections CreateOrUpdate. + */ public final class PrivateEndpointConnectionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/PrivateEndpointConnectionCreateOrUpdate.json + * x-ms-original-file: + * specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-02-preview/examples/ + * PrivateEndpointConnectionCreateOrUpdate.json */ /** * Sample code: Approves or Rejects a Private Endpoint Connection with a given name. - * + * * @param manager Entry point to CosmosDBForPostgreSqlManager. */ public static void approvesOrRejectsAPrivateEndpointConnectionWithAGivenName( com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager manager) { - manager - .privateEndpointConnections() - .define("private-endpoint-connection-name") + manager.privateEndpointConnections().define("private-endpoint-connection-name") .withExistingServerGroupsv2("TestGroup", "testcluster") .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionState() - .withStatus(PrivateEndpointServiceConnectionStatus.APPROVED) + new PrivateLinkServiceConnectionState().withStatus(PrivateEndpointServiceConnectionStatus.APPROVED) .withDescription("Approved by johndoe@contoso.com")) .create(); } diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/PrivateEndpointConnectionsDeleteSamples.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/PrivateEndpointConnectionsDeleteSamples.java index 1c7c0590f151..f65f5da0627f 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/PrivateEndpointConnectionsDeleteSamples.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/PrivateEndpointConnectionsDeleteSamples.java @@ -4,20 +4,23 @@ package com.azure.resourcemanager.cosmosdbforpostgresql.generated; -/** Samples for PrivateEndpointConnections Delete. */ +/** + * Samples for PrivateEndpointConnections Delete. + */ public final class PrivateEndpointConnectionsDeleteSamples { /* - * x-ms-original-file: specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/PrivateEndpointConnectionsDelete.json + * x-ms-original-file: + * specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-02-preview/examples/ + * PrivateEndpointConnectionsDelete.json */ /** * Sample code: Deletes a private endpoint connection with a given name. - * + * * @param manager Entry point to CosmosDBForPostgreSqlManager. */ public static void deletesAPrivateEndpointConnectionWithAGivenName( com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager manager) { - manager - .privateEndpointConnections() - .delete("TestGroup", "testcluster", "private-endpoint-connection-name", com.azure.core.util.Context.NONE); + manager.privateEndpointConnections().delete("TestGroup", "testcluster", "private-endpoint-connection-name", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/PrivateEndpointConnectionsGetSamples.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/PrivateEndpointConnectionsGetSamples.java index 3fa6d20b78d6..1f79c3d96e7f 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/PrivateEndpointConnectionsGetSamples.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/PrivateEndpointConnectionsGetSamples.java @@ -4,21 +4,23 @@ package com.azure.resourcemanager.cosmosdbforpostgresql.generated; -/** Samples for PrivateEndpointConnections Get. */ +/** + * Samples for PrivateEndpointConnections Get. + */ public final class PrivateEndpointConnectionsGetSamples { /* - * x-ms-original-file: specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/PrivateEndpointConnectionsGet.json + * x-ms-original-file: + * specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-02-preview/examples/ + * PrivateEndpointConnectionsGet.json */ /** * Sample code: Gets private endpoint connection. - * + * * @param manager Entry point to CosmosDBForPostgreSqlManager. */ public static void getsPrivateEndpointConnection( com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager manager) { - manager - .privateEndpointConnections() - .getWithResponse( - "TestGroup", "testcluster", "private-endpoint-connection-name", com.azure.core.util.Context.NONE); + manager.privateEndpointConnections().getWithResponse("TestGroup", "testcluster", + "private-endpoint-connection-name", com.azure.core.util.Context.NONE); } } diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/PrivateEndpointConnectionsListByClusterSamples.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/PrivateEndpointConnectionsListByClusterSamples.java index 2cc0b53c8b69..bb2fcb8b0697 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/PrivateEndpointConnectionsListByClusterSamples.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/PrivateEndpointConnectionsListByClusterSamples.java @@ -4,20 +4,23 @@ package com.azure.resourcemanager.cosmosdbforpostgresql.generated; -/** Samples for PrivateEndpointConnections ListByCluster. */ +/** + * Samples for PrivateEndpointConnections ListByCluster. + */ public final class PrivateEndpointConnectionsListByClusterSamples { /* - * x-ms-original-file: specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/PrivateEndpointConnectionsListByCluster.json + * x-ms-original-file: + * specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-02-preview/examples/ + * PrivateEndpointConnectionsListByCluster.json */ /** * Sample code: Gets list of private endpoint connections on a cluster. - * + * * @param manager Entry point to CosmosDBForPostgreSqlManager. */ public static void getsListOfPrivateEndpointConnectionsOnACluster( com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager manager) { - manager - .privateEndpointConnections() - .listByCluster("TestResourceGroup", "testcluster", com.azure.core.util.Context.NONE); + manager.privateEndpointConnections().listByCluster("TestResourceGroup", "testcluster", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/PrivateLinkResourcesGetSamples.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/PrivateLinkResourcesGetSamples.java index fbccae135930..9a20d5dfdddc 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/PrivateLinkResourcesGetSamples.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/PrivateLinkResourcesGetSamples.java @@ -4,20 +4,23 @@ package com.azure.resourcemanager.cosmosdbforpostgresql.generated; -/** Samples for PrivateLinkResources Get. */ +/** + * Samples for PrivateLinkResources Get. + */ public final class PrivateLinkResourcesGetSamples { /* - * x-ms-original-file: specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/PrivateLinkResourcesGet.json + * x-ms-original-file: + * specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-02-preview/examples/ + * PrivateLinkResourcesGet.json */ /** * Sample code: Gets a private link resource for cluster. - * + * * @param manager Entry point to CosmosDBForPostgreSqlManager. */ public static void getsAPrivateLinkResourceForCluster( com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager manager) { - manager - .privateLinkResources() - .getWithResponse("TestGroup", "testcluster", "plr", com.azure.core.util.Context.NONE); + manager.privateLinkResources().getWithResponse("TestGroup", "testcluster", "plr", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/PrivateLinkResourcesListByClusterSamples.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/PrivateLinkResourcesListByClusterSamples.java index 5567257b0d7f..8a9e5fc86510 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/PrivateLinkResourcesListByClusterSamples.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/PrivateLinkResourcesListByClusterSamples.java @@ -4,20 +4,23 @@ package com.azure.resourcemanager.cosmosdbforpostgresql.generated; -/** Samples for PrivateLinkResources ListByCluster. */ +/** + * Samples for PrivateLinkResources ListByCluster. + */ public final class PrivateLinkResourcesListByClusterSamples { /* - * x-ms-original-file: specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/PrivateLinkResourceListByCluster.json + * x-ms-original-file: + * specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-02-preview/examples/ + * PrivateLinkResourceListByCluster.json */ /** * Sample code: Gets the private link resources for cluster. - * + * * @param manager Entry point to CosmosDBForPostgreSqlManager. */ public static void getsThePrivateLinkResourcesForCluster( com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager manager) { - manager - .privateLinkResources() - .listByCluster("TestResourceGroup", "testcluster", com.azure.core.util.Context.NONE); + manager.privateLinkResources().listByCluster("TestResourceGroup", "testcluster", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/RolesCreateSamples.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/RolesCreateSamples.java index 5ca6f5b4b764..b205968bc953 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/RolesCreateSamples.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/RolesCreateSamples.java @@ -4,23 +4,23 @@ package com.azure.resourcemanager.cosmosdbforpostgresql.generated; -/** Samples for Roles Create. */ +/** + * Samples for Roles Create. + */ public final class RolesCreateSamples { /* - * x-ms-original-file: specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/RoleCreate.json + * x-ms-original-file: + * specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-02-preview/examples/ + * RoleCreate.json */ /** * Sample code: RoleCreate. - * + * * @param manager Entry point to CosmosDBForPostgreSqlManager. */ - public static void roleCreate( - com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager manager) { - manager - .roles() - .define("role1") - .withExistingServerGroupsv2("TestGroup", "pgtestsvc4") - .withPassword("password") + public static void + roleCreate(com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager manager) { + manager.roles().define("role1").withExistingServerGroupsv2("TestGroup", "pgtestsvc4").withPassword("password") .create(); } } diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/RolesDeleteSamples.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/RolesDeleteSamples.java index 1f9004e2df56..6e17fd06abba 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/RolesDeleteSamples.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/RolesDeleteSamples.java @@ -4,18 +4,22 @@ package com.azure.resourcemanager.cosmosdbforpostgresql.generated; -/** Samples for Roles Delete. */ +/** + * Samples for Roles Delete. + */ public final class RolesDeleteSamples { /* - * x-ms-original-file: specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/RoleDelete.json + * x-ms-original-file: + * specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-02-preview/examples/ + * RoleDelete.json */ /** * Sample code: RoleDelete. - * + * * @param manager Entry point to CosmosDBForPostgreSqlManager. */ - public static void roleDelete( - com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager manager) { + public static void + roleDelete(com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager manager) { manager.roles().delete("TestGroup", "pgtestsvc4", "role1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/RolesGetSamples.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/RolesGetSamples.java index 120232107110..ef1a036c1a02 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/RolesGetSamples.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/RolesGetSamples.java @@ -4,18 +4,22 @@ package com.azure.resourcemanager.cosmosdbforpostgresql.generated; -/** Samples for Roles Get. */ +/** + * Samples for Roles Get. + */ public final class RolesGetSamples { /* - * x-ms-original-file: specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/RoleGet.json + * x-ms-original-file: + * specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-02-preview/examples/ + * RoleGet.json */ /** * Sample code: Get the role of the cluster. - * + * * @param manager Entry point to CosmosDBForPostgreSqlManager. */ - public static void getTheRoleOfTheCluster( - com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager manager) { + public static void + getTheRoleOfTheCluster(com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager manager) { manager.roles().getWithResponse("TestGroup", "pgtestsvc4", "role1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/RolesListByClusterSamples.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/RolesListByClusterSamples.java index 3366ca569b9e..ce93876719b1 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/RolesListByClusterSamples.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/RolesListByClusterSamples.java @@ -4,14 +4,18 @@ package com.azure.resourcemanager.cosmosdbforpostgresql.generated; -/** Samples for Roles ListByCluster. */ +/** + * Samples for Roles ListByCluster. + */ public final class RolesListByClusterSamples { /* - * x-ms-original-file: specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/RoleListByCluster.json + * x-ms-original-file: + * specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-02-preview/examples/ + * RoleListByCluster.json */ /** * Sample code: RoleList. - * + * * @param manager Entry point to CosmosDBForPostgreSqlManager. */ public static void roleList(com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager manager) { diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ServersGetSamples.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ServersGetSamples.java index 788ed7f5f971..48190e6d6acf 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ServersGetSamples.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ServersGetSamples.java @@ -4,20 +4,23 @@ package com.azure.resourcemanager.cosmosdbforpostgresql.generated; -/** Samples for Servers Get. */ +/** + * Samples for Servers Get. + */ public final class ServersGetSamples { /* - * x-ms-original-file: specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/ServerGet.json + * x-ms-original-file: + * specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-02-preview/examples/ + * ServerGet.json */ /** * Sample code: Get the server of cluster. - * + * * @param manager Entry point to CosmosDBForPostgreSqlManager. */ - public static void getTheServerOfCluster( - com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager manager) { - manager - .servers() - .getWithResponse("TestGroup", "testcluster1", "testcluster1-c", com.azure.core.util.Context.NONE); + public static void + getTheServerOfCluster(com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager manager) { + manager.servers().getWithResponse("TestGroup", "testcluster1", "testcluster1-c", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ServersListByClusterSamples.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ServersListByClusterSamples.java index da1bb8715d88..c24d39c013d7 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ServersListByClusterSamples.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/samples/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ServersListByClusterSamples.java @@ -4,18 +4,22 @@ package com.azure.resourcemanager.cosmosdbforpostgresql.generated; -/** Samples for Servers ListByCluster. */ +/** + * Samples for Servers ListByCluster. + */ public final class ServersListByClusterSamples { /* - * x-ms-original-file: specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/ServerListByCluster.json + * x-ms-original-file: + * specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-02-preview/examples/ + * ServerListByCluster.json */ /** * Sample code: List servers of the cluster. - * + * * @param manager Entry point to CosmosDBForPostgreSqlManager. */ - public static void listServersOfTheCluster( - com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager manager) { + public static void + listServersOfTheCluster(com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager manager) { manager.servers().listByCluster("TestGroup", "testcluster1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ClusterConfigurationListResultTests.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ClusterConfigurationListResultTests.java index a455268a181b..1d8e7a5a2d1c 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ClusterConfigurationListResultTests.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ClusterConfigurationListResultTests.java @@ -15,36 +15,44 @@ public final class ClusterConfigurationListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ClusterConfigurationListResult model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"description\":\"tnwu\",\"dataType\":\"Numeric\",\"allowedValues\":\"zxufiz\",\"requiresRestart\":false,\"serverRoleGroupConfigurations\":[{\"role\":\"Coordinator\",\"value\":\"i\",\"defaultValue\":\"fidfvzw\",\"source\":\"uht\"}],\"provisioningState\":\"Canceled\"},\"id\":\"sdkf\",\"name\":\"hwxmnteiwa\",\"type\":\"pvkmijcmmxdcuf\"}],\"nextLink\":\"srp\"}") - .toObject(ClusterConfigurationListResult.class); - Assertions.assertEquals(false, model.value().get(0).requiresRestart()); - Assertions - .assertEquals(ServerRole.COORDINATOR, model.value().get(0).serverRoleGroupConfigurations().get(0).role()); - Assertions.assertEquals("i", model.value().get(0).serverRoleGroupConfigurations().get(0).value()); + ClusterConfigurationListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"description\":\"maajrmvdjwzrlo\",\"dataType\":\"Enumeration\",\"allowedValues\":\"whijcoejctbza\",\"requiresRestart\":true,\"serverRoleGroupConfigurations\":[{\"role\":\"Coordinator\",\"value\":\"cbkbfkg\",\"defaultValue\":\"dkexxppofm\",\"source\":\"x\"},{\"role\":\"Worker\",\"value\":\"jpgd\",\"defaultValue\":\"ocjjxhvpmouexh\",\"source\":\"xibqeojnx\"}],\"provisioningState\":\"Failed\"},\"id\":\"ddntwndei\",\"name\":\"btwnpzaoqvuhrhcf\",\"type\":\"cyddglmjthjqk\"},{\"properties\":{\"description\":\"eicxmqciwqvhkhi\",\"dataType\":\"Integer\",\"allowedValues\":\"dtopbob\",\"requiresRestart\":false,\"serverRoleGroupConfigurations\":[{\"role\":\"Coordinator\",\"value\":\"e\",\"defaultValue\":\"a\",\"source\":\"uhrzayvvt\"}],\"provisioningState\":\"Canceled\"},\"id\":\"f\",\"name\":\"iotkftutqxl\",\"type\":\"gxlefgugnxkrxd\"},{\"properties\":{\"description\":\"dt\",\"dataType\":\"Numeric\",\"allowedValues\":\"vqdra\",\"requiresRestart\":false,\"serverRoleGroupConfigurations\":[{\"role\":\"Coordinator\",\"value\":\"igeho\",\"defaultValue\":\"bowsk\",\"source\":\"yktz\"}],\"provisioningState\":\"Succeeded\"},\"id\":\"y\",\"name\":\"gqywgndrv\",\"type\":\"nhzgpphrcgyn\"},{\"properties\":{\"description\":\"pec\",\"dataType\":\"Boolean\",\"allowedValues\":\"coofsxlzev\",\"requiresRestart\":false,\"serverRoleGroupConfigurations\":[{\"role\":\"Worker\",\"value\":\"qabcypm\",\"defaultValue\":\"kwlzuvccfwnfn\",\"source\":\"cfionl\"},{\"role\":\"Worker\",\"value\":\"x\",\"defaultValue\":\"qgtz\",\"source\":\"pnqbqqwxrjfe\"},{\"role\":\"Coordinator\",\"value\":\"lnwsubisn\",\"defaultValue\":\"mpmngnzscxaqwoo\",\"source\":\"cbonqvpk\"},{\"role\":\"Worker\",\"value\":\"rxnjeaseipheofl\",\"defaultValue\":\"eyy\",\"source\":\"nj\"}],\"provisioningState\":\"InProgress\"},\"id\":\"tgrhpdjpjumas\",\"name\":\"azjpqyegualhbxxh\",\"type\":\"jj\"}],\"nextLink\":\"v\"}") + .toObject(ClusterConfigurationListResult.class); + Assertions.assertEquals(true, model.value().get(0).requiresRestart()); + Assertions.assertEquals(ServerRole.COORDINATOR, + model.value().get(0).serverRoleGroupConfigurations().get(0).role()); + Assertions.assertEquals("cbkbfkg", model.value().get(0).serverRoleGroupConfigurations().get(0).value()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ClusterConfigurationListResult model = - new ClusterConfigurationListResult() + ClusterConfigurationListResult model + = new ClusterConfigurationListResult() .withValue( - Arrays - .asList( - new ConfigurationInner() - .withRequiresRestart(false) - .withServerRoleGroupConfigurations( - Arrays - .asList( - new ServerRoleGroupConfiguration() - .withRole(ServerRole.COORDINATOR) - .withValue("i"))))); + Arrays.asList( + new ConfigurationInner().withRequiresRestart(true) + .withServerRoleGroupConfigurations(Arrays.asList( + new ServerRoleGroupConfiguration().withRole(ServerRole.COORDINATOR) + .withValue("cbkbfkg"), + new ServerRoleGroupConfiguration().withRole(ServerRole.WORKER).withValue("jpgd"))), + new ConfigurationInner().withRequiresRestart(false) + .withServerRoleGroupConfigurations(Arrays.asList( + new ServerRoleGroupConfiguration().withRole(ServerRole.COORDINATOR).withValue("e"))), + new ConfigurationInner().withRequiresRestart(false) + .withServerRoleGroupConfigurations(Arrays.asList(new ServerRoleGroupConfiguration() + .withRole(ServerRole.COORDINATOR).withValue("igeho"))), + new ConfigurationInner().withRequiresRestart(false) + .withServerRoleGroupConfigurations(Arrays.asList( + new ServerRoleGroupConfiguration().withRole(ServerRole.WORKER).withValue("qabcypm"), + new ServerRoleGroupConfiguration().withRole(ServerRole.WORKER).withValue("x"), + new ServerRoleGroupConfiguration().withRole(ServerRole.COORDINATOR) + .withValue("lnwsubisn"), + new ServerRoleGroupConfiguration().withRole(ServerRole.WORKER) + .withValue("rxnjeaseipheofl"))))); model = BinaryData.fromObject(model).toObject(ClusterConfigurationListResult.class); - Assertions.assertEquals(false, model.value().get(0).requiresRestart()); - Assertions - .assertEquals(ServerRole.COORDINATOR, model.value().get(0).serverRoleGroupConfigurations().get(0).role()); - Assertions.assertEquals("i", model.value().get(0).serverRoleGroupConfigurations().get(0).value()); + Assertions.assertEquals(true, model.value().get(0).requiresRestart()); + Assertions.assertEquals(ServerRole.COORDINATOR, + model.value().get(0).serverRoleGroupConfigurations().get(0).role()); + Assertions.assertEquals("cbkbfkg", model.value().get(0).serverRoleGroupConfigurations().get(0).value()); } } diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ClusterServerInnerTests.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ClusterServerInnerTests.java index b0d4e7d2bea3..ad1f1b07c0f4 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ClusterServerInnerTests.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ClusterServerInnerTests.java @@ -12,41 +12,33 @@ public final class ClusterServerInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ClusterServerInner model = - BinaryData - .fromString( - "{\"properties\":{\"fullyQualifiedDomainName\":\"atscmd\",\"role\":\"Worker\",\"state\":\"u\",\"haState\":\"uuvmkjozkrwfnd\",\"availabilityZone\":\"djpslw\",\"postgresqlVersion\":\"dpvwryoqpsoaccta\",\"citusVersion\":\"kljla\",\"serverEdition\":\"cr\",\"storageQuotaInMb\":1060950423,\"vCores\":1389039399,\"enableHa\":false,\"enablePublicIpAccess\":true,\"isReadOnly\":false,\"administratorLogin\":\"paojakhmsbzjh\"},\"id\":\"zevdphlx\",\"name\":\"olthqtrgqjbp\",\"type\":\"zfsinzgvf\"}") - .toObject(ClusterServerInner.class); - Assertions.assertEquals(ServerRole.WORKER, model.role()); - Assertions.assertEquals("djpslw", model.availabilityZone()); - Assertions.assertEquals("dpvwryoqpsoaccta", model.postgresqlVersion()); - Assertions.assertEquals("kljla", model.citusVersion()); - Assertions.assertEquals("cr", model.serverEdition()); - Assertions.assertEquals(1060950423, model.storageQuotaInMb()); - Assertions.assertEquals(1389039399, model.vCores()); - Assertions.assertEquals(false, model.enableHa()); + ClusterServerInner model = BinaryData.fromString( + "{\"properties\":{\"fullyQualifiedDomainName\":\"ksqrglssai\",\"role\":\"Coordinator\",\"state\":\"wnzlljfmppeeb\",\"haState\":\"gxsabkyq\",\"availabilityZone\":\"ujitcjcz\",\"postgresqlVersion\":\"evndh\",\"citusVersion\":\"wpdappdsbdkv\",\"serverEdition\":\"wjfeusnhutjel\",\"storageQuotaInMb\":391471833,\"vCores\":1969626150,\"enableHa\":true,\"enablePublicIpAccess\":false,\"isReadOnly\":true,\"administratorLogin\":\"atqxho\"},\"id\":\"geablgphuticndvk\",\"name\":\"ozwyiftyhxhuro\",\"type\":\"ftyxolniw\"}") + .toObject(ClusterServerInner.class); + Assertions.assertEquals(ServerRole.COORDINATOR, model.role()); + Assertions.assertEquals("ujitcjcz", model.availabilityZone()); + Assertions.assertEquals("evndh", model.postgresqlVersion()); + Assertions.assertEquals("wpdappdsbdkv", model.citusVersion()); + Assertions.assertEquals("wjfeusnhutjel", model.serverEdition()); + Assertions.assertEquals(391471833, model.storageQuotaInMb()); + Assertions.assertEquals(1969626150, model.vCores()); + Assertions.assertEquals(true, model.enableHa()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ClusterServerInner model = - new ClusterServerInner() - .withRole(ServerRole.WORKER) - .withAvailabilityZone("djpslw") - .withPostgresqlVersion("dpvwryoqpsoaccta") - .withCitusVersion("kljla") - .withServerEdition("cr") - .withStorageQuotaInMb(1060950423) - .withVCores(1389039399) - .withEnableHa(false); + ClusterServerInner model + = new ClusterServerInner().withRole(ServerRole.COORDINATOR).withAvailabilityZone("ujitcjcz") + .withPostgresqlVersion("evndh").withCitusVersion("wpdappdsbdkv").withServerEdition("wjfeusnhutjel") + .withStorageQuotaInMb(391471833).withVCores(1969626150).withEnableHa(true); model = BinaryData.fromObject(model).toObject(ClusterServerInner.class); - Assertions.assertEquals(ServerRole.WORKER, model.role()); - Assertions.assertEquals("djpslw", model.availabilityZone()); - Assertions.assertEquals("dpvwryoqpsoaccta", model.postgresqlVersion()); - Assertions.assertEquals("kljla", model.citusVersion()); - Assertions.assertEquals("cr", model.serverEdition()); - Assertions.assertEquals(1060950423, model.storageQuotaInMb()); - Assertions.assertEquals(1389039399, model.vCores()); - Assertions.assertEquals(false, model.enableHa()); + Assertions.assertEquals(ServerRole.COORDINATOR, model.role()); + Assertions.assertEquals("ujitcjcz", model.availabilityZone()); + Assertions.assertEquals("evndh", model.postgresqlVersion()); + Assertions.assertEquals("wpdappdsbdkv", model.citusVersion()); + Assertions.assertEquals("wjfeusnhutjel", model.serverEdition()); + Assertions.assertEquals(391471833, model.storageQuotaInMb()); + Assertions.assertEquals(1969626150, model.vCores()); + Assertions.assertEquals(true, model.enableHa()); } } diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ClusterServerListResultTests.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ClusterServerListResultTests.java index 0d44345015e1..7776fd1fe7a5 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ClusterServerListResultTests.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ClusterServerListResultTests.java @@ -14,54 +14,42 @@ public final class ClusterServerListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ClusterServerListResult model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"fullyQualifiedDomainName\":\"mt\",\"role\":\"Worker\",\"state\":\"ryrtihfxtijbpzv\",\"haState\":\"wzsymglzufcy\",\"availabilityZone\":\"ohdbihanufh\",\"postgresqlVersion\":\"bj\",\"citusVersion\":\"a\",\"serverEdition\":\"th\",\"storageQuotaInMb\":731883185,\"vCores\":676674728,\"enableHa\":true,\"enablePublicIpAccess\":false,\"isReadOnly\":true,\"administratorLogin\":\"czbysc\"},\"id\":\"q\",\"name\":\"uhivyqniw\",\"type\":\"ybrk\"},{\"properties\":{\"fullyQualifiedDomainName\":\"umjgrtfwvuk\",\"role\":\"Worker\",\"state\":\"dcc\",\"haState\":\"h\",\"availabilityZone\":\"cnyejhkryhtnapcz\",\"postgresqlVersion\":\"okjye\",\"citusVersion\":\"kvnipjoxz\",\"serverEdition\":\"chgejspodm\",\"storageQuotaInMb\":1543997460,\"vCores\":1345546955,\"enableHa\":false,\"enablePublicIpAccess\":false,\"isReadOnly\":true,\"administratorLogin\":\"ahuxinpm\"},\"id\":\"jaqwixjsp\",\"name\":\"ozvcput\",\"type\":\"gjvw\"}]}") - .toObject(ClusterServerListResult.class); - Assertions.assertEquals(ServerRole.WORKER, model.value().get(0).role()); - Assertions.assertEquals("ohdbihanufh", model.value().get(0).availabilityZone()); - Assertions.assertEquals("bj", model.value().get(0).postgresqlVersion()); - Assertions.assertEquals("a", model.value().get(0).citusVersion()); - Assertions.assertEquals("th", model.value().get(0).serverEdition()); - Assertions.assertEquals(731883185, model.value().get(0).storageQuotaInMb()); - Assertions.assertEquals(676674728, model.value().get(0).vCores()); - Assertions.assertEquals(true, model.value().get(0).enableHa()); + ClusterServerListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"fullyQualifiedDomainName\":\"pzvgnwzsymglzufc\",\"role\":\"Coordinator\",\"state\":\"hdbihan\",\"haState\":\"hfcbjysa\",\"availabilityZone\":\"th\",\"postgresqlVersion\":\"hab\",\"citusVersion\":\"pikxwczbyscnpqxu\",\"serverEdition\":\"vyq\",\"storageQuotaInMb\":649847293,\"vCores\":992034682,\"enableHa\":false,\"enablePublicIpAccess\":false,\"isReadOnly\":true,\"administratorLogin\":\"mjgr\"},\"id\":\"wvukx\",\"name\":\"audccsnhs\",\"type\":\"cnyejhkryhtnapcz\"},{\"properties\":{\"fullyQualifiedDomainName\":\"kjyemkk\",\"role\":\"Worker\",\"state\":\"joxzjnchgejspodm\",\"haState\":\"lzydehojwyahux\",\"availabilityZone\":\"pmqnja\",\"postgresqlVersion\":\"ixjsprozvcputeg\",\"citusVersion\":\"wmfdatscmdvpjhul\",\"serverEdition\":\"uvm\",\"storageQuotaInMb\":2017964411,\"vCores\":37430274,\"enableHa\":true,\"enablePublicIpAccess\":true,\"isReadOnly\":false,\"administratorLogin\":\"djpslw\"},\"id\":\"dpvwryoqpsoaccta\",\"name\":\"akl\",\"type\":\"lahbcryff\"},{\"properties\":{\"fullyQualifiedDomainName\":\"osygex\",\"role\":\"Worker\",\"state\":\"akhmsbzjhcrz\",\"haState\":\"dphlxaolt\",\"availabilityZone\":\"trg\",\"postgresqlVersion\":\"bpf\",\"citusVersion\":\"s\",\"serverEdition\":\"zgvfcjrwz\",\"storageQuotaInMb\":1151751299,\"vCores\":1189950130,\"enableHa\":true,\"enablePublicIpAccess\":true,\"isReadOnly\":true,\"administratorLogin\":\"zitonpeqfpjkjl\"},\"id\":\"fpdvhpfxxypi\",\"name\":\"i\",\"type\":\"mayhuybbkpodepoo\"},{\"properties\":{\"fullyQualifiedDomainName\":\"uvamiheognarxzxt\",\"role\":\"Coordinator\",\"state\":\"usivye\",\"haState\":\"ciqihnhung\",\"availabilityZone\":\"jzrnf\",\"postgresqlVersion\":\"xgispemvtzfkufu\",\"citusVersion\":\"jofxqe\",\"serverEdition\":\"jaeq\",\"storageQuotaInMb\":1946289710,\"vCores\":158340850,\"enableHa\":false,\"enablePublicIpAccess\":true,\"isReadOnly\":true,\"administratorLogin\":\"qulngsntnbybkzgc\"},\"id\":\"wclxxwrl\",\"name\":\"douskcqvkocrcjdk\",\"type\":\"tnhxbn\"}]}") + .toObject(ClusterServerListResult.class); + Assertions.assertEquals(ServerRole.COORDINATOR, model.value().get(0).role()); + Assertions.assertEquals("th", model.value().get(0).availabilityZone()); + Assertions.assertEquals("hab", model.value().get(0).postgresqlVersion()); + Assertions.assertEquals("pikxwczbyscnpqxu", model.value().get(0).citusVersion()); + Assertions.assertEquals("vyq", model.value().get(0).serverEdition()); + Assertions.assertEquals(649847293, model.value().get(0).storageQuotaInMb()); + Assertions.assertEquals(992034682, model.value().get(0).vCores()); + Assertions.assertEquals(false, model.value().get(0).enableHa()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ClusterServerListResult model = - new ClusterServerListResult() - .withValue( - Arrays - .asList( - new ClusterServerInner() - .withRole(ServerRole.WORKER) - .withAvailabilityZone("ohdbihanufh") - .withPostgresqlVersion("bj") - .withCitusVersion("a") - .withServerEdition("th") - .withStorageQuotaInMb(731883185) - .withVCores(676674728) - .withEnableHa(true), - new ClusterServerInner() - .withRole(ServerRole.WORKER) - .withAvailabilityZone("cnyejhkryhtnapcz") - .withPostgresqlVersion("okjye") - .withCitusVersion("kvnipjoxz") - .withServerEdition("chgejspodm") - .withStorageQuotaInMb(1543997460) - .withVCores(1345546955) - .withEnableHa(false))); + ClusterServerListResult model = new ClusterServerListResult().withValue(Arrays.asList( + new ClusterServerInner().withRole(ServerRole.COORDINATOR).withAvailabilityZone("th") + .withPostgresqlVersion("hab").withCitusVersion("pikxwczbyscnpqxu").withServerEdition("vyq") + .withStorageQuotaInMb(649847293).withVCores(992034682).withEnableHa(false), + new ClusterServerInner().withRole(ServerRole.WORKER).withAvailabilityZone("pmqnja") + .withPostgresqlVersion("ixjsprozvcputeg").withCitusVersion("wmfdatscmdvpjhul").withServerEdition("uvm") + .withStorageQuotaInMb(2017964411).withVCores(37430274).withEnableHa(true), + new ClusterServerInner().withRole(ServerRole.WORKER).withAvailabilityZone("trg") + .withPostgresqlVersion("bpf").withCitusVersion("s").withServerEdition("zgvfcjrwz") + .withStorageQuotaInMb(1151751299).withVCores(1189950130).withEnableHa(true), + new ClusterServerInner().withRole(ServerRole.COORDINATOR).withAvailabilityZone("jzrnf") + .withPostgresqlVersion("xgispemvtzfkufu").withCitusVersion("jofxqe").withServerEdition("jaeq") + .withStorageQuotaInMb(1946289710).withVCores(158340850).withEnableHa(false))); model = BinaryData.fromObject(model).toObject(ClusterServerListResult.class); - Assertions.assertEquals(ServerRole.WORKER, model.value().get(0).role()); - Assertions.assertEquals("ohdbihanufh", model.value().get(0).availabilityZone()); - Assertions.assertEquals("bj", model.value().get(0).postgresqlVersion()); - Assertions.assertEquals("a", model.value().get(0).citusVersion()); - Assertions.assertEquals("th", model.value().get(0).serverEdition()); - Assertions.assertEquals(731883185, model.value().get(0).storageQuotaInMb()); - Assertions.assertEquals(676674728, model.value().get(0).vCores()); - Assertions.assertEquals(true, model.value().get(0).enableHa()); + Assertions.assertEquals(ServerRole.COORDINATOR, model.value().get(0).role()); + Assertions.assertEquals("th", model.value().get(0).availabilityZone()); + Assertions.assertEquals("hab", model.value().get(0).postgresqlVersion()); + Assertions.assertEquals("pikxwczbyscnpqxu", model.value().get(0).citusVersion()); + Assertions.assertEquals("vyq", model.value().get(0).serverEdition()); + Assertions.assertEquals(649847293, model.value().get(0).storageQuotaInMb()); + Assertions.assertEquals(992034682, model.value().get(0).vCores()); + Assertions.assertEquals(false, model.value().get(0).enableHa()); } } diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ClusterServerPropertiesTests.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ClusterServerPropertiesTests.java index b8065e9f2e33..f1f0250ddf8a 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ClusterServerPropertiesTests.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ClusterServerPropertiesTests.java @@ -12,41 +12,33 @@ public final class ClusterServerPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ClusterServerProperties model = - BinaryData - .fromString( - "{\"fullyQualifiedDomainName\":\"rwzoxxjtfelluwf\",\"role\":\"Coordinator\",\"state\":\"np\",\"haState\":\"fpjkjlxofp\",\"availabilityZone\":\"hpf\",\"postgresqlVersion\":\"ypininm\",\"citusVersion\":\"huyb\",\"serverEdition\":\"podepoo\",\"storageQuotaInMb\":895630833,\"vCores\":1290742637,\"enableHa\":false,\"enablePublicIpAccess\":true,\"isReadOnly\":true,\"administratorLogin\":\"narxzxtheotus\"}") - .toObject(ClusterServerProperties.class); - Assertions.assertEquals("podepoo", model.serverEdition()); - Assertions.assertEquals(895630833, model.storageQuotaInMb()); - Assertions.assertEquals(1290742637, model.vCores()); + ClusterServerProperties model = BinaryData.fromString( + "{\"fullyQualifiedDomainName\":\"cukjf\",\"role\":\"Coordinator\",\"state\":\"w\",\"haState\":\"lryplwckbasyy\",\"availabilityZone\":\"ddhsgcbacphe\",\"postgresqlVersion\":\"ot\",\"citusVersion\":\"qgoulznd\",\"serverEdition\":\"kwy\",\"storageQuotaInMb\":1581994668,\"vCores\":1308251370,\"enableHa\":false,\"enablePublicIpAccess\":true,\"isReadOnly\":false,\"administratorLogin\":\"keqsrxybzqqedq\"}") + .toObject(ClusterServerProperties.class); + Assertions.assertEquals("kwy", model.serverEdition()); + Assertions.assertEquals(1581994668, model.storageQuotaInMb()); + Assertions.assertEquals(1308251370, model.vCores()); Assertions.assertEquals(false, model.enableHa()); Assertions.assertEquals(ServerRole.COORDINATOR, model.role()); - Assertions.assertEquals("hpf", model.availabilityZone()); - Assertions.assertEquals("ypininm", model.postgresqlVersion()); - Assertions.assertEquals("huyb", model.citusVersion()); + Assertions.assertEquals("ddhsgcbacphe", model.availabilityZone()); + Assertions.assertEquals("ot", model.postgresqlVersion()); + Assertions.assertEquals("qgoulznd", model.citusVersion()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ClusterServerProperties model = - new ClusterServerProperties() - .withServerEdition("podepoo") - .withStorageQuotaInMb(895630833) - .withVCores(1290742637) - .withEnableHa(false) - .withRole(ServerRole.COORDINATOR) - .withAvailabilityZone("hpf") - .withPostgresqlVersion("ypininm") - .withCitusVersion("huyb"); + ClusterServerProperties model + = new ClusterServerProperties().withServerEdition("kwy").withStorageQuotaInMb(1581994668) + .withVCores(1308251370).withEnableHa(false).withRole(ServerRole.COORDINATOR) + .withAvailabilityZone("ddhsgcbacphe").withPostgresqlVersion("ot").withCitusVersion("qgoulznd"); model = BinaryData.fromObject(model).toObject(ClusterServerProperties.class); - Assertions.assertEquals("podepoo", model.serverEdition()); - Assertions.assertEquals(895630833, model.storageQuotaInMb()); - Assertions.assertEquals(1290742637, model.vCores()); + Assertions.assertEquals("kwy", model.serverEdition()); + Assertions.assertEquals(1581994668, model.storageQuotaInMb()); + Assertions.assertEquals(1308251370, model.vCores()); Assertions.assertEquals(false, model.enableHa()); Assertions.assertEquals(ServerRole.COORDINATOR, model.role()); - Assertions.assertEquals("hpf", model.availabilityZone()); - Assertions.assertEquals("ypininm", model.postgresqlVersion()); - Assertions.assertEquals("huyb", model.citusVersion()); + Assertions.assertEquals("ddhsgcbacphe", model.availabilityZone()); + Assertions.assertEquals("ot", model.postgresqlVersion()); + Assertions.assertEquals("qgoulznd", model.citusVersion()); } } diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ClustersCheckNameAvailabilityWithResponseMockTests.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ClustersCheckNameAvailabilityWithResponseMockTests.java index b4fe74131b6b..39b8f62da074 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ClustersCheckNameAvailabilityWithResponseMockTests.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ClustersCheckNameAvailabilityWithResponseMockTests.java @@ -31,45 +31,30 @@ public void testCheckNameAvailabilityWithResponse() throws Exception { HttpResponse httpResponse = Mockito.mock(HttpResponse.class); ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - String responseStr = - "{\"message\":\"notyfjfcnjbkcn\",\"nameAvailable\":true,\"name\":\"ttkphywpnvjtoqne\",\"type\":\"clfp\"}"; + String responseStr + = "{\"message\":\"cugicjoox\",\"nameAvailable\":true,\"name\":\"wpucwwfvovbv\",\"type\":\"uecivyhz\"}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) + Mockito.when(httpResponse.getBody()) .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) + Mockito.when(httpResponse.getBodyAsByteArray()) .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); + Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { + Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); + return Mono.just(httpResponse); + })); - CosmosDBForPostgreSqlManager manager = - CosmosDBForPostgreSqlManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + CosmosDBForPostgreSqlManager manager = CosmosDBForPostgreSqlManager.configure().withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); - NameAvailability response = - manager - .clusters() - .checkNameAvailabilityWithResponse( - new NameAvailabilityRequest().withName("eil"), com.azure.core.util.Context.NONE) - .getValue(); + NameAvailability response = manager.clusters().checkNameAvailabilityWithResponse( + new NameAvailabilityRequest().withName("hashsfwxosow"), com.azure.core.util.Context.NONE).getValue(); - Assertions.assertEquals("notyfjfcnjbkcn", response.message()); + Assertions.assertEquals("cugicjoox", response.message()); Assertions.assertEquals(true, response.nameAvailable()); - Assertions.assertEquals("ttkphywpnvjtoqne", response.name()); - Assertions.assertEquals("clfp", response.type()); + Assertions.assertEquals("wpucwwfvovbv", response.name()); + Assertions.assertEquals("uecivyhz", response.type()); } } diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ClustersDeleteMockTests.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ClustersDeleteMockTests.java index 128997b17809..5d2c3f8960cb 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ClustersDeleteMockTests.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ClustersDeleteMockTests.java @@ -32,30 +32,20 @@ public void testDelete() throws Exception { Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) + Mockito.when(httpResponse.getBody()) .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) + Mockito.when(httpResponse.getBodyAsByteArray()) .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - CosmosDBForPostgreSqlManager manager = - CosmosDBForPostgreSqlManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.clusters().delete("fhvpesaps", "rdqmhjjdhtldwkyz", com.azure.core.util.Context.NONE); + Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { + Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); + return Mono.just(httpResponse); + })); + + CosmosDBForPostgreSqlManager manager = CosmosDBForPostgreSqlManager.configure().withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); + + manager.clusters().delete("vfadmws", "crgvxpvgom", com.azure.core.util.Context.NONE); + } } diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ClustersStartMockTests.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ClustersStartMockTests.java index 1c17aab32826..8b3c03a9e5ab 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ClustersStartMockTests.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ClustersStartMockTests.java @@ -32,30 +32,20 @@ public void testStart() throws Exception { Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) + Mockito.when(httpResponse.getBody()) .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) + Mockito.when(httpResponse.getBodyAsByteArray()) .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - CosmosDBForPostgreSqlManager manager = - CosmosDBForPostgreSqlManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.clusters().start("uutkncw", "cwsvlxotog", com.azure.core.util.Context.NONE); + Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { + Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); + return Mono.just(httpResponse); + })); + + CosmosDBForPostgreSqlManager manager = CosmosDBForPostgreSqlManager.configure().withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); + + manager.clusters().start("lf", "isgwbnbbeldawkz", com.azure.core.util.Context.NONE); + } } diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ClustersStopMockTests.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ClustersStopMockTests.java index 9b2b9a1f4be9..33da145ded6f 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ClustersStopMockTests.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ClustersStopMockTests.java @@ -32,30 +32,20 @@ public void testStop() throws Exception { Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) + Mockito.when(httpResponse.getBody()) .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) + Mockito.when(httpResponse.getBodyAsByteArray()) .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - CosmosDBForPostgreSqlManager manager = - CosmosDBForPostgreSqlManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.clusters().stop("wrupqsxvnmicykvc", "o", com.azure.core.util.Context.NONE); + Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { + Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); + return Mono.just(httpResponse); + })); + + CosmosDBForPostgreSqlManager manager = CosmosDBForPostgreSqlManager.configure().withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); + + manager.clusters().stop("ali", "urqhaka", com.azure.core.util.Context.NONE); + } } diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ConfigurationInnerTests.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ConfigurationInnerTests.java index 904ff4e66452..6d88c7cd8a25 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ConfigurationInnerTests.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ConfigurationInnerTests.java @@ -14,29 +14,22 @@ public final class ConfigurationInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ConfigurationInner model = - BinaryData - .fromString( - "{\"properties\":{\"description\":\"idnsezcxtb\",\"dataType\":\"Numeric\",\"allowedValues\":\"yc\",\"requiresRestart\":true,\"serverRoleGroupConfigurations\":[{\"role\":\"Worker\",\"value\":\"mdwzjeiachboo\",\"defaultValue\":\"lnrosfqp\",\"source\":\"ehzzvypyqrim\"},{\"role\":\"Worker\",\"value\":\"npvswjdkirso\",\"defaultValue\":\"qxhcrmn\",\"source\":\"jtckwhdso\"}],\"provisioningState\":\"Succeeded\"},\"id\":\"i\",\"name\":\"jxsqwpgrjbz\",\"type\":\"orcjxvsnby\"}") - .toObject(ConfigurationInner.class); + ConfigurationInner model = BinaryData.fromString( + "{\"properties\":{\"description\":\"gwdslfhotwm\",\"dataType\":\"Integer\",\"allowedValues\":\"wlbjnpgacftade\",\"requiresRestart\":true,\"serverRoleGroupConfigurations\":[{\"role\":\"Worker\",\"value\":\"yfsoppu\",\"defaultValue\":\"esnzwde\",\"source\":\"avo\"},{\"role\":\"Worker\",\"value\":\"zdmohctbqvu\",\"defaultValue\":\"xdn\",\"source\":\"vo\"}],\"provisioningState\":\"InProgress\"},\"id\":\"jugwdkcglhsl\",\"name\":\"zj\",\"type\":\"yggdtjixh\"}") + .toObject(ConfigurationInner.class); Assertions.assertEquals(true, model.requiresRestart()); Assertions.assertEquals(ServerRole.WORKER, model.serverRoleGroupConfigurations().get(0).role()); - Assertions.assertEquals("mdwzjeiachboo", model.serverRoleGroupConfigurations().get(0).value()); + Assertions.assertEquals("yfsoppu", model.serverRoleGroupConfigurations().get(0).value()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ConfigurationInner model = - new ConfigurationInner() - .withRequiresRestart(true) - .withServerRoleGroupConfigurations( - Arrays - .asList( - new ServerRoleGroupConfiguration().withRole(ServerRole.WORKER).withValue("mdwzjeiachboo"), - new ServerRoleGroupConfiguration().withRole(ServerRole.WORKER).withValue("npvswjdkirso"))); + ConfigurationInner model = new ConfigurationInner().withRequiresRestart(true).withServerRoleGroupConfigurations( + Arrays.asList(new ServerRoleGroupConfiguration().withRole(ServerRole.WORKER).withValue("yfsoppu"), + new ServerRoleGroupConfiguration().withRole(ServerRole.WORKER).withValue("zdmohctbqvu"))); model = BinaryData.fromObject(model).toObject(ConfigurationInner.class); Assertions.assertEquals(true, model.requiresRestart()); Assertions.assertEquals(ServerRole.WORKER, model.serverRoleGroupConfigurations().get(0).role()); - Assertions.assertEquals("mdwzjeiachboo", model.serverRoleGroupConfigurations().get(0).value()); + Assertions.assertEquals("yfsoppu", model.serverRoleGroupConfigurations().get(0).value()); } } diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ConfigurationPropertiesTests.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ConfigurationPropertiesTests.java index 124f0efbb68c..c13a14f6512e 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ConfigurationPropertiesTests.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ConfigurationPropertiesTests.java @@ -14,32 +14,24 @@ public final class ConfigurationPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ConfigurationProperties model = - BinaryData - .fromString( - "{\"description\":\"abnmocpcyshu\",\"dataType\":\"Enumeration\",\"allowedValues\":\"bl\",\"requiresRestart\":true,\"serverRoleGroupConfigurations\":[{\"role\":\"Worker\",\"value\":\"toqcjmklja\",\"defaultValue\":\"qidtqajzyu\",\"source\":\"kudjkrlkhb\"},{\"role\":\"Worker\",\"value\":\"fepgzgq\",\"defaultValue\":\"zloc\",\"source\":\"c\"},{\"role\":\"Coordinator\",\"value\":\"ierhhbcsglummaj\",\"defaultValue\":\"aodxo\",\"source\":\"bdxkqpxokaj\"}],\"provisioningState\":\"Canceled\"}") - .toObject(ConfigurationProperties.class); + ConfigurationProperties model = BinaryData.fromString( + "{\"description\":\"uofqwe\",\"dataType\":\"Enumeration\",\"allowedValues\":\"enevfyexfwhybci\",\"requiresRestart\":true,\"serverRoleGroupConfigurations\":[{\"role\":\"Coordinator\",\"value\":\"c\",\"defaultValue\":\"tynnaamdectehfi\",\"source\":\"cj\"},{\"role\":\"Worker\",\"value\":\"pvhez\",\"defaultValue\":\"gqhcjrefovg\",\"source\":\"qsl\"},{\"role\":\"Worker\",\"value\":\"yvxyqjp\",\"defaultValue\":\"attpngjcrcczsq\",\"source\":\"hvmdajvnysounq\"}],\"provisioningState\":\"Succeeded\"}") + .toObject(ConfigurationProperties.class); Assertions.assertEquals(true, model.requiresRestart()); - Assertions.assertEquals(ServerRole.WORKER, model.serverRoleGroupConfigurations().get(0).role()); - Assertions.assertEquals("toqcjmklja", model.serverRoleGroupConfigurations().get(0).value()); + Assertions.assertEquals(ServerRole.COORDINATOR, model.serverRoleGroupConfigurations().get(0).role()); + Assertions.assertEquals("c", model.serverRoleGroupConfigurations().get(0).value()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ConfigurationProperties model = - new ConfigurationProperties() - .withRequiresRestart(true) - .withServerRoleGroupConfigurations( - Arrays - .asList( - new ServerRoleGroupConfiguration().withRole(ServerRole.WORKER).withValue("toqcjmklja"), - new ServerRoleGroupConfiguration().withRole(ServerRole.WORKER).withValue("fepgzgq"), - new ServerRoleGroupConfiguration() - .withRole(ServerRole.COORDINATOR) - .withValue("ierhhbcsglummaj"))); + ConfigurationProperties model + = new ConfigurationProperties().withRequiresRestart(true).withServerRoleGroupConfigurations( + Arrays.asList(new ServerRoleGroupConfiguration().withRole(ServerRole.COORDINATOR).withValue("c"), + new ServerRoleGroupConfiguration().withRole(ServerRole.WORKER).withValue("pvhez"), + new ServerRoleGroupConfiguration().withRole(ServerRole.WORKER).withValue("yvxyqjp"))); model = BinaryData.fromObject(model).toObject(ConfigurationProperties.class); Assertions.assertEquals(true, model.requiresRestart()); - Assertions.assertEquals(ServerRole.WORKER, model.serverRoleGroupConfigurations().get(0).role()); - Assertions.assertEquals("toqcjmklja", model.serverRoleGroupConfigurations().get(0).value()); + Assertions.assertEquals(ServerRole.COORDINATOR, model.serverRoleGroupConfigurations().get(0).role()); + Assertions.assertEquals("c", model.serverRoleGroupConfigurations().get(0).value()); } } diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ConfigurationsGetCoordinatorWithResponseMockTests.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ConfigurationsGetCoordinatorWithResponseMockTests.java index 1b4e21838624..bd0f2a6545c5 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ConfigurationsGetCoordinatorWithResponseMockTests.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ConfigurationsGetCoordinatorWithResponseMockTests.java @@ -30,42 +30,28 @@ public void testGetCoordinatorWithResponse() throws Exception { HttpResponse httpResponse = Mockito.mock(HttpResponse.class); ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - String responseStr = - "{\"properties\":{\"value\":\"vpgylgqgitxmed\",\"source\":\"c\",\"description\":\"ynqwwncwzzhxgk\",\"defaultValue\":\"mgucna\",\"dataType\":\"Boolean\",\"allowedValues\":\"oellwp\",\"requiresRestart\":false,\"provisioningState\":\"InProgress\"},\"id\":\"fqbuaceopzf\",\"name\":\"rhhuaopppcqeqx\",\"type\":\"lzdahzxctobgbkdm\"}"; + String responseStr + = "{\"properties\":{\"value\":\"bsrfbj\",\"source\":\"twss\",\"description\":\"ftpvjzbexil\",\"defaultValue\":\"nfqqnvwp\",\"dataType\":\"Integer\",\"allowedValues\":\"ruoujmk\",\"requiresRestart\":false,\"provisioningState\":\"Failed\"},\"id\":\"tjrybnwjewgdr\",\"name\":\"ervnaenqpehi\",\"type\":\"doy\"}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) + Mockito.when(httpResponse.getBody()) .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) + Mockito.when(httpResponse.getBodyAsByteArray()) .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); + Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { + Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); + return Mono.just(httpResponse); + })); - CosmosDBForPostgreSqlManager manager = - CosmosDBForPostgreSqlManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + CosmosDBForPostgreSqlManager manager = CosmosDBForPostgreSqlManager.configure().withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); - ServerConfiguration response = - manager - .configurations() - .getCoordinatorWithResponse( - "tfolhbnx", "nalaulppg", "dtpnapnyiropuhp", com.azure.core.util.Context.NONE) - .getValue(); + ServerConfiguration response = manager.configurations() + .getCoordinatorWithResponse("shqjohxcrsbf", "vasrruvwb", "sqfsubcgjbirxb", com.azure.core.util.Context.NONE) + .getValue(); - Assertions.assertEquals("vpgylgqgitxmed", response.value()); + Assertions.assertEquals("bsrfbj", response.value()); } } diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ConfigurationsGetNodeWithResponseMockTests.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ConfigurationsGetNodeWithResponseMockTests.java index dbf8a169b5d3..a55aa3ca12b4 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ConfigurationsGetNodeWithResponseMockTests.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ConfigurationsGetNodeWithResponseMockTests.java @@ -30,42 +30,27 @@ public void testGetNodeWithResponse() throws Exception { HttpResponse httpResponse = Mockito.mock(HttpResponse.class); ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - String responseStr = - "{\"properties\":{\"value\":\"oygmift\",\"source\":\"zdnds\",\"description\":\"nayqi\",\"defaultValue\":\"nduhavhqlkthum\",\"dataType\":\"Enumeration\",\"allowedValues\":\"bgycduiertgccym\",\"requiresRestart\":true,\"provisioningState\":\"InProgress\"},\"id\":\"slqlfmmdn\",\"name\":\"bglzpswi\",\"type\":\"d\"}"; + String responseStr + = "{\"properties\":{\"value\":\"onz\",\"source\":\"sikvmkqzeqqkdlt\",\"description\":\"xmhhvhgureo\",\"defaultValue\":\"wobdagxtibqdx\",\"dataType\":\"Integer\",\"allowedValues\":\"kbogqxndlkzgx\",\"requiresRestart\":false,\"provisioningState\":\"InProgress\"},\"id\":\"bpodxunkbebxm\",\"name\":\"byyntwlrbqt\",\"type\":\"oievseotgqrlltm\"}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) + Mockito.when(httpResponse.getBody()) .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) + Mockito.when(httpResponse.getBodyAsByteArray()) .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); + Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { + Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); + return Mono.just(httpResponse); + })); - CosmosDBForPostgreSqlManager manager = - CosmosDBForPostgreSqlManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + CosmosDBForPostgreSqlManager manager = CosmosDBForPostgreSqlManager.configure().withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); - ServerConfiguration response = - manager - .configurations() - .getNodeWithResponse( - "taruoujmkcj", "wqytjrybnwjewgdr", "ervnaenqpehi", com.azure.core.util.Context.NONE) - .getValue(); + ServerConfiguration response = manager.configurations() + .getNodeWithResponse("nkww", "pp", "flcxoga", com.azure.core.util.Context.NONE).getValue(); - Assertions.assertEquals("oygmift", response.value()); + Assertions.assertEquals("onz", response.value()); } } diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ConfigurationsGetWithResponseMockTests.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ConfigurationsGetWithResponseMockTests.java index 63d1ad6ecc93..a53465051eb9 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ConfigurationsGetWithResponseMockTests.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ConfigurationsGetWithResponseMockTests.java @@ -31,43 +31,29 @@ public void testGetWithResponse() throws Exception { HttpResponse httpResponse = Mockito.mock(HttpResponse.class); ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - String responseStr = - "{\"properties\":{\"description\":\"i\",\"dataType\":\"Enumeration\",\"allowedValues\":\"pjzu\",\"requiresRestart\":true,\"serverRoleGroupConfigurations\":[{\"role\":\"Coordinator\",\"value\":\"ultskzbbtdz\",\"defaultValue\":\"veekgpwozuhkfp\",\"source\":\"jyofdxluusdtto\"},{\"role\":\"Coordinator\",\"value\":\"aboekqv\",\"defaultValue\":\"lns\",\"source\":\"bxwyjsflhhcaa\"}],\"provisioningState\":\"Failed\"},\"id\":\"xisxyawjoyaqcsl\",\"name\":\"jpkiidzyexznelix\",\"type\":\"nr\"}"; + String responseStr + = "{\"properties\":{\"description\":\"mfqjhhkxbp\",\"dataType\":\"Enumeration\",\"allowedValues\":\"jhxxjyn\",\"requiresRestart\":false,\"serverRoleGroupConfigurations\":[{\"role\":\"Coordinator\",\"value\":\"krtswbxqz\",\"defaultValue\":\"zjf\",\"source\":\"vjfdx\"},{\"role\":\"Coordinator\",\"value\":\"vetvt\",\"defaultValue\":\"aqtdoqmcbx\",\"source\":\"vxysl\"}],\"provisioningState\":\"InProgress\"},\"id\":\"fxoblytkb\",\"name\":\"mpew\",\"type\":\"wfbkrvrns\"}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) + Mockito.when(httpResponse.getBody()) .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) + Mockito.when(httpResponse.getBodyAsByteArray()) .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); + Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { + Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); + return Mono.just(httpResponse); + })); - CosmosDBForPostgreSqlManager manager = - CosmosDBForPostgreSqlManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + CosmosDBForPostgreSqlManager manager = CosmosDBForPostgreSqlManager.configure().withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); - Configuration response = - manager - .configurations() - .getWithResponse("qzcjrvxdj", "lmwlxkvugfhzo", "awjvzunluthnnp", com.azure.core.util.Context.NONE) - .getValue(); + Configuration response = manager.configurations() + .getWithResponse("lzdahzxctobgbkdm", "izpost", "grcfb", com.azure.core.util.Context.NONE).getValue(); - Assertions.assertEquals(true, response.requiresRestart()); + Assertions.assertEquals(false, response.requiresRestart()); Assertions.assertEquals(ServerRole.COORDINATOR, response.serverRoleGroupConfigurations().get(0).role()); - Assertions.assertEquals("ultskzbbtdz", response.serverRoleGroupConfigurations().get(0).value()); + Assertions.assertEquals("krtswbxqz", response.serverRoleGroupConfigurations().get(0).value()); } } diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ConfigurationsListByClusterMockTests.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ConfigurationsListByClusterMockTests.java index 9be3954dcac8..fe5e078eafd1 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ConfigurationsListByClusterMockTests.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ConfigurationsListByClusterMockTests.java @@ -32,42 +32,31 @@ public void testListByCluster() throws Exception { HttpResponse httpResponse = Mockito.mock(HttpResponse.class); ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - String responseStr = - "{\"value\":[{\"properties\":{\"description\":\"btn\",\"dataType\":\"Enumeration\",\"allowedValues\":\"bwwaloa\",\"requiresRestart\":true,\"serverRoleGroupConfigurations\":[{\"role\":\"Coordinator\",\"value\":\"rtzju\",\"defaultValue\":\"wyzmhtxon\",\"source\":\"ts\"},{\"role\":\"Worker\",\"value\":\"jcbpwxqpsrknft\",\"defaultValue\":\"vriuhprwmdyvx\",\"source\":\"ayriwwroyqbexrm\"}],\"provisioningState\":\"Canceled\"},\"id\":\"ycnojvknmefqsg\",\"name\":\"vah\",\"type\":\"pjyzhpv\"}]}"; + String responseStr + = "{\"value\":[{\"properties\":{\"description\":\"git\",\"dataType\":\"Integer\",\"allowedValues\":\"jvc\",\"requiresRestart\":true,\"serverRoleGroupConfigurations\":[{\"role\":\"Coordinator\",\"value\":\"wwncwzzhxgk\",\"defaultValue\":\"mgucna\",\"source\":\"t\"}],\"provisioningState\":\"InProgress\"},\"id\":\"lwptfdy\",\"name\":\"pfqbuaceopzf\",\"type\":\"rhhuaopppcqeqx\"}]}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) + Mockito.when(httpResponse.getBody()) .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) + Mockito.when(httpResponse.getBodyAsByteArray()) .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); + Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { + Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); + return Mono.just(httpResponse); + })); - CosmosDBForPostgreSqlManager manager = - CosmosDBForPostgreSqlManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + CosmosDBForPostgreSqlManager manager = CosmosDBForPostgreSqlManager.configure().withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); - PagedIterable response = - manager.configurations().listByCluster("c", "wxzvlvqhjkb", com.azure.core.util.Context.NONE); + PagedIterable response + = manager.configurations().listByCluster("dtpnapnyiropuhp", "gvpgy", com.azure.core.util.Context.NONE); Assertions.assertEquals(true, response.iterator().next().requiresRestart()); - Assertions - .assertEquals( - ServerRole.COORDINATOR, response.iterator().next().serverRoleGroupConfigurations().get(0).role()); - Assertions.assertEquals("rtzju", response.iterator().next().serverRoleGroupConfigurations().get(0).value()); + Assertions.assertEquals(ServerRole.COORDINATOR, + response.iterator().next().serverRoleGroupConfigurations().get(0).role()); + Assertions.assertEquals("wwncwzzhxgk", + response.iterator().next().serverRoleGroupConfigurations().get(0).value()); } } diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ConfigurationsListByServerMockTests.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ConfigurationsListByServerMockTests.java index a110a2f75e79..176298658a47 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ConfigurationsListByServerMockTests.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ConfigurationsListByServerMockTests.java @@ -31,38 +31,27 @@ public void testListByServer() throws Exception { HttpResponse httpResponse = Mockito.mock(HttpResponse.class); ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - String responseStr = - "{\"value\":[{\"properties\":{\"value\":\"rjaw\",\"source\":\"wgxhn\",\"description\":\"kxfbkpycgklwndn\",\"defaultValue\":\"dauwhvylwzbtd\",\"dataType\":\"Numeric\",\"allowedValues\":\"znbmpowuwprzq\",\"requiresRestart\":true,\"provisioningState\":\"Canceled\"},\"id\":\"upjm\",\"name\":\"hfxobbcswsrtj\",\"type\":\"iplrbpbewtghfgb\"}]}"; + String responseStr + = "{\"value\":[{\"properties\":{\"value\":\"wyjsflhhcaalnjix\",\"source\":\"xyawj\",\"description\":\"aq\",\"defaultValue\":\"lyjpk\",\"dataType\":\"Integer\",\"allowedValues\":\"yexz\",\"requiresRestart\":true,\"provisioningState\":\"InProgress\"},\"id\":\"nr\",\"name\":\"tfolhbnx\",\"type\":\"nalaulppg\"}]}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) + Mockito.when(httpResponse.getBody()) .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) + Mockito.when(httpResponse.getBodyAsByteArray()) .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); + Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { + Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); + return Mono.just(httpResponse); + })); - CosmosDBForPostgreSqlManager manager = - CosmosDBForPostgreSqlManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + CosmosDBForPostgreSqlManager manager = CosmosDBForPostgreSqlManager.configure().withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); - PagedIterable response = - manager.configurations().listByServer("ueiotwmcdyt", "x", "it", com.azure.core.util.Context.NONE); + PagedIterable response + = manager.configurations().listByServer("us", "ttouwaboekqvkel", "smv", com.azure.core.util.Context.NONE); - Assertions.assertEquals("rjaw", response.iterator().next().value()); + Assertions.assertEquals("wyjsflhhcaalnjix", response.iterator().next().value()); } } diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ConfigurationsUpdateOnCoordinatorMockTests.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ConfigurationsUpdateOnCoordinatorMockTests.java index 1797b3a37dc3..b862486736cd 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ConfigurationsUpdateOnCoordinatorMockTests.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ConfigurationsUpdateOnCoordinatorMockTests.java @@ -31,45 +31,27 @@ public void testUpdateOnCoordinator() throws Exception { HttpResponse httpResponse = Mockito.mock(HttpResponse.class); ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - String responseStr = - "{\"properties\":{\"value\":\"wfbkrvrns\",\"source\":\"hqjohxcrsbfova\",\"description\":\"ruvw\",\"defaultValue\":\"sqfsubcgjbirxb\",\"dataType\":\"Numeric\",\"allowedValues\":\"rfbjf\",\"requiresRestart\":false,\"provisioningState\":\"Succeeded\"},\"id\":\"t\",\"name\":\"tpvjzbexilzznfqq\",\"type\":\"vwpm\"}"; + String responseStr + = "{\"properties\":{\"value\":\"rsc\",\"source\":\"t\",\"description\":\"vfiwjmygtdss\",\"defaultValue\":\"wtmwerio\",\"dataType\":\"Boolean\",\"allowedValues\":\"qsemwabne\",\"requiresRestart\":false,\"provisioningState\":\"Succeeded\"},\"id\":\"h\",\"name\":\"d\",\"type\":\"lvwiwubmwmbesl\"}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) + Mockito.when(httpResponse.getBody()) .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) + Mockito.when(httpResponse.getBodyAsByteArray()) .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); + Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { + Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); + return Mono.just(httpResponse); + })); - CosmosDBForPostgreSqlManager manager = - CosmosDBForPostgreSqlManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + CosmosDBForPostgreSqlManager manager = CosmosDBForPostgreSqlManager.configure().withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); - ServerConfiguration response = - manager - .configurations() - .updateOnCoordinator( - "izpost", - "grcfb", - "nrmfqjhhk", - new ServerConfigurationInner().withValue("pvjymjhxxjyng"), - com.azure.core.util.Context.NONE); + ServerConfiguration response = manager.configurations().updateOnCoordinator("mifthnzdnd", "l", "nayqi", + new ServerConfigurationInner().withValue("nduhavhqlkthum"), com.azure.core.util.Context.NONE); - Assertions.assertEquals("wfbkrvrns", response.value()); + Assertions.assertEquals("rsc", response.value()); } } diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ConfigurationsUpdateOnNodeMockTests.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ConfigurationsUpdateOnNodeMockTests.java index ce781856b390..ea77b1dc0fb9 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ConfigurationsUpdateOnNodeMockTests.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ConfigurationsUpdateOnNodeMockTests.java @@ -31,45 +31,27 @@ public void testUpdateOnNode() throws Exception { HttpResponse httpResponse = Mockito.mock(HttpResponse.class); ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - String responseStr = - "{\"properties\":{\"value\":\"mwmbes\",\"source\":\"nkww\",\"description\":\"pjflcxogao\",\"defaultValue\":\"nzmnsikvm\",\"dataType\":\"Boolean\",\"allowedValues\":\"qqkdltfzxmhhvhgu\",\"requiresRestart\":false,\"provisioningState\":\"Succeeded\"},\"id\":\"obdagxtibqdxb\",\"name\":\"wakbogqxndl\",\"type\":\"zgx\"}"; + String responseStr + = "{\"properties\":{\"value\":\"c\",\"source\":\"fwdsj\",\"description\":\"aljutiiswac\",\"defaultValue\":\"gdkz\",\"dataType\":\"Enumeration\",\"allowedValues\":\"fvhqc\",\"requiresRestart\":true,\"provisioningState\":\"Succeeded\"},\"id\":\"n\",\"name\":\"pfuflrw\",\"type\":\"mh\"}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) + Mockito.when(httpResponse.getBody()) .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) + Mockito.when(httpResponse.getBodyAsByteArray()) .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); + Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { + Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); + return Mono.just(httpResponse); + })); - CosmosDBForPostgreSqlManager manager = - CosmosDBForPostgreSqlManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + CosmosDBForPostgreSqlManager manager = CosmosDBForPostgreSqlManager.configure().withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); - ServerConfiguration response = - manager - .configurations() - .updateOnNode( - "cwyhzdxssa", - "bzmnvdfznud", - "od", - new ServerConfigurationInner().withValue("zbn"), - com.azure.core.util.Context.NONE); + ServerConfiguration response = manager.configurations().updateOnNode("wlauwzizxbmpg", "jefuzmuvpbttdumo", "p", + new ServerConfigurationInner().withValue("ebmnzbtbhjpglk"), com.azure.core.util.Context.NONE); - Assertions.assertEquals("mwmbes", response.value()); + Assertions.assertEquals("c", response.value()); } } diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/FirewallRuleInnerTests.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/FirewallRuleInnerTests.java index ab645ea60d9d..0c904d2b2ba3 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/FirewallRuleInnerTests.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/FirewallRuleInnerTests.java @@ -11,21 +11,19 @@ public final class FirewallRuleInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - FirewallRuleInner model = - BinaryData - .fromString( - "{\"properties\":{\"startIpAddress\":\"clwhijcoejctbz\",\"endIpAddress\":\"qsqsy\",\"provisioningState\":\"Canceled\"},\"id\":\"fkgukdkexxppof\",\"name\":\"xaxcfjpgddtocjjx\",\"type\":\"vpmouexhdzxib\"}") - .toObject(FirewallRuleInner.class); - Assertions.assertEquals("clwhijcoejctbz", model.startIpAddress()); - Assertions.assertEquals("qsqsy", model.endIpAddress()); + FirewallRuleInner model = BinaryData.fromString( + "{\"properties\":{\"startIpAddress\":\"yzydagfuaxbezyi\",\"endIpAddress\":\"okktwhrdxw\",\"provisioningState\":\"Canceled\"},\"id\":\"sm\",\"name\":\"surex\",\"type\":\"moryocfsfksym\"}") + .toObject(FirewallRuleInner.class); + Assertions.assertEquals("yzydagfuaxbezyi", model.startIpAddress()); + Assertions.assertEquals("okktwhrdxw", model.endIpAddress()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - FirewallRuleInner model = - new FirewallRuleInner().withStartIpAddress("clwhijcoejctbz").withEndIpAddress("qsqsy"); + FirewallRuleInner model + = new FirewallRuleInner().withStartIpAddress("yzydagfuaxbezyi").withEndIpAddress("okktwhrdxw"); model = BinaryData.fromObject(model).toObject(FirewallRuleInner.class); - Assertions.assertEquals("clwhijcoejctbz", model.startIpAddress()); - Assertions.assertEquals("qsqsy", model.endIpAddress()); + Assertions.assertEquals("yzydagfuaxbezyi", model.startIpAddress()); + Assertions.assertEquals("okktwhrdxw", model.endIpAddress()); } } diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/FirewallRuleListResultTests.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/FirewallRuleListResultTests.java index 9eff2bb72b08..1a3b74f3b162 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/FirewallRuleListResultTests.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/FirewallRuleListResultTests.java @@ -13,28 +13,19 @@ public final class FirewallRuleListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - FirewallRuleListResult model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"startIpAddress\":\"uhrhcffcyddgl\",\"endIpAddress\":\"jthjqkwpyei\",\"provisioningState\":\"Succeeded\"},\"id\":\"ciwqvhk\",\"name\":\"ixuigdtopbobj\",\"type\":\"ghmewuam\"},{\"properties\":{\"startIpAddress\":\"uhrzayvvt\",\"endIpAddress\":\"gvdfgiotkftutq\",\"provisioningState\":\"Failed\"},\"id\":\"xlefgugnxkrx\",\"name\":\"qmi\",\"type\":\"tthzrvqd\"},{\"properties\":{\"startIpAddress\":\"abhjybi\",\"endIpAddress\":\"ehoqfbowskan\",\"provisioningState\":\"Failed\"},\"id\":\"lcuiywgqywgndr\",\"name\":\"ynhz\",\"type\":\"pphrcgynco\"},{\"properties\":{\"startIpAddress\":\"pec\",\"endIpAddress\":\"vmmcoofs\",\"provisioningState\":\"Canceled\"},\"id\":\"v\",\"name\":\"bmqj\",\"type\":\"abcypmivk\"}]}") - .toObject(FirewallRuleListResult.class); - Assertions.assertEquals("uhrhcffcyddgl", model.value().get(0).startIpAddress()); - Assertions.assertEquals("jthjqkwpyei", model.value().get(0).endIpAddress()); + FirewallRuleListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"startIpAddress\":\"poczvyifqrvkdvjs\",\"endIpAddress\":\"lrmv\",\"provisioningState\":\"Succeeded\"},\"id\":\"atkpnp\",\"name\":\"lexxbczwtru\",\"type\":\"iqzbq\"}]}") + .toObject(FirewallRuleListResult.class); + Assertions.assertEquals("poczvyifqrvkdvjs", model.value().get(0).startIpAddress()); + Assertions.assertEquals("lrmv", model.value().get(0).endIpAddress()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - FirewallRuleListResult model = - new FirewallRuleListResult() - .withValue( - Arrays - .asList( - new FirewallRuleInner().withStartIpAddress("uhrhcffcyddgl").withEndIpAddress("jthjqkwpyei"), - new FirewallRuleInner().withStartIpAddress("uhrzayvvt").withEndIpAddress("gvdfgiotkftutq"), - new FirewallRuleInner().withStartIpAddress("abhjybi").withEndIpAddress("ehoqfbowskan"), - new FirewallRuleInner().withStartIpAddress("pec").withEndIpAddress("vmmcoofs"))); + FirewallRuleListResult model = new FirewallRuleListResult().withValue( + Arrays.asList(new FirewallRuleInner().withStartIpAddress("poczvyifqrvkdvjs").withEndIpAddress("lrmv"))); model = BinaryData.fromObject(model).toObject(FirewallRuleListResult.class); - Assertions.assertEquals("uhrhcffcyddgl", model.value().get(0).startIpAddress()); - Assertions.assertEquals("jthjqkwpyei", model.value().get(0).endIpAddress()); + Assertions.assertEquals("poczvyifqrvkdvjs", model.value().get(0).startIpAddress()); + Assertions.assertEquals("lrmv", model.value().get(0).endIpAddress()); } } diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/FirewallRulePropertiesTests.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/FirewallRulePropertiesTests.java index 3e3ccec370f0..5bf9b9ec005f 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/FirewallRulePropertiesTests.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/FirewallRulePropertiesTests.java @@ -11,21 +11,20 @@ public final class FirewallRulePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - FirewallRuleProperties model = - BinaryData - .fromString( - "{\"startIpAddress\":\"eojnxqbzvddn\",\"endIpAddress\":\"wndeicbtwnp\",\"provisioningState\":\"Canceled\"}") - .toObject(FirewallRuleProperties.class); - Assertions.assertEquals("eojnxqbzvddn", model.startIpAddress()); - Assertions.assertEquals("wndeicbtwnp", model.endIpAddress()); + FirewallRuleProperties model = BinaryData + .fromString( + "{\"startIpAddress\":\"dystkiiuxhqyud\",\"endIpAddress\":\"o\",\"provisioningState\":\"Succeeded\"}") + .toObject(FirewallRuleProperties.class); + Assertions.assertEquals("dystkiiuxhqyud", model.startIpAddress()); + Assertions.assertEquals("o", model.endIpAddress()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - FirewallRuleProperties model = - new FirewallRuleProperties().withStartIpAddress("eojnxqbzvddn").withEndIpAddress("wndeicbtwnp"); + FirewallRuleProperties model + = new FirewallRuleProperties().withStartIpAddress("dystkiiuxhqyud").withEndIpAddress("o"); model = BinaryData.fromObject(model).toObject(FirewallRuleProperties.class); - Assertions.assertEquals("eojnxqbzvddn", model.startIpAddress()); - Assertions.assertEquals("wndeicbtwnp", model.endIpAddress()); + Assertions.assertEquals("dystkiiuxhqyud", model.startIpAddress()); + Assertions.assertEquals("o", model.endIpAddress()); } } diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/FirewallRulesCreateOrUpdateMockTests.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/FirewallRulesCreateOrUpdateMockTests.java index 39b5304f913f..43e36bfb4d71 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/FirewallRulesCreateOrUpdateMockTests.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/FirewallRulesCreateOrUpdateMockTests.java @@ -30,45 +30,29 @@ public void testCreateOrUpdate() throws Exception { HttpResponse httpResponse = Mockito.mock(HttpResponse.class); ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - String responseStr = - "{\"properties\":{\"startIpAddress\":\"hgw\",\"endIpAddress\":\"apnedgfbcvkc\",\"provisioningState\":\"Succeeded\"},\"id\":\"keqdcvdrhvoods\",\"name\":\"tbobz\",\"type\":\"opcjwvnhd\"}"; + String responseStr + = "{\"properties\":{\"startIpAddress\":\"i\",\"endIpAddress\":\"m\",\"provisioningState\":\"Succeeded\"},\"id\":\"bahwfl\",\"name\":\"szdtmhrkwof\",\"type\":\"yvoqa\"}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) + Mockito.when(httpResponse.getBody()) .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) + Mockito.when(httpResponse.getBodyAsByteArray()) .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); + Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { + Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); + return Mono.just(httpResponse); + })); - CosmosDBForPostgreSqlManager manager = - CosmosDBForPostgreSqlManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + CosmosDBForPostgreSqlManager manager = CosmosDBForPostgreSqlManager.configure().withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); - FirewallRule response = - manager - .firewallRules() - .define("c") - .withExistingServerGroupsv2("sg", "b") - .withStartIpAddress("hfwdsjnkaljutiis") - .withEndIpAddress("acffgdkzzewkfvhq") - .create(); + FirewallRule response + = manager.firewallRules().define("smocmbq").withExistingServerGroupsv2("mquxvypo", "gkopkwhojvpajqgx") + .withStartIpAddress("qvmkcxo").withEndIpAddress("apvhelxprgly").create(); - Assertions.assertEquals("hgw", response.startIpAddress()); - Assertions.assertEquals("apnedgfbcvkc", response.endIpAddress()); + Assertions.assertEquals("i", response.startIpAddress()); + Assertions.assertEquals("m", response.endIpAddress()); } } diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/FirewallRulesGetWithResponseMockTests.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/FirewallRulesGetWithResponseMockTests.java index 72b6e4eac932..788765aeb248 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/FirewallRulesGetWithResponseMockTests.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/FirewallRulesGetWithResponseMockTests.java @@ -30,42 +30,28 @@ public void testGetWithResponse() throws Exception { HttpResponse httpResponse = Mockito.mock(HttpResponse.class); ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - String responseStr = - "{\"properties\":{\"startIpAddress\":\"tkoievseotgq\",\"endIpAddress\":\"l\",\"provisioningState\":\"Failed\"},\"id\":\"wlauwzizxbmpg\",\"name\":\"jefuzmuvpbttdumo\",\"type\":\"p\"}"; + String responseStr + = "{\"properties\":{\"startIpAddress\":\"pnedgf\",\"endIpAddress\":\"cvkcvqvpkeqdcv\",\"provisioningState\":\"Failed\"},\"id\":\"ood\",\"name\":\"otbobzdopcj\",\"type\":\"vnhdldwmgxcxr\"}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) + Mockito.when(httpResponse.getBody()) .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) + Mockito.when(httpResponse.getBodyAsByteArray()) .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); + Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { + Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); + return Mono.just(httpResponse); + })); - CosmosDBForPostgreSqlManager manager = - CosmosDBForPostgreSqlManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + CosmosDBForPostgreSqlManager manager = CosmosDBForPostgreSqlManager.configure().withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); - FirewallRule response = - manager - .firewallRules() - .getWithResponse("uriplbpodxunkb", "bxmubyynt", "lrb", com.azure.core.util.Context.NONE) - .getValue(); + FirewallRule response = manager.firewallRules() + .getWithResponse("lxyjr", "sag", "fcnihgwq", com.azure.core.util.Context.NONE).getValue(); - Assertions.assertEquals("tkoievseotgq", response.startIpAddress()); - Assertions.assertEquals("l", response.endIpAddress()); + Assertions.assertEquals("pnedgf", response.startIpAddress()); + Assertions.assertEquals("cvkcvqvpkeqdcv", response.endIpAddress()); } } diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/FirewallRulesListByClusterMockTests.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/FirewallRulesListByClusterMockTests.java index 7651e8bd7cf3..3ff93f619957 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/FirewallRulesListByClusterMockTests.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/FirewallRulesListByClusterMockTests.java @@ -31,39 +31,28 @@ public void testListByCluster() throws Exception { HttpResponse httpResponse = Mockito.mock(HttpResponse.class); ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - String responseStr = - "{\"value\":[{\"properties\":{\"startIpAddress\":\"bhjpglkfgohdne\",\"endIpAddress\":\"el\",\"provisioningState\":\"Succeeded\"},\"id\":\"dyhtozfikdowwquu\",\"name\":\"xzxcl\",\"type\":\"ithhqzon\"}]}"; + String responseStr + = "{\"value\":[{\"properties\":{\"startIpAddress\":\"pdggkzzlvm\",\"endIpAddress\":\"mpaxmodfvuefywsb\",\"provisioningState\":\"Succeeded\"},\"id\":\"wyhrfouyftaakc\",\"name\":\"wiyzvqtmnubexkp\",\"type\":\"ksmond\"}]}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) + Mockito.when(httpResponse.getBody()) .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) + Mockito.when(httpResponse.getBodyAsByteArray()) .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); + Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { + Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); + return Mono.just(httpResponse); + })); - CosmosDBForPostgreSqlManager manager = - CosmosDBForPostgreSqlManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + CosmosDBForPostgreSqlManager manager = CosmosDBForPostgreSqlManager.configure().withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); - PagedIterable response = - manager.firewallRules().listByCluster("xe", "mnzb", com.azure.core.util.Context.NONE); + PagedIterable response + = manager.firewallRules().listByCluster("lpmutwuoegrpkhj", "niyqslui", com.azure.core.util.Context.NONE); - Assertions.assertEquals("bhjpglkfgohdne", response.iterator().next().startIpAddress()); - Assertions.assertEquals("el", response.iterator().next().endIpAddress()); + Assertions.assertEquals("pdggkzzlvm", response.iterator().next().startIpAddress()); + Assertions.assertEquals("mpaxmodfvuefywsb", response.iterator().next().endIpAddress()); } } diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/MaintenanceWindowTests.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/MaintenanceWindowTests.java index 1c0a24d2d7cf..0067da24b54f 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/MaintenanceWindowTests.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/MaintenanceWindowTests.java @@ -11,11 +11,9 @@ public final class MaintenanceWindowTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - MaintenanceWindow model = - BinaryData - .fromString( - "{\"customWindow\":\"dxbmtqioq\",\"startHour\":1116722151,\"startMinute\":1801213143,\"dayOfWeek\":538577990}") - .toObject(MaintenanceWindow.class); + MaintenanceWindow model = BinaryData.fromString( + "{\"customWindow\":\"dxbmtqioq\",\"startHour\":1116722151,\"startMinute\":1801213143,\"dayOfWeek\":538577990}") + .toObject(MaintenanceWindow.class); Assertions.assertEquals("dxbmtqioq", model.customWindow()); Assertions.assertEquals(1116722151, model.startHour()); Assertions.assertEquals(1801213143, model.startMinute()); @@ -24,12 +22,8 @@ public void testDeserialize() throws Exception { @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - MaintenanceWindow model = - new MaintenanceWindow() - .withCustomWindow("dxbmtqioq") - .withStartHour(1116722151) - .withStartMinute(1801213143) - .withDayOfWeek(538577990); + MaintenanceWindow model = new MaintenanceWindow().withCustomWindow("dxbmtqioq").withStartHour(1116722151) + .withStartMinute(1801213143).withDayOfWeek(538577990); model = BinaryData.fromObject(model).toObject(MaintenanceWindow.class); Assertions.assertEquals("dxbmtqioq", model.customWindow()); Assertions.assertEquals(1116722151, model.startHour()); diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/NameAvailabilityInnerTests.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/NameAvailabilityInnerTests.java index 1b44d37d046a..af552d691aef 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/NameAvailabilityInnerTests.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/NameAvailabilityInnerTests.java @@ -11,29 +11,23 @@ public final class NameAvailabilityInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - NameAvailabilityInner model = - BinaryData - .fromString( - "{\"message\":\"rjfeallnwsubisnj\",\"nameAvailable\":false,\"name\":\"ngnzscxaqwoochc\",\"type\":\"nqvpkvlrxnje\"}") + NameAvailabilityInner model + = BinaryData.fromString("{\"message\":\"yjr\",\"nameAvailable\":false,\"name\":\"aos\",\"type\":\"xc\"}") .toObject(NameAvailabilityInner.class); - Assertions.assertEquals("rjfeallnwsubisnj", model.message()); + Assertions.assertEquals("yjr", model.message()); Assertions.assertEquals(false, model.nameAvailable()); - Assertions.assertEquals("ngnzscxaqwoochc", model.name()); - Assertions.assertEquals("nqvpkvlrxnje", model.type()); + Assertions.assertEquals("aos", model.name()); + Assertions.assertEquals("xc", model.type()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - NameAvailabilityInner model = - new NameAvailabilityInner() - .withMessage("rjfeallnwsubisnj") - .withNameAvailable(false) - .withName("ngnzscxaqwoochc") - .withType("nqvpkvlrxnje"); + NameAvailabilityInner model + = new NameAvailabilityInner().withMessage("yjr").withNameAvailable(false).withName("aos").withType("xc"); model = BinaryData.fromObject(model).toObject(NameAvailabilityInner.class); - Assertions.assertEquals("rjfeallnwsubisnj", model.message()); + Assertions.assertEquals("yjr", model.message()); Assertions.assertEquals(false, model.nameAvailable()); - Assertions.assertEquals("ngnzscxaqwoochc", model.name()); - Assertions.assertEquals("nqvpkvlrxnje", model.type()); + Assertions.assertEquals("aos", model.name()); + Assertions.assertEquals("xc", model.type()); } } diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/NameAvailabilityRequestTests.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/NameAvailabilityRequestTests.java index d68f6ff7cf9c..79448dfd790c 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/NameAvailabilityRequestTests.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/NameAvailabilityRequestTests.java @@ -11,15 +11,15 @@ public final class NameAvailabilityRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - NameAvailabilityRequest model = - BinaryData.fromString("{\"name\":\"tqgtzxdpnqbqq\"}").toObject(NameAvailabilityRequest.class); - Assertions.assertEquals("tqgtzxdpnqbqq", model.name()); + NameAvailabilityRequest model + = BinaryData.fromString("{\"name\":\"uuimjmvxieduug\"}").toObject(NameAvailabilityRequest.class); + Assertions.assertEquals("uuimjmvxieduug", model.name()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - NameAvailabilityRequest model = new NameAvailabilityRequest().withName("tqgtzxdpnqbqq"); + NameAvailabilityRequest model = new NameAvailabilityRequest().withName("uuimjmvxieduug"); model = BinaryData.fromObject(model).toObject(NameAvailabilityRequest.class); - Assertions.assertEquals("tqgtzxdpnqbqq", model.name()); + Assertions.assertEquals("uuimjmvxieduug", model.name()); } } diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/OperationDisplayTests.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/OperationDisplayTests.java index 7e93e332d64d..ab7177b6f0f2 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/OperationDisplayTests.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/OperationDisplayTests.java @@ -10,11 +10,9 @@ public final class OperationDisplayTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - OperationDisplay model = - BinaryData - .fromString( - "{\"provider\":\"auu\",\"resource\":\"jmvxie\",\"operation\":\"ugidyjrr\",\"description\":\"y\"}") - .toObject(OperationDisplay.class); + OperationDisplay model = BinaryData.fromString( + "{\"provider\":\"deyeamdphagalpbu\",\"resource\":\"gipwhonowkg\",\"operation\":\"wankixzbi\",\"description\":\"eputtmrywnuzoqf\"}") + .toObject(OperationDisplay.class); } @org.junit.jupiter.api.Test diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/OperationInnerTests.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/OperationInnerTests.java index 1ee5d23bae38..13dca564dcc6 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/OperationInnerTests.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/OperationInnerTests.java @@ -11,11 +11,9 @@ public final class OperationInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - OperationInner model = - BinaryData - .fromString( - "{\"name\":\"llr\",\"display\":{\"provider\":\"d\",\"resource\":\"atkpnp\",\"operation\":\"exxbczwtr\",\"description\":\"iqzbq\"},\"isDataAction\":true,\"origin\":\"user\",\"properties\":{\"lhzdobp\":\"dataokacspk\",\"kcciwwzjuqkhr\":\"datajmflbvvnch\",\"oskg\":\"dataajiwkuo\"}}") - .toObject(OperationInner.class); + OperationInner model = BinaryData.fromString( + "{\"name\":\"ldngkpoci\",\"display\":{\"provider\":\"yxoegukgjnp\",\"resource\":\"cgygev\",\"operation\":\"ntypmrbpizcdrqj\",\"description\":\"pyd\"},\"isDataAction\":true,\"origin\":\"user\",\"properties\":{\"w\":\"dataoejzi\",\"tgzfbishcbkh\":\"datafsj\"}}") + .toObject(OperationInner.class); Assertions.assertEquals(true, model.isDataAction()); } diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/OperationListResultTests.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/OperationListResultTests.java index 1c41a471b919..f55b76595a52 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/OperationListResultTests.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/OperationListResultTests.java @@ -13,25 +13,16 @@ public final class OperationListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - OperationListResult model = - BinaryData - .fromString( - "{\"value\":[{\"name\":\"pheoflokeyy\",\"display\":{\"provider\":\"jbdlwtgrhpdjpju\",\"resource\":\"sxazjpq\",\"operation\":\"gual\",\"description\":\"xxhejjzzvd\"},\"isDataAction\":true,\"origin\":\"system\",\"properties\":{\"cynpwlbjnp\":\"datafhotw\"}},{\"name\":\"cftadeh\",\"display\":{\"provider\":\"tyfsoppusuesn\",\"resource\":\"dejbavo\",\"operation\":\"zdmohctbqvu\",\"description\":\"xdn\"},\"isDataAction\":false,\"origin\":\"system\",\"properties\":{\"dyggdtjixhbku\":\"datajjugwdkcglhslaz\",\"fyexfwhy\":\"datafqweykhmene\",\"amdecte\":\"datacibvyvdcsitynn\"}},{\"name\":\"iqscjeypv\",\"display\":{\"provider\":\"rkgqhcjrefo\",\"resource\":\"mkqsleyyv\",\"operation\":\"qjpkcattpngjcrc\",\"description\":\"sqpjhvmdajvn\"},\"isDataAction\":true,\"origin\":\"user\",\"properties\":{\"yhltrpmopjmcm\":\"datacanoaeupf\"}},{\"name\":\"u\",\"display\":{\"provider\":\"hfuiuaodsfc\",\"resource\":\"vxodpu\",\"operation\":\"myzydagfuaxbez\",\"description\":\"uokktwhrdxwz\"},\"isDataAction\":false,\"origin\":\"system\",\"properties\":{\"ksymd\":\"dataureximoryocfs\",\"kiiuxhqyudxor\":\"datays\"}}],\"nextLink\":\"nbpoczvyifqrvkdv\"}") - .toObject(OperationListResult.class); + OperationListResult model = BinaryData.fromString( + "{\"value\":[{\"name\":\"clhocohsl\",\"display\":{\"provider\":\"leggzfbu\",\"resource\":\"mvfaxkffeiith\",\"operation\":\"m\",\"description\":\"yvshxmz\"},\"isDataAction\":true,\"origin\":\"user\",\"properties\":{\"pydptko\":\"dataigrxwburvjxxjn\"}}],\"nextLink\":\"kouknvudwtiu\"}") + .toObject(OperationListResult.class); Assertions.assertEquals(true, model.value().get(0).isDataAction()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - OperationListResult model = - new OperationListResult() - .withValue( - Arrays - .asList( - new OperationInner().withIsDataAction(true), - new OperationInner().withIsDataAction(false), - new OperationInner().withIsDataAction(true), - new OperationInner().withIsDataAction(false))); + OperationListResult model + = new OperationListResult().withValue(Arrays.asList(new OperationInner().withIsDataAction(true))); model = BinaryData.fromObject(model).toObject(OperationListResult.class); Assertions.assertEquals(true, model.value().get(0).isDataAction()); } diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/OperationsListMockTests.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/OperationsListMockTests.java index 0b8d07ca3d70..5f16d73d208f 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/OperationsListMockTests.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/OperationsListMockTests.java @@ -31,34 +31,23 @@ public void testList() throws Exception { HttpResponse httpResponse = Mockito.mock(HttpResponse.class); ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - String responseStr = - "{\"value\":[{\"name\":\"hojvpajqgxysmocm\",\"display\":{\"provider\":\"qvmkcxo\",\"resource\":\"pvhelxprg\",\"operation\":\"atddc\",\"description\":\"bcuejrjxgci\"},\"isDataAction\":false,\"origin\":\"system\",\"properties\":{\"bahwfl\":\"dataxsdqrhzoymibmrqy\",\"yvoqa\":\"dataszdtmhrkwof\",\"wo\":\"datapiexpbtgiw\",\"kcnqxwbpo\":\"datanwashrtd\"}}]}"; + String responseStr + = "{\"value\":[{\"name\":\"ovvqfovljxywsu\",\"display\":{\"provider\":\"rsndsytgadgvra\",\"resource\":\"en\",\"operation\":\"nzar\",\"description\":\"lquuijfqkacewii\"},\"isDataAction\":false,\"origin\":\"NotSpecified\",\"properties\":{\"hqkvpuvksgplsak\":\"databwwift\",\"n\":\"dataynfs\",\"ntorzihleosjswsr\":\"datajphuopxodlqi\"}}]}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) + Mockito.when(httpResponse.getBody()) .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) + Mockito.when(httpResponse.getBodyAsByteArray()) .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - CosmosDBForPostgreSqlManager manager = - CosmosDBForPostgreSqlManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { + Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); + return Mono.just(httpResponse); + })); + + CosmosDBForPostgreSqlManager manager = CosmosDBForPostgreSqlManager.configure().withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); PagedIterable response = manager.operations().list(com.azure.core.util.Context.NONE); diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/PrivateEndpointConnectionInnerTests.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/PrivateEndpointConnectionInnerTests.java index 6d9bedfef9fc..12f58fe09cf8 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/PrivateEndpointConnectionInnerTests.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/PrivateEndpointConnectionInnerTests.java @@ -14,33 +14,25 @@ public final class PrivateEndpointConnectionInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - PrivateEndpointConnectionInner model = - BinaryData - .fromString( - "{\"properties\":{\"groupIds\":[\"hjfbebrjcxe\",\"fuwutttxf\"],\"privateEndpoint\":{\"id\":\"birphxepcyva\"},\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"jky\",\"actionsRequired\":\"j\"},\"provisioningState\":\"Creating\"},\"id\":\"qgidokgjljyo\",\"name\":\"gvcl\",\"type\":\"bgsncghkjeszzhb\"}") - .toObject(PrivateEndpointConnectionInner.class); - Assertions - .assertEquals( - PrivateEndpointServiceConnectionStatus.PENDING, model.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("jky", model.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("j", model.privateLinkServiceConnectionState().actionsRequired()); + PrivateEndpointConnectionInner model = BinaryData.fromString( + "{\"properties\":{\"groupIds\":[\"sthsu\",\"ocmnyyazttbtwwrq\",\"uedck\"],\"privateEndpoint\":{\"id\":\"biexzfeyu\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"bxu\",\"actionsRequired\":\"bhqwalmuzyoxa\"},\"provisioningState\":\"Deleting\"},\"id\":\"zjancuxr\",\"name\":\"d\",\"type\":\"bavxbniwdjswzt\"}") + .toObject(PrivateEndpointConnectionInner.class); + Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.APPROVED, + model.privateLinkServiceConnectionState().status()); + Assertions.assertEquals("bxu", model.privateLinkServiceConnectionState().description()); + Assertions.assertEquals("bhqwalmuzyoxa", model.privateLinkServiceConnectionState().actionsRequired()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - PrivateEndpointConnectionInner model = - new PrivateEndpointConnectionInner() - .withPrivateEndpoint(new PrivateEndpoint()) - .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionState() - .withStatus(PrivateEndpointServiceConnectionStatus.PENDING) - .withDescription("jky") - .withActionsRequired("j")); + PrivateEndpointConnectionInner model = new PrivateEndpointConnectionInner() + .withPrivateEndpoint(new PrivateEndpoint()).withPrivateLinkServiceConnectionState( + new PrivateLinkServiceConnectionState().withStatus(PrivateEndpointServiceConnectionStatus.APPROVED) + .withDescription("bxu").withActionsRequired("bhqwalmuzyoxa")); model = BinaryData.fromObject(model).toObject(PrivateEndpointConnectionInner.class); - Assertions - .assertEquals( - PrivateEndpointServiceConnectionStatus.PENDING, model.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("jky", model.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("j", model.privateLinkServiceConnectionState().actionsRequired()); + Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.APPROVED, + model.privateLinkServiceConnectionState().status()); + Assertions.assertEquals("bxu", model.privateLinkServiceConnectionState().description()); + Assertions.assertEquals("bhqwalmuzyoxa", model.privateLinkServiceConnectionState().actionsRequired()); } } diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/PrivateEndpointConnectionListResultTests.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/PrivateEndpointConnectionListResultTests.java index db7df280cc86..31a1f5840f59 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/PrivateEndpointConnectionListResultTests.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/PrivateEndpointConnectionListResultTests.java @@ -16,62 +16,44 @@ public final class PrivateEndpointConnectionListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - PrivateEndpointConnectionListResult model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"groupIds\":[\"csonpclhoco\"],\"privateEndpoint\":{\"id\":\"kevle\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"buhfmvfaxkffeiit\",\"actionsRequired\":\"vmezy\"},\"provisioningState\":\"Failed\"},\"id\":\"mzsb\",\"name\":\"zoggigrxwburvjxx\",\"type\":\"nspydptkoenkoukn\"},{\"properties\":{\"groupIds\":[\"tiukbldngkpoci\",\"azyxoegukg\",\"npiucgygevqznty\"],\"privateEndpoint\":{\"id\":\"bpizcdrqjsdpydn\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"de\",\"actionsRequired\":\"jzicwifsjt\"},\"provisioningState\":\"Deleting\"},\"id\":\"bishcbkhajdeyea\",\"name\":\"dphagalpbuxwgip\",\"type\":\"honowkgshwank\"},{\"properties\":{\"groupIds\":[\"injep\"],\"privateEndpoint\":{\"id\":\"mryw\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"qftiy\",\"actionsRequired\":\"rnkcqvyxlw\"},\"provisioningState\":\"Deleting\"},\"id\":\"icohoqqnwvl\",\"name\":\"yav\",\"type\":\"hheunmmqhgyx\"},{\"properties\":{\"groupIds\":[\"ocukoklyax\"],\"privateEndpoint\":{\"id\":\"nuqszfkbey\"},\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"mjmwvvjektcx\",\"actionsRequired\":\"nhwlrsffrzpwvl\"},\"provisioningState\":\"Succeeded\"},\"id\":\"biqylihkaet\",\"name\":\"kt\",\"type\":\"fcivfsnkym\"}]}") - .toObject(PrivateEndpointConnectionListResult.class); - Assertions - .assertEquals( - PrivateEndpointServiceConnectionStatus.REJECTED, - model.value().get(0).privateLinkServiceConnectionState().status()); - Assertions - .assertEquals("buhfmvfaxkffeiit", model.value().get(0).privateLinkServiceConnectionState().description()); - Assertions.assertEquals("vmezy", model.value().get(0).privateLinkServiceConnectionState().actionsRequired()); + PrivateEndpointConnectionListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"groupIds\":[\"n\",\"cqvyxlwhzlsico\",\"oqqnwvlryav\"],\"privateEndpoint\":{\"id\":\"eun\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"gyxzk\",\"actionsRequired\":\"ocukoklyax\"},\"provisioningState\":\"Succeeded\"},\"id\":\"uqszfk\",\"name\":\"eyp\",\"type\":\"wrmjmwvvjektc\"},{\"properties\":{\"groupIds\":[\"hwlrsf\",\"rzpwvlqdqgbiq\",\"lihkaetcktvfc\",\"vf\"],\"privateEndpoint\":{\"id\":\"ymuctqhjfbebrj\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"fuwutttxf\",\"actionsRequired\":\"rbirphxe\"},\"provisioningState\":\"Succeeded\"},\"id\":\"ahfn\",\"name\":\"jky\",\"type\":\"xjvuujqgidokg\"},{\"properties\":{\"groupIds\":[\"oxgvclt\",\"gsncghkjeszz\",\"bijhtxfvgxbf\",\"mxnehmp\"],\"privateEndpoint\":{\"id\":\"xgodebfqkkrbmp\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"iw\",\"actionsRequired\":\"zlfbxzpuzycispnq\"},\"provisioningState\":\"Deleting\"},\"id\":\"gkbrpyyd\",\"name\":\"ibnuqqkpik\",\"type\":\"drgvtqagn\"},{\"properties\":{\"groupIds\":[\"hijggme\",\"fsiarbutr\",\"vpnazzm\"],\"privateEndpoint\":{\"id\":\"unmpxttd\"},\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"nlankxmyskpb\",\"actionsRequired\":\"nbtkcxywnytnr\"},\"provisioningState\":\"Deleting\"},\"id\":\"qidybyx\",\"name\":\"zfcl\",\"type\":\"aaxdbabphlwrq\"}]}") + .toObject(PrivateEndpointConnectionListResult.class); + Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.APPROVED, + model.value().get(0).privateLinkServiceConnectionState().status()); + Assertions.assertEquals("gyxzk", model.value().get(0).privateLinkServiceConnectionState().description()); + Assertions.assertEquals("ocukoklyax", + model.value().get(0).privateLinkServiceConnectionState().actionsRequired()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - PrivateEndpointConnectionListResult model = - new PrivateEndpointConnectionListResult() + PrivateEndpointConnectionListResult model + = new PrivateEndpointConnectionListResult() .withValue( Arrays .asList( - new PrivateEndpointConnectionInner() - .withPrivateEndpoint(new PrivateEndpoint()) - .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionState() - .withStatus(PrivateEndpointServiceConnectionStatus.REJECTED) - .withDescription("buhfmvfaxkffeiit") - .withActionsRequired("vmezy")), - new PrivateEndpointConnectionInner() - .withPrivateEndpoint(new PrivateEndpoint()) - .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionState() - .withStatus(PrivateEndpointServiceConnectionStatus.APPROVED) - .withDescription("de") - .withActionsRequired("jzicwifsjt")), - new PrivateEndpointConnectionInner() - .withPrivateEndpoint(new PrivateEndpoint()) - .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionState() - .withStatus(PrivateEndpointServiceConnectionStatus.APPROVED) - .withDescription("qftiy") - .withActionsRequired("rnkcqvyxlw")), - new PrivateEndpointConnectionInner() - .withPrivateEndpoint(new PrivateEndpoint()) - .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionState() - .withStatus(PrivateEndpointServiceConnectionStatus.PENDING) - .withDescription("mjmwvvjektcx") - .withActionsRequired("nhwlrsffrzpwvl")))); + new PrivateEndpointConnectionInner().withPrivateEndpoint(new PrivateEndpoint()) + .withPrivateLinkServiceConnectionState(new PrivateLinkServiceConnectionState() + .withStatus(PrivateEndpointServiceConnectionStatus.APPROVED) + .withDescription("gyxzk").withActionsRequired("ocukoklyax")), + new PrivateEndpointConnectionInner().withPrivateEndpoint(new PrivateEndpoint()) + .withPrivateLinkServiceConnectionState(new PrivateLinkServiceConnectionState() + .withStatus(PrivateEndpointServiceConnectionStatus.APPROVED) + .withDescription("fuwutttxf").withActionsRequired("rbirphxe")), + new PrivateEndpointConnectionInner().withPrivateEndpoint(new PrivateEndpoint()) + .withPrivateLinkServiceConnectionState(new PrivateLinkServiceConnectionState() + .withStatus(PrivateEndpointServiceConnectionStatus.REJECTED).withDescription("iw") + .withActionsRequired("zlfbxzpuzycispnq")), + new PrivateEndpointConnectionInner().withPrivateEndpoint(new PrivateEndpoint()) + .withPrivateLinkServiceConnectionState(new PrivateLinkServiceConnectionState() + .withStatus(PrivateEndpointServiceConnectionStatus.PENDING) + .withDescription("nlankxmyskpb").withActionsRequired("nbtkcxywnytnr")))); model = BinaryData.fromObject(model).toObject(PrivateEndpointConnectionListResult.class); - Assertions - .assertEquals( - PrivateEndpointServiceConnectionStatus.REJECTED, - model.value().get(0).privateLinkServiceConnectionState().status()); - Assertions - .assertEquals("buhfmvfaxkffeiit", model.value().get(0).privateLinkServiceConnectionState().description()); - Assertions.assertEquals("vmezy", model.value().get(0).privateLinkServiceConnectionState().actionsRequired()); + Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.APPROVED, + model.value().get(0).privateLinkServiceConnectionState().status()); + Assertions.assertEquals("gyxzk", model.value().get(0).privateLinkServiceConnectionState().description()); + Assertions.assertEquals("ocukoklyax", + model.value().get(0).privateLinkServiceConnectionState().actionsRequired()); } } diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/PrivateEndpointConnectionPropertiesTests.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/PrivateEndpointConnectionPropertiesTests.java index c8c10a73f59f..cffb96c2a8c9 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/PrivateEndpointConnectionPropertiesTests.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/PrivateEndpointConnectionPropertiesTests.java @@ -14,33 +14,25 @@ public final class PrivateEndpointConnectionPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - PrivateEndpointConnectionProperties model = - BinaryData - .fromString( - "{\"groupIds\":[\"txfvgx\",\"fsm\",\"nehmpvecx\",\"odebfqkkrbmpu\"],\"privateEndpoint\":{\"id\":\"iw\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"fbxzpuzycisp\",\"actionsRequired\":\"zahmgkbrpyydhibn\"},\"provisioningState\":\"Failed\"}") - .toObject(PrivateEndpointConnectionProperties.class); - Assertions - .assertEquals( - PrivateEndpointServiceConnectionStatus.REJECTED, model.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("fbxzpuzycisp", model.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("zahmgkbrpyydhibn", model.privateLinkServiceConnectionState().actionsRequired()); + PrivateEndpointConnectionProperties model = BinaryData.fromString( + "{\"groupIds\":[\"pgn\"],\"privateEndpoint\":{\"id\":\"x\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"bzpfzab\",\"actionsRequired\":\"cuh\"},\"provisioningState\":\"Succeeded\"}") + .toObject(PrivateEndpointConnectionProperties.class); + Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.APPROVED, + model.privateLinkServiceConnectionState().status()); + Assertions.assertEquals("bzpfzab", model.privateLinkServiceConnectionState().description()); + Assertions.assertEquals("cuh", model.privateLinkServiceConnectionState().actionsRequired()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - PrivateEndpointConnectionProperties model = - new PrivateEndpointConnectionProperties() - .withPrivateEndpoint(new PrivateEndpoint()) - .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionState() - .withStatus(PrivateEndpointServiceConnectionStatus.REJECTED) - .withDescription("fbxzpuzycisp") - .withActionsRequired("zahmgkbrpyydhibn")); + PrivateEndpointConnectionProperties model = new PrivateEndpointConnectionProperties() + .withPrivateEndpoint(new PrivateEndpoint()).withPrivateLinkServiceConnectionState( + new PrivateLinkServiceConnectionState().withStatus(PrivateEndpointServiceConnectionStatus.APPROVED) + .withDescription("bzpfzab").withActionsRequired("cuh")); model = BinaryData.fromObject(model).toObject(PrivateEndpointConnectionProperties.class); - Assertions - .assertEquals( - PrivateEndpointServiceConnectionStatus.REJECTED, model.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("fbxzpuzycisp", model.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("zahmgkbrpyydhibn", model.privateLinkServiceConnectionState().actionsRequired()); + Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.APPROVED, + model.privateLinkServiceConnectionState().status()); + Assertions.assertEquals("bzpfzab", model.privateLinkServiceConnectionState().description()); + Assertions.assertEquals("cuh", model.privateLinkServiceConnectionState().actionsRequired()); } } diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/PrivateEndpointConnectionSimplePropertiesTests.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/PrivateEndpointConnectionSimplePropertiesTests.java index e873cfdea1d9..713dbe43db4e 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/PrivateEndpointConnectionSimplePropertiesTests.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/PrivateEndpointConnectionSimplePropertiesTests.java @@ -15,37 +15,29 @@ public final class PrivateEndpointConnectionSimplePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - PrivateEndpointConnectionSimpleProperties model = - BinaryData - .fromString( - "{\"privateEndpoint\":{\"id\":\"jpsq\"},\"groupIds\":[\"poyfdkfogkn\",\"gjofjd\"],\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"deupewnwrei\",\"actionsRequired\":\"zyf\"}}") - .toObject(PrivateEndpointConnectionSimpleProperties.class); + PrivateEndpointConnectionSimpleProperties model = BinaryData.fromString( + "{\"privateEndpoint\":{\"id\":\"jpsq\"},\"groupIds\":[\"poyfdkfogkn\",\"gjofjd\"],\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"deupewnwrei\",\"actionsRequired\":\"zyf\"}}") + .toObject(PrivateEndpointConnectionSimpleProperties.class); Assertions.assertEquals("jpsq", model.privateEndpoint().id()); Assertions.assertEquals("poyfdkfogkn", model.groupIds().get(0)); - Assertions - .assertEquals( - PrivateEndpointServiceConnectionStatus.REJECTED, model.privateLinkServiceConnectionState().status()); + Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.REJECTED, + model.privateLinkServiceConnectionState().status()); Assertions.assertEquals("deupewnwrei", model.privateLinkServiceConnectionState().description()); Assertions.assertEquals("zyf", model.privateLinkServiceConnectionState().actionsRequired()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - PrivateEndpointConnectionSimpleProperties model = - new PrivateEndpointConnectionSimpleProperties() - .withPrivateEndpoint(new PrivateEndpointProperty().withId("jpsq")) - .withGroupIds(Arrays.asList("poyfdkfogkn", "gjofjd")) - .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionState() - .withStatus(PrivateEndpointServiceConnectionStatus.REJECTED) - .withDescription("deupewnwrei") - .withActionsRequired("zyf")); + PrivateEndpointConnectionSimpleProperties model = new PrivateEndpointConnectionSimpleProperties() + .withPrivateEndpoint(new PrivateEndpointProperty().withId("jpsq")) + .withGroupIds(Arrays.asList("poyfdkfogkn", "gjofjd")).withPrivateLinkServiceConnectionState( + new PrivateLinkServiceConnectionState().withStatus(PrivateEndpointServiceConnectionStatus.REJECTED) + .withDescription("deupewnwrei").withActionsRequired("zyf")); model = BinaryData.fromObject(model).toObject(PrivateEndpointConnectionSimpleProperties.class); Assertions.assertEquals("jpsq", model.privateEndpoint().id()); Assertions.assertEquals("poyfdkfogkn", model.groupIds().get(0)); - Assertions - .assertEquals( - PrivateEndpointServiceConnectionStatus.REJECTED, model.privateLinkServiceConnectionState().status()); + Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.REJECTED, + model.privateLinkServiceConnectionState().status()); Assertions.assertEquals("deupewnwrei", model.privateLinkServiceConnectionState().description()); Assertions.assertEquals("zyf", model.privateLinkServiceConnectionState().actionsRequired()); } diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/PrivateEndpointConnectionsCreateOrUpdateMockTests.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/PrivateEndpointConnectionsCreateOrUpdateMockTests.java index 6ff43b30bf2b..f619485a8cc0 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/PrivateEndpointConnectionsCreateOrUpdateMockTests.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/PrivateEndpointConnectionsCreateOrUpdateMockTests.java @@ -33,52 +33,34 @@ public void testCreateOrUpdate() throws Exception { HttpResponse httpResponse = Mockito.mock(HttpResponse.class); ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - String responseStr = - "{\"properties\":{\"groupIds\":[\"dtlwwrlkd\",\"tncvokot\"],\"privateEndpoint\":{\"id\":\"d\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"y\",\"actionsRequired\":\"ogjltdtbnnhad\"},\"provisioningState\":\"Succeeded\"},\"id\":\"kvci\",\"name\":\"hnvpamqgxq\",\"type\":\"u\"}"; + String responseStr + = "{\"properties\":{\"groupIds\":[\"imjwosyt\",\"itc\"],\"privateEndpoint\":{\"id\":\"cktqumiekkezzi\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"fjhdg\",\"actionsRequired\":\"gebdunygaeq\"},\"provisioningState\":\"Succeeded\"},\"id\":\"fatpxllrxcyjmoa\",\"name\":\"su\",\"type\":\"arm\"}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) + Mockito.when(httpResponse.getBody()) .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) + Mockito.when(httpResponse.getBodyAsByteArray()) .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); + Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { + Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); + return Mono.just(httpResponse); + })); - CosmosDBForPostgreSqlManager manager = - CosmosDBForPostgreSqlManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + CosmosDBForPostgreSqlManager manager = CosmosDBForPostgreSqlManager.configure().withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); - PrivateEndpointConnection response = - manager - .privateEndpointConnections() - .define("iyntorzihle") - .withExistingServerGroupsv2("n", "synljphuopxodl") - .withPrivateEndpoint(new PrivateEndpoint()) - .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionState() - .withStatus(PrivateEndpointServiceConnectionStatus.REJECTED) - .withDescription("iizynkedyatrwyh") - .withActionsRequired("ibzyhwitsmyp")) - .create(); + PrivateEndpointConnection response = manager.privateEndpointConnections().define("rey") + .withExistingServerGroupsv2("imfnjhfjx", "mszkkfo").withPrivateEndpoint(new PrivateEndpoint()) + .withPrivateLinkServiceConnectionState( + new PrivateLinkServiceConnectionState().withStatus(PrivateEndpointServiceConnectionStatus.REJECTED) + .withDescription("xwczelpcire").withActionsRequired("feaenwab")) + .create(); - Assertions - .assertEquals( - PrivateEndpointServiceConnectionStatus.REJECTED, response.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("y", response.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("ogjltdtbnnhad", response.privateLinkServiceConnectionState().actionsRequired()); + Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.REJECTED, + response.privateLinkServiceConnectionState().status()); + Assertions.assertEquals("fjhdg", response.privateLinkServiceConnectionState().description()); + Assertions.assertEquals("gebdunygaeq", response.privateLinkServiceConnectionState().actionsRequired()); } } diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/PrivateEndpointConnectionsGetWithResponseMockTests.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/PrivateEndpointConnectionsGetWithResponseMockTests.java index 40be293f8e0c..600aaef5a71c 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/PrivateEndpointConnectionsGetWithResponseMockTests.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/PrivateEndpointConnectionsGetWithResponseMockTests.java @@ -31,45 +31,30 @@ public void testGetWithResponse() throws Exception { HttpResponse httpResponse = Mockito.mock(HttpResponse.class); ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - String responseStr = - "{\"properties\":{\"groupIds\":[\"e\"],\"privateEndpoint\":{\"id\":\"arrwlquu\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"kacewiipfp\",\"actionsRequired\":\"ji\"},\"provisioningState\":\"Creating\"},\"id\":\"f\",\"name\":\"ohqkvpuvksgpls\",\"type\":\"kn\"}"; + String responseStr + = "{\"properties\":{\"groupIds\":[\"rhyrnxxmueed\"],\"privateEndpoint\":{\"id\":\"dvstkw\"},\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"healmfmtda\",\"actionsRequired\":\"gdv\"},\"provisioningState\":\"Failed\"},\"id\":\"iohgwxrtfud\",\"name\":\"epxgyqagvr\",\"type\":\"mnpkukghimdblxg\"}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) + Mockito.when(httpResponse.getBody()) .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) + Mockito.when(httpResponse.getBodyAsByteArray()) .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - CosmosDBForPostgreSqlManager manager = - CosmosDBForPostgreSqlManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PrivateEndpointConnection response = - manager - .privateEndpointConnections() - .getWithResponse("reqnovvqfov", "jxywsuws", "rsndsytgadgvra", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions - .assertEquals( - PrivateEndpointServiceConnectionStatus.REJECTED, response.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("kacewiipfp", response.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("ji", response.privateLinkServiceConnectionState().actionsRequired()); + Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { + Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); + return Mono.just(httpResponse); + })); + + CosmosDBForPostgreSqlManager manager = CosmosDBForPostgreSqlManager.configure().withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); + + PrivateEndpointConnection response = manager.privateEndpointConnections() + .getWithResponse("queziky", "ggxkallatmelwuip", "ccjzkzivgvv", com.azure.core.util.Context.NONE).getValue(); + + Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.PENDING, + response.privateLinkServiceConnectionState().status()); + Assertions.assertEquals("healmfmtda", response.privateLinkServiceConnectionState().description()); + Assertions.assertEquals("gdv", response.privateLinkServiceConnectionState().actionsRequired()); } } diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/PrivateEndpointConnectionsListByClusterMockTests.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/PrivateEndpointConnectionsListByClusterMockTests.java index 31aaba8ff11b..399870ee3055 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/PrivateEndpointConnectionsListByClusterMockTests.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/PrivateEndpointConnectionsListByClusterMockTests.java @@ -32,46 +32,32 @@ public void testListByCluster() throws Exception { HttpResponse httpResponse = Mockito.mock(HttpResponse.class); ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - String responseStr = - "{\"value\":[{\"properties\":{\"groupIds\":[\"uqerpqlpqwc\"],\"privateEndpoint\":{\"id\":\"qgbdbuta\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"tkuwhhmhykojo\",\"actionsRequired\":\"fnndl\"},\"provisioningState\":\"Deleting\"},\"id\":\"koymkcd\",\"name\":\"h\",\"type\":\"pkkpw\"}]}"; + String responseStr + = "{\"value\":[{\"properties\":{\"groupIds\":[\"i\",\"ynkedyatrwyhqmib\",\"yhwitsmypyynpcdp\",\"mnzgmwznmabi\"],\"privateEndpoint\":{\"id\":\"orgjhxbldt\"},\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"lkdmtncvokotllxd\",\"actionsRequired\":\"gsyocogj\"},\"provisioningState\":\"Creating\"},\"id\":\"bnnhadoocrkvcik\",\"name\":\"nvpamq\",\"type\":\"x\"}]}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) + Mockito.when(httpResponse.getBody()) .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) + Mockito.when(httpResponse.getBodyAsByteArray()) .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - CosmosDBForPostgreSqlManager manager = - CosmosDBForPostgreSqlManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.privateEndpointConnections().listByCluster("ulpiuj", "aasipqi", com.azure.core.util.Context.NONE); - - Assertions - .assertEquals( - PrivateEndpointServiceConnectionStatus.APPROVED, - response.iterator().next().privateLinkServiceConnectionState().status()); - Assertions - .assertEquals( - "tkuwhhmhykojo", response.iterator().next().privateLinkServiceConnectionState().description()); - Assertions - .assertEquals("fnndl", response.iterator().next().privateLinkServiceConnectionState().actionsRequired()); + Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { + Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); + return Mono.just(httpResponse); + })); + + CosmosDBForPostgreSqlManager manager = CosmosDBForPostgreSqlManager.configure().withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); + + PagedIterable response = manager.privateEndpointConnections() + .listByCluster("slyzrpzbchckqq", "qioxi", com.azure.core.util.Context.NONE); + + Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.PENDING, + response.iterator().next().privateLinkServiceConnectionState().status()); + Assertions.assertEquals("lkdmtncvokotllxd", + response.iterator().next().privateLinkServiceConnectionState().description()); + Assertions.assertEquals("gsyocogj", + response.iterator().next().privateLinkServiceConnectionState().actionsRequired()); } } diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/PrivateEndpointPropertyTests.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/PrivateEndpointPropertyTests.java index a7d0971439f8..21ffe199bb03 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/PrivateEndpointPropertyTests.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/PrivateEndpointPropertyTests.java @@ -11,8 +11,8 @@ public final class PrivateEndpointPropertyTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - PrivateEndpointProperty model = - BinaryData.fromString("{\"id\":\"sarhmofc\"}").toObject(PrivateEndpointProperty.class); + PrivateEndpointProperty model + = BinaryData.fromString("{\"id\":\"sarhmofc\"}").toObject(PrivateEndpointProperty.class); Assertions.assertEquals("sarhmofc", model.id()); } diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/PrivateEndpointTests.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/PrivateEndpointTests.java index e5dcb3e36225..9c2db1c70f19 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/PrivateEndpointTests.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/PrivateEndpointTests.java @@ -10,7 +10,7 @@ public final class PrivateEndpointTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - PrivateEndpoint model = BinaryData.fromString("{\"id\":\"pikad\"}").toObject(PrivateEndpoint.class); + PrivateEndpoint model = BinaryData.fromString("{\"id\":\"tyq\"}").toObject(PrivateEndpoint.class); } @org.junit.jupiter.api.Test diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/PrivateLinkResourceInnerTests.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/PrivateLinkResourceInnerTests.java index 97e2a9c5e0ae..a22bc26e5c99 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/PrivateLinkResourceInnerTests.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/PrivateLinkResourceInnerTests.java @@ -12,18 +12,17 @@ public final class PrivateLinkResourceInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - PrivateLinkResourceInner model = - BinaryData - .fromString( - "{\"properties\":{\"groupId\":\"xdbabphlwr\",\"requiredMembers\":[\"ktsthsucocmny\"],\"requiredZoneNames\":[\"t\"]},\"id\":\"twwrqp\",\"name\":\"edckzywbiexzfey\",\"type\":\"eaxib\"}") - .toObject(PrivateLinkResourceInner.class); - Assertions.assertEquals("t", model.requiredZoneNames().get(0)); + PrivateLinkResourceInner model = BinaryData.fromString( + "{\"properties\":{\"groupId\":\"lfplp\",\"requiredMembers\":[\"uscrpabgyepsb\"],\"requiredZoneNames\":[\"zq\",\"gxywpmue\",\"fjz\",\"fqkquj\"]},\"id\":\"suyonobglaocq\",\"name\":\"tcc\",\"type\":\"g\"}") + .toObject(PrivateLinkResourceInner.class); + Assertions.assertEquals("zq", model.requiredZoneNames().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - PrivateLinkResourceInner model = new PrivateLinkResourceInner().withRequiredZoneNames(Arrays.asList("t")); + PrivateLinkResourceInner model + = new PrivateLinkResourceInner().withRequiredZoneNames(Arrays.asList("zq", "gxywpmue", "fjz", "fqkquj")); model = BinaryData.fromObject(model).toObject(PrivateLinkResourceInner.class); - Assertions.assertEquals("t", model.requiredZoneNames().get(0)); + Assertions.assertEquals("zq", model.requiredZoneNames().get(0)); } } diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/PrivateLinkResourceListResultTests.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/PrivateLinkResourceListResultTests.java index 787502ef4222..5c94c92e92e8 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/PrivateLinkResourceListResultTests.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/PrivateLinkResourceListResultTests.java @@ -13,24 +13,19 @@ public final class PrivateLinkResourceListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - PrivateLinkResourceListResult model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"groupId\":\"agnb\",\"requiredMembers\":[\"hijggme\",\"fsiarbutr\",\"vpnazzm\"],\"requiredZoneNames\":[\"unmpxttd\",\"hrbnlankxmyskpbh\"]},\"id\":\"btkcxywnytnrsyn\",\"name\":\"qidybyx\",\"type\":\"zfcl\"}]}") - .toObject(PrivateLinkResourceListResult.class); - Assertions.assertEquals("unmpxttd", model.value().get(0).requiredZoneNames().get(0)); + PrivateLinkResourceListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"groupId\":\"ovplw\",\"requiredMembers\":[\"vgyuguos\",\"mkfssxqukkfplgm\",\"sxnkjzkdeslpvlo\"],\"requiredZoneNames\":[\"yighxpk\"]},\"id\":\"zb\",\"name\":\"iuebbaumny\",\"type\":\"upedeojnabckhs\"},{\"properties\":{\"groupId\":\"psiebtfhvpes\",\"requiredMembers\":[\"krdqmh\",\"jdhtldwkyzxu\",\"tkncwsc\"],\"requiredZoneNames\":[\"lxotogtwrupq\",\"xvnmicykvceov\",\"ilovnot\",\"fj\"]},\"id\":\"njbkcnxdhbttkph\",\"name\":\"wpn\",\"type\":\"jtoqne\"}]}") + .toObject(PrivateLinkResourceListResult.class); + Assertions.assertEquals("yighxpk", model.value().get(0).requiredZoneNames().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - PrivateLinkResourceListResult model = - new PrivateLinkResourceListResult() - .withValue( - Arrays - .asList( - new PrivateLinkResourceInner() - .withRequiredZoneNames(Arrays.asList("unmpxttd", "hrbnlankxmyskpbh")))); + PrivateLinkResourceListResult model = new PrivateLinkResourceListResult() + .withValue(Arrays.asList(new PrivateLinkResourceInner().withRequiredZoneNames(Arrays.asList("yighxpk")), + new PrivateLinkResourceInner() + .withRequiredZoneNames(Arrays.asList("lxotogtwrupq", "xvnmicykvceov", "ilovnot", "fj")))); model = BinaryData.fromObject(model).toObject(PrivateLinkResourceListResult.class); - Assertions.assertEquals("unmpxttd", model.value().get(0).requiredZoneNames().get(0)); + Assertions.assertEquals("yighxpk", model.value().get(0).requiredZoneNames().get(0)); } } diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/PrivateLinkResourcePropertiesTests.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/PrivateLinkResourcePropertiesTests.java index 48ebc5326d63..7a37224ea2bc 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/PrivateLinkResourcePropertiesTests.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/PrivateLinkResourcePropertiesTests.java @@ -12,19 +12,17 @@ public final class PrivateLinkResourcePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - PrivateLinkResourceProperties model = - BinaryData - .fromString( - "{\"groupId\":\"jwbhqwalmuz\",\"requiredMembers\":[\"aepdkzjanc\",\"xrhdwbavxbniwdjs\",\"zt\",\"dbpgnxytxhp\"],\"requiredZoneNames\":[\"zpfzabglc\",\"hxw\"]}") - .toObject(PrivateLinkResourceProperties.class); - Assertions.assertEquals("zpfzabglc", model.requiredZoneNames().get(0)); + PrivateLinkResourceProperties model = BinaryData.fromString( + "{\"groupId\":\"dxyt\",\"requiredMembers\":[\"yrxvwfudwpznt\",\"hdzhlrqj\",\"hckfrlhrx\",\"bkyvp\"],\"requiredZoneNames\":[\"n\",\"z\",\"p\",\"kafkuwbcrnwbm\"]}") + .toObject(PrivateLinkResourceProperties.class); + Assertions.assertEquals("n", model.requiredZoneNames().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - PrivateLinkResourceProperties model = - new PrivateLinkResourceProperties().withRequiredZoneNames(Arrays.asList("zpfzabglc", "hxw")); + PrivateLinkResourceProperties model + = new PrivateLinkResourceProperties().withRequiredZoneNames(Arrays.asList("n", "z", "p", "kafkuwbcrnwbm")); model = BinaryData.fromObject(model).toObject(PrivateLinkResourceProperties.class); - Assertions.assertEquals("zpfzabglc", model.requiredZoneNames().get(0)); + Assertions.assertEquals("n", model.requiredZoneNames().get(0)); } } diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/PrivateLinkResourcesGetWithResponseMockTests.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/PrivateLinkResourcesGetWithResponseMockTests.java index e6c3a780c335..51dabaf611e4 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/PrivateLinkResourcesGetWithResponseMockTests.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/PrivateLinkResourcesGetWithResponseMockTests.java @@ -30,41 +30,27 @@ public void testGetWithResponse() throws Exception { HttpResponse httpResponse = Mockito.mock(HttpResponse.class); ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - String responseStr = - "{\"properties\":{\"groupId\":\"ikf\",\"requiredMembers\":[\"n\",\"a\"],\"requiredZoneNames\":[\"wczelpci\",\"elsfeaen\",\"abfatkl\"]},\"id\":\"xbjhwuaanozjosph\",\"name\":\"oulpjrv\",\"type\":\"ag\"}"; + String responseStr + = "{\"properties\":{\"groupId\":\"nwnwme\",\"requiredMembers\":[\"yyceuzsoi\",\"judpfrxt\",\"thzvaytdwkqbrqu\",\"paxh\"],\"requiredZoneNames\":[\"i\",\"ivpdtiir\",\"tdqoaxoruzfgsq\",\"yfxrx\"]},\"id\":\"eptra\",\"name\":\"xje\",\"type\":\"wlwnwxuqlcv\"}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) + Mockito.when(httpResponse.getBody()) .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) + Mockito.when(httpResponse.getBodyAsByteArray()) .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); + Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { + Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); + return Mono.just(httpResponse); + })); - CosmosDBForPostgreSqlManager manager = - CosmosDBForPostgreSqlManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + CosmosDBForPostgreSqlManager manager = CosmosDBForPostgreSqlManager.configure().withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); - PrivateLinkResource response = - manager - .privateLinkResources() - .getWithResponse("imfnjhfjx", "mszkkfo", "rey", com.azure.core.util.Context.NONE) - .getValue(); + PrivateLinkResource response = manager.privateLinkResources() + .getWithResponse("ayffim", "zrtuzq", "gsexne", com.azure.core.util.Context.NONE).getValue(); - Assertions.assertEquals("wczelpci", response.requiredZoneNames().get(0)); + Assertions.assertEquals("i", response.requiredZoneNames().get(0)); } } diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/PrivateLinkResourcesListByClusterMockTests.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/PrivateLinkResourcesListByClusterMockTests.java index 61980b963223..fe0eef0d89eb 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/PrivateLinkResourcesListByClusterMockTests.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/PrivateLinkResourcesListByClusterMockTests.java @@ -31,38 +31,27 @@ public void testListByCluster() throws Exception { HttpResponse httpResponse = Mockito.mock(HttpResponse.class); ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - String responseStr = - "{\"value\":[{\"properties\":{\"groupId\":\"piccjzkzivgv\",\"requiredMembers\":[\"ayrhyrnx\",\"mueedndrdvstk\",\"qqtch\",\"alm\"],\"requiredZoneNames\":[\"d\",\"aygdvwvgpioh\",\"wxrt\"]},\"id\":\"dxepxgyq\",\"name\":\"gvr\",\"type\":\"mnpkukghimdblxg\"}]}"; + String responseStr + = "{\"value\":[{\"properties\":{\"groupId\":\"oduhp\",\"requiredMembers\":[\"gymare\",\"n\",\"jxqugjhky\",\"ubeddg\"],\"requiredZoneNames\":[\"fwqmzqalkrmn\"]},\"id\":\"jpxac\",\"name\":\"qudf\",\"type\":\"byxbaaabjy\"}]}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) + Mockito.when(httpResponse.getBody()) .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) + Mockito.when(httpResponse.getBodyAsByteArray()) .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); + Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { + Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); + return Mono.just(httpResponse); + })); - CosmosDBForPostgreSqlManager manager = - CosmosDBForPostgreSqlManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + CosmosDBForPostgreSqlManager manager = CosmosDBForPostgreSqlManager.configure().withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); - PagedIterable response = - manager.privateLinkResources().listByCluster("zikywgg", "kallatmel", com.azure.core.util.Context.NONE); + PagedIterable response + = manager.privateLinkResources().listByCluster("wdmjsjqbjhhyx", "rw", com.azure.core.util.Context.NONE); - Assertions.assertEquals("d", response.iterator().next().requiredZoneNames().get(0)); + Assertions.assertEquals("fwqmzqalkrmn", response.iterator().next().requiredZoneNames().get(0)); } } diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/PrivateLinkServiceConnectionStateTests.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/PrivateLinkServiceConnectionStateTests.java index ce419c04369b..9f822e1b4524 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/PrivateLinkServiceConnectionStateTests.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/PrivateLinkServiceConnectionStateTests.java @@ -12,11 +12,9 @@ public final class PrivateLinkServiceConnectionStateTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - PrivateLinkServiceConnectionState model = - BinaryData - .fromString( - "{\"status\":\"Approved\",\"description\":\"yurkdtmlxhekuksj\",\"actionsRequired\":\"ukcdmparcryuanzw\"}") - .toObject(PrivateLinkServiceConnectionState.class); + PrivateLinkServiceConnectionState model = BinaryData.fromString( + "{\"status\":\"Approved\",\"description\":\"yurkdtmlxhekuksj\",\"actionsRequired\":\"ukcdmparcryuanzw\"}") + .toObject(PrivateLinkServiceConnectionState.class); Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.APPROVED, model.status()); Assertions.assertEquals("yurkdtmlxhekuksj", model.description()); Assertions.assertEquals("ukcdmparcryuanzw", model.actionsRequired()); @@ -24,11 +22,9 @@ public void testDeserialize() throws Exception { @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - PrivateLinkServiceConnectionState model = - new PrivateLinkServiceConnectionState() - .withStatus(PrivateEndpointServiceConnectionStatus.APPROVED) - .withDescription("yurkdtmlxhekuksj") - .withActionsRequired("ukcdmparcryuanzw"); + PrivateLinkServiceConnectionState model + = new PrivateLinkServiceConnectionState().withStatus(PrivateEndpointServiceConnectionStatus.APPROVED) + .withDescription("yurkdtmlxhekuksj").withActionsRequired("ukcdmparcryuanzw"); model = BinaryData.fromObject(model).toObject(PrivateLinkServiceConnectionState.class); Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.APPROVED, model.status()); Assertions.assertEquals("yurkdtmlxhekuksj", model.description()); diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/PromoteRequestTests.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/PromoteRequestTests.java new file mode 100644 index 000000000000..9fb0bc976254 --- /dev/null +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/PromoteRequestTests.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.cosmosdbforpostgresql.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.cosmosdbforpostgresql.models.PromoteRequest; +import org.junit.jupiter.api.Assertions; + +public final class PromoteRequestTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PromoteRequest model = BinaryData.fromString("{\"enableGeoBackup\":false}").toObject(PromoteRequest.class); + Assertions.assertEquals(false, model.enableGeoBackup()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + PromoteRequest model = new PromoteRequest().withEnableGeoBackup(false); + model = BinaryData.fromObject(model).toObject(PromoteRequest.class); + Assertions.assertEquals(false, model.enableGeoBackup()); + } +} diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/RolePropertiesExternalIdentityTests.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/RolePropertiesExternalIdentityTests.java new file mode 100644 index 000000000000..b5e217cce81c --- /dev/null +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/RolePropertiesExternalIdentityTests.java @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.cosmosdbforpostgresql.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.cosmosdbforpostgresql.fluent.models.RolePropertiesExternalIdentity; +import com.azure.resourcemanager.cosmosdbforpostgresql.models.PrincipalType; +import org.junit.jupiter.api.Assertions; + +public final class RolePropertiesExternalIdentityTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + RolePropertiesExternalIdentity model = BinaryData + .fromString("{\"objectId\":\"vvnchrkcc\",\"principalType\":\"user\",\"tenantId\":\"zjuqkhrsaj\"}") + .toObject(RolePropertiesExternalIdentity.class); + Assertions.assertEquals("vvnchrkcc", model.objectId()); + Assertions.assertEquals(PrincipalType.USER, model.principalType()); + Assertions.assertEquals("zjuqkhrsaj", model.tenantId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + RolePropertiesExternalIdentity model = new RolePropertiesExternalIdentity().withObjectId("vvnchrkcc") + .withPrincipalType(PrincipalType.USER).withTenantId("zjuqkhrsaj"); + model = BinaryData.fromObject(model).toObject(RolePropertiesExternalIdentity.class); + Assertions.assertEquals("vvnchrkcc", model.objectId()); + Assertions.assertEquals(PrincipalType.USER, model.principalType()); + Assertions.assertEquals("zjuqkhrsaj", model.tenantId()); + } +} diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ServerConfigurationInnerTests.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ServerConfigurationInnerTests.java index 4e03d99e1921..bc2fea8e7219 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ServerConfigurationInnerTests.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ServerConfigurationInnerTests.java @@ -11,18 +11,16 @@ public final class ServerConfigurationInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ServerConfigurationInner model = - BinaryData - .fromString( - "{\"properties\":{\"value\":\"umkdosvqwhbmd\",\"source\":\"bjf\",\"description\":\"gmbmbexppbh\",\"defaultValue\":\"qrolfpf\",\"dataType\":\"Enumeration\",\"allowedValues\":\"gbquxigj\",\"requiresRestart\":true,\"provisioningState\":\"InProgress\"},\"id\":\"o\",\"name\":\"fhrtxilnerkujysv\",\"type\":\"eju\"}") - .toObject(ServerConfigurationInner.class); - Assertions.assertEquals("umkdosvqwhbmd", model.value()); + ServerConfigurationInner model = BinaryData.fromString( + "{\"properties\":{\"value\":\"zafb\",\"source\":\"j\",\"description\":\"btoqcjmkljavbqid\",\"defaultValue\":\"ajzyul\",\"dataType\":\"Boolean\",\"allowedValues\":\"jkrlkhbzhfepg\",\"requiresRestart\":false,\"provisioningState\":\"InProgress\"},\"id\":\"locx\",\"name\":\"c\",\"type\":\"aierhhb\"}") + .toObject(ServerConfigurationInner.class); + Assertions.assertEquals("zafb", model.value()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ServerConfigurationInner model = new ServerConfigurationInner().withValue("umkdosvqwhbmd"); + ServerConfigurationInner model = new ServerConfigurationInner().withValue("zafb"); model = BinaryData.fromObject(model).toObject(ServerConfigurationInner.class); - Assertions.assertEquals("umkdosvqwhbmd", model.value()); + Assertions.assertEquals("zafb", model.value()); } } diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ServerConfigurationListResultTests.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ServerConfigurationListResultTests.java index 6142a9f7cd22..97e8bdd47b61 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ServerConfigurationListResultTests.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ServerConfigurationListResultTests.java @@ -13,26 +13,19 @@ public final class ServerConfigurationListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ServerConfigurationListResult model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"value\":\"ispe\",\"source\":\"tzfkufubl\",\"description\":\"fxqeof\",\"defaultValue\":\"e\",\"dataType\":\"Integer\",\"allowedValues\":\"jbasvmsmjqulngs\",\"requiresRestart\":true,\"provisioningState\":\"Canceled\"},\"id\":\"kzgcwrwcl\",\"name\":\"xwrljdouskcqvkoc\",\"type\":\"cjdkwtnhxbnjbi\"},{\"properties\":{\"value\":\"qrglssainqpjwn\",\"source\":\"ljfmppee\",\"description\":\"mgxsab\",\"defaultValue\":\"qduujitcjczdz\",\"dataType\":\"Numeric\",\"allowedValues\":\"hkr\",\"requiresRestart\":false,\"provisioningState\":\"InProgress\"},\"id\":\"dsbdkvwrwjf\",\"name\":\"usnhutje\",\"type\":\"tmrldhugjzzdatq\"},{\"properties\":{\"value\":\"oc\",\"source\":\"eablg\",\"description\":\"uticndvkaozwyif\",\"defaultValue\":\"hxh\",\"dataType\":\"Enumeration\",\"allowedValues\":\"ftyxolniw\",\"requiresRestart\":false,\"provisioningState\":\"Canceled\"},\"id\":\"fkgiawxk\",\"name\":\"ryplwckbasyypn\",\"type\":\"dhsgcba\"},{\"properties\":{\"value\":\"hejkotynqgou\",\"source\":\"ndlik\",\"description\":\"qkgfgibma\",\"defaultValue\":\"akeqs\",\"dataType\":\"Boolean\",\"allowedValues\":\"zqqedq\",\"requiresRestart\":true,\"provisioningState\":\"InProgress\"},\"id\":\"fouflmmnkzsmo\",\"name\":\"mglougpbkw\",\"type\":\"mutduqktaps\"}],\"nextLink\":\"gcue\"}") - .toObject(ServerConfigurationListResult.class); - Assertions.assertEquals("ispe", model.value().get(0).value()); + ServerConfigurationListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"value\":\"duqkt\",\"source\":\"spwgcuertumkdosv\",\"description\":\"hbmdgbbjfdd\",\"defaultValue\":\"bmbexppbhtqqro\",\"dataType\":\"Boolean\",\"allowedValues\":\"psalgbqux\",\"requiresRestart\":false,\"provisioningState\":\"InProgress\"},\"id\":\"zjaoyfhrtxil\",\"name\":\"erkujys\",\"type\":\"l\"},{\"properties\":{\"value\":\"uvfqawrlyxwj\",\"source\":\"prbnwbxgjvtbv\",\"description\":\"sszdnru\",\"defaultValue\":\"guhmuouqfpr\",\"dataType\":\"Integer\",\"allowedValues\":\"nguitnwuizgazxu\",\"requiresRestart\":false,\"provisioningState\":\"Canceled\"},\"id\":\"y\",\"name\":\"i\",\"type\":\"rfidfvzwdz\"},{\"properties\":{\"value\":\"tymw\",\"source\":\"dkfthwxmnt\",\"description\":\"waopvkmijcmmxd\",\"defaultValue\":\"fufsrpymzi\",\"dataType\":\"Numeric\",\"allowedValues\":\"zcxtbzsgfyccsn\",\"requiresRestart\":true,\"provisioningState\":\"Canceled\"},\"id\":\"jeiachboosfl\",\"name\":\"ro\",\"type\":\"fqpte\"},{\"properties\":{\"value\":\"zzvypyqrimzinp\",\"source\":\"wjdk\",\"description\":\"soodqxhcrmnoh\",\"defaultValue\":\"ckwhds\",\"dataType\":\"Enumeration\",\"allowedValues\":\"yip\",\"requiresRestart\":false,\"provisioningState\":\"InProgress\"},\"id\":\"gr\",\"name\":\"bznorcjxvsnby\",\"type\":\"qabnmoc\"}],\"nextLink\":\"ysh\"}") + .toObject(ServerConfigurationListResult.class); + Assertions.assertEquals("duqkt", model.value().get(0).value()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ServerConfigurationListResult model = - new ServerConfigurationListResult() - .withValue( - Arrays - .asList( - new ServerConfigurationInner().withValue("ispe"), - new ServerConfigurationInner().withValue("qrglssainqpjwn"), - new ServerConfigurationInner().withValue("oc"), - new ServerConfigurationInner().withValue("hejkotynqgou"))); + ServerConfigurationListResult model = new ServerConfigurationListResult().withValue(Arrays.asList( + new ServerConfigurationInner().withValue("duqkt"), new ServerConfigurationInner().withValue("uvfqawrlyxwj"), + new ServerConfigurationInner().withValue("tymw"), + new ServerConfigurationInner().withValue("zzvypyqrimzinp"))); model = BinaryData.fromObject(model).toObject(ServerConfigurationListResult.class); - Assertions.assertEquals("ispe", model.value().get(0).value()); + Assertions.assertEquals("duqkt", model.value().get(0).value()); } } diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ServerConfigurationPropertiesTests.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ServerConfigurationPropertiesTests.java index 2f22cf45cd9c..389b070b5d55 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ServerConfigurationPropertiesTests.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ServerConfigurationPropertiesTests.java @@ -11,18 +11,16 @@ public final class ServerConfigurationPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ServerConfigurationProperties model = - BinaryData - .fromString( - "{\"value\":\"fqawrlyxw\",\"source\":\"cpr\",\"description\":\"wbxgjvt\",\"defaultValue\":\"p\",\"dataType\":\"Numeric\",\"allowedValues\":\"dnrujqguhmuouqfp\",\"requiresRestart\":false,\"provisioningState\":\"Canceled\"}") - .toObject(ServerConfigurationProperties.class); - Assertions.assertEquals("fqawrlyxw", model.value()); + ServerConfigurationProperties model = BinaryData.fromString( + "{\"value\":\"sglumma\",\"source\":\"j\",\"description\":\"dxob\",\"defaultValue\":\"dxkqpx\",\"dataType\":\"Enumeration\",\"allowedValues\":\"ionpimexg\",\"requiresRestart\":false,\"provisioningState\":\"Succeeded\"}") + .toObject(ServerConfigurationProperties.class); + Assertions.assertEquals("sglumma", model.value()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ServerConfigurationProperties model = new ServerConfigurationProperties().withValue("fqawrlyxw"); + ServerConfigurationProperties model = new ServerConfigurationProperties().withValue("sglumma"); model = BinaryData.fromObject(model).toObject(ServerConfigurationProperties.class); - Assertions.assertEquals("fqawrlyxw", model.value()); + Assertions.assertEquals("sglumma", model.value()); } } diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ServerNameItemTests.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ServerNameItemTests.java index fcc94da87c39..9d9356a7355f 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ServerNameItemTests.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ServerNameItemTests.java @@ -11,9 +11,8 @@ public final class ServerNameItemTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ServerNameItem model = - BinaryData - .fromString("{\"name\":\"fpownoizhwlr\",\"fullyQualifiedDomainName\":\"bqsoqijg\"}") + ServerNameItem model + = BinaryData.fromString("{\"name\":\"fpownoizhwlr\",\"fullyQualifiedDomainName\":\"bqsoqijg\"}") .toObject(ServerNameItem.class); Assertions.assertEquals("fpownoizhwlr", model.name()); } diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ServerPropertiesTests.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ServerPropertiesTests.java index f3627203cde0..9eb49a00a792 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ServerPropertiesTests.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ServerPropertiesTests.java @@ -11,29 +11,23 @@ public final class ServerPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ServerProperties model = - BinaryData - .fromString( - "{\"serverEdition\":\"yevc\",\"storageQuotaInMb\":308422624,\"vCores\":284710625,\"enableHa\":true,\"enablePublicIpAccess\":false,\"isReadOnly\":false,\"administratorLogin\":\"jzrnf\"}") - .toObject(ServerProperties.class); - Assertions.assertEquals("yevc", model.serverEdition()); - Assertions.assertEquals(308422624, model.storageQuotaInMb()); - Assertions.assertEquals(284710625, model.vCores()); - Assertions.assertEquals(true, model.enableHa()); + ServerProperties model = BinaryData.fromString( + "{\"serverEdition\":\"bciqfouflm\",\"storageQuotaInMb\":1828393347,\"vCores\":492225371,\"enableHa\":false,\"enablePublicIpAccess\":true,\"isReadOnly\":false,\"administratorLogin\":\"ugpbkw\"}") + .toObject(ServerProperties.class); + Assertions.assertEquals("bciqfouflm", model.serverEdition()); + Assertions.assertEquals(1828393347, model.storageQuotaInMb()); + Assertions.assertEquals(492225371, model.vCores()); + Assertions.assertEquals(false, model.enableHa()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ServerProperties model = - new ServerProperties() - .withServerEdition("yevc") - .withStorageQuotaInMb(308422624) - .withVCores(284710625) - .withEnableHa(true); + ServerProperties model = new ServerProperties().withServerEdition("bciqfouflm").withStorageQuotaInMb(1828393347) + .withVCores(492225371).withEnableHa(false); model = BinaryData.fromObject(model).toObject(ServerProperties.class); - Assertions.assertEquals("yevc", model.serverEdition()); - Assertions.assertEquals(308422624, model.storageQuotaInMb()); - Assertions.assertEquals(284710625, model.vCores()); - Assertions.assertEquals(true, model.enableHa()); + Assertions.assertEquals("bciqfouflm", model.serverEdition()); + Assertions.assertEquals(1828393347, model.storageQuotaInMb()); + Assertions.assertEquals(492225371, model.vCores()); + Assertions.assertEquals(false, model.enableHa()); } } diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ServerRoleGroupConfigurationTests.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ServerRoleGroupConfigurationTests.java index 3aad6504c215..b1ade11817c1 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ServerRoleGroupConfigurationTests.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ServerRoleGroupConfigurationTests.java @@ -12,21 +12,19 @@ public final class ServerRoleGroupConfigurationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ServerRoleGroupConfiguration model = - BinaryData - .fromString( - "{\"role\":\"Worker\",\"value\":\"imexgstxgcpodgma\",\"defaultValue\":\"r\",\"source\":\"djwzrlov\"}") - .toObject(ServerRoleGroupConfiguration.class); - Assertions.assertEquals(ServerRole.WORKER, model.role()); - Assertions.assertEquals("imexgstxgcpodgma", model.value()); + ServerRoleGroupConfiguration model = BinaryData.fromString( + "{\"role\":\"Coordinator\",\"value\":\"oaeupfhyhltrpmo\",\"defaultValue\":\"mcmatuokthfuiu\",\"source\":\"dsfcpkvxodpuoz\"}") + .toObject(ServerRoleGroupConfiguration.class); + Assertions.assertEquals(ServerRole.COORDINATOR, model.role()); + Assertions.assertEquals("oaeupfhyhltrpmo", model.value()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ServerRoleGroupConfiguration model = - new ServerRoleGroupConfiguration().withRole(ServerRole.WORKER).withValue("imexgstxgcpodgma"); + ServerRoleGroupConfiguration model + = new ServerRoleGroupConfiguration().withRole(ServerRole.COORDINATOR).withValue("oaeupfhyhltrpmo"); model = BinaryData.fromObject(model).toObject(ServerRoleGroupConfiguration.class); - Assertions.assertEquals(ServerRole.WORKER, model.role()); - Assertions.assertEquals("imexgstxgcpodgma", model.value()); + Assertions.assertEquals(ServerRole.COORDINATOR, model.role()); + Assertions.assertEquals("oaeupfhyhltrpmo", model.value()); } } diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ServersGetWithResponseMockTests.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ServersGetWithResponseMockTests.java index 1cd68c156603..a8c63dde9614 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ServersGetWithResponseMockTests.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ServersGetWithResponseMockTests.java @@ -31,48 +31,35 @@ public void testGetWithResponse() throws Exception { HttpResponse httpResponse = Mockito.mock(HttpResponse.class); ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - String responseStr = - "{\"properties\":{\"fullyQualifiedDomainName\":\"laexqp\",\"role\":\"Coordinator\",\"state\":\"mwsrcrgvxpvgo\",\"haState\":\"lf\",\"availabilityZone\":\"sgwbnbbeld\",\"postgresqlVersion\":\"k\",\"citusVersion\":\"ali\",\"serverEdition\":\"rqhakauha\",\"storageQuotaInMb\":798376166,\"vCores\":706986266,\"enableHa\":false,\"enablePublicIpAccess\":false,\"isReadOnly\":false,\"administratorLogin\":\"cugicjoox\"},\"id\":\"ebwpucwwfvo\",\"name\":\"bvmeuecivy\",\"type\":\"zceuojgjrw\"}"; + String responseStr + = "{\"properties\":{\"fullyQualifiedDomainName\":\"xrmcqibycnojvk\",\"role\":\"Coordinator\",\"state\":\"qsgzvahapj\",\"haState\":\"hpvgqz\",\"availabilityZone\":\"rvxdjzlmw\",\"postgresqlVersion\":\"kvugfhzovawjvzun\",\"citusVersion\":\"thnnpr\",\"serverEdition\":\"i\",\"storageQuotaInMb\":1381337865,\"vCores\":1073043267,\"enableHa\":false,\"enablePublicIpAccess\":false,\"isReadOnly\":true,\"administratorLogin\":\"dultskz\"},\"id\":\"tdzumveekgpw\",\"name\":\"zuhkfpbsjyof\",\"type\":\"xl\"}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) + Mockito.when(httpResponse.getBody()) .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) + Mockito.when(httpResponse.getBodyAsByteArray()) .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); + Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { + Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); + return Mono.just(httpResponse); + })); - CosmosDBForPostgreSqlManager manager = - CosmosDBForPostgreSqlManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + CosmosDBForPostgreSqlManager manager = CosmosDBForPostgreSqlManager.configure().withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); - ClusterServer response = - manager - .servers() - .getWithResponse("ofmxagkvtmelmqkr", "ahvljuaha", "uhcdhm", com.azure.core.util.Context.NONE) - .getValue(); + ClusterServer response = manager.servers() + .getWithResponse("mtsavjcbpwxqp", "rknftguvriuhprwm", "yvxqtayriwwroy", com.azure.core.util.Context.NONE) + .getValue(); Assertions.assertEquals(ServerRole.COORDINATOR, response.role()); - Assertions.assertEquals("sgwbnbbeld", response.availabilityZone()); - Assertions.assertEquals("k", response.postgresqlVersion()); - Assertions.assertEquals("ali", response.citusVersion()); - Assertions.assertEquals("rqhakauha", response.serverEdition()); - Assertions.assertEquals(798376166, response.storageQuotaInMb()); - Assertions.assertEquals(706986266, response.vCores()); + Assertions.assertEquals("rvxdjzlmw", response.availabilityZone()); + Assertions.assertEquals("kvugfhzovawjvzun", response.postgresqlVersion()); + Assertions.assertEquals("thnnpr", response.citusVersion()); + Assertions.assertEquals("i", response.serverEdition()); + Assertions.assertEquals(1381337865, response.storageQuotaInMb()); + Assertions.assertEquals(1073043267, response.vCores()); Assertions.assertEquals(false, response.enableHa()); } } diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ServersListByClusterMockTests.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ServersListByClusterMockTests.java index 5a50d4c1101d..6fa8929c30be 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ServersListByClusterMockTests.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/ServersListByClusterMockTests.java @@ -32,45 +32,34 @@ public void testListByCluster() throws Exception { HttpResponse httpResponse = Mockito.mock(HttpResponse.class); ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - String responseStr = - "{\"value\":[{\"properties\":{\"fullyQualifiedDomainName\":\"kqujidsuyono\",\"role\":\"Worker\",\"state\":\"ocqxtccmg\",\"haState\":\"dxyt\",\"availabilityZone\":\"oyrxvwfudwpzntxh\",\"postgresqlVersion\":\"hl\",\"citusVersion\":\"jbhckfrlhr\",\"serverEdition\":\"bkyvp\",\"storageQuotaInMb\":1219489836,\"vCores\":427278595,\"enableHa\":true,\"enablePublicIpAccess\":false,\"isReadOnly\":false,\"administratorLogin\":\"kuwbcrnwb\"},\"id\":\"hhseyv\",\"name\":\"us\",\"type\":\"tslhspkdeem\"}]}"; + String responseStr + = "{\"value\":[{\"properties\":{\"fullyQualifiedDomainName\":\"btdhxujznbm\",\"role\":\"Worker\",\"state\":\"wpr\",\"haState\":\"lve\",\"availabilityZone\":\"lupj\",\"postgresqlVersion\":\"hfxobbcswsrtj\",\"citusVersion\":\"plrbpbewtghf\",\"serverEdition\":\"lcgwxzvlvqh\",\"storageQuotaInMb\":1823532721,\"vCores\":1432172672,\"enableHa\":false,\"enablePublicIpAccess\":true,\"isReadOnly\":true,\"administratorLogin\":\"ebwwaloayqc\"},\"id\":\"rtzju\",\"name\":\"gwyzm\",\"type\":\"txon\"}]}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) + Mockito.when(httpResponse.getBody()) .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) + Mockito.when(httpResponse.getBodyAsByteArray()) .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); + Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { + Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); + return Mono.just(httpResponse); + })); - CosmosDBForPostgreSqlManager manager = - CosmosDBForPostgreSqlManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + CosmosDBForPostgreSqlManager manager = CosmosDBForPostgreSqlManager.configure().withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); - PagedIterable response = - manager.servers().listByCluster("gxywpmue", "fjz", com.azure.core.util.Context.NONE); + PagedIterable response + = manager.servers().listByCluster("kxfbkpycgklwndn", "jdauwhvy", com.azure.core.util.Context.NONE); Assertions.assertEquals(ServerRole.WORKER, response.iterator().next().role()); - Assertions.assertEquals("oyrxvwfudwpzntxh", response.iterator().next().availabilityZone()); - Assertions.assertEquals("hl", response.iterator().next().postgresqlVersion()); - Assertions.assertEquals("jbhckfrlhr", response.iterator().next().citusVersion()); - Assertions.assertEquals("bkyvp", response.iterator().next().serverEdition()); - Assertions.assertEquals(1219489836, response.iterator().next().storageQuotaInMb()); - Assertions.assertEquals(427278595, response.iterator().next().vCores()); - Assertions.assertEquals(true, response.iterator().next().enableHa()); + Assertions.assertEquals("lupj", response.iterator().next().availabilityZone()); + Assertions.assertEquals("hfxobbcswsrtj", response.iterator().next().postgresqlVersion()); + Assertions.assertEquals("plrbpbewtghf", response.iterator().next().citusVersion()); + Assertions.assertEquals("lcgwxzvlvqh", response.iterator().next().serverEdition()); + Assertions.assertEquals(1823532721, response.iterator().next().storageQuotaInMb()); + Assertions.assertEquals(1432172672, response.iterator().next().vCores()); + Assertions.assertEquals(false, response.iterator().next().enableHa()); } } diff --git a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/SimplePrivateEndpointConnectionTests.java b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/SimplePrivateEndpointConnectionTests.java index 49a5955c5d3c..6271464e19bc 100644 --- a/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/SimplePrivateEndpointConnectionTests.java +++ b/sdk/cosmosdbforpostgresql/azure-resourcemanager-cosmosdbforpostgresql/src/test/java/com/azure/resourcemanager/cosmosdbforpostgresql/generated/SimplePrivateEndpointConnectionTests.java @@ -15,37 +15,29 @@ public final class SimplePrivateEndpointConnectionTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - SimplePrivateEndpointConnection model = - BinaryData - .fromString( - "{\"properties\":{\"privateEndpoint\":{\"id\":\"pazlobcufpdz\"},\"groupIds\":[\"t\",\"qqjnqgl\"],\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"foooj\",\"actionsRequired\":\"ifsqesaagdfmg\"}},\"id\":\"lhjxr\",\"name\":\"f\",\"type\":\"wmrvktsizntocipa\"}") - .toObject(SimplePrivateEndpointConnection.class); + SimplePrivateEndpointConnection model = BinaryData.fromString( + "{\"properties\":{\"privateEndpoint\":{\"id\":\"pazlobcufpdz\"},\"groupIds\":[\"t\",\"qqjnqgl\"],\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"foooj\",\"actionsRequired\":\"ifsqesaagdfmg\"}},\"id\":\"lhjxr\",\"name\":\"f\",\"type\":\"wmrvktsizntocipa\"}") + .toObject(SimplePrivateEndpointConnection.class); Assertions.assertEquals("pazlobcufpdz", model.privateEndpoint().id()); Assertions.assertEquals("t", model.groupIds().get(0)); - Assertions - .assertEquals( - PrivateEndpointServiceConnectionStatus.PENDING, model.privateLinkServiceConnectionState().status()); + Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.PENDING, + model.privateLinkServiceConnectionState().status()); Assertions.assertEquals("foooj", model.privateLinkServiceConnectionState().description()); Assertions.assertEquals("ifsqesaagdfmg", model.privateLinkServiceConnectionState().actionsRequired()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - SimplePrivateEndpointConnection model = - new SimplePrivateEndpointConnection() - .withPrivateEndpoint(new PrivateEndpointProperty().withId("pazlobcufpdz")) - .withGroupIds(Arrays.asList("t", "qqjnqgl")) - .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionState() - .withStatus(PrivateEndpointServiceConnectionStatus.PENDING) - .withDescription("foooj") - .withActionsRequired("ifsqesaagdfmg")); + SimplePrivateEndpointConnection model = new SimplePrivateEndpointConnection() + .withPrivateEndpoint(new PrivateEndpointProperty().withId("pazlobcufpdz")) + .withGroupIds(Arrays.asList("t", "qqjnqgl")).withPrivateLinkServiceConnectionState( + new PrivateLinkServiceConnectionState().withStatus(PrivateEndpointServiceConnectionStatus.PENDING) + .withDescription("foooj").withActionsRequired("ifsqesaagdfmg")); model = BinaryData.fromObject(model).toObject(SimplePrivateEndpointConnection.class); Assertions.assertEquals("pazlobcufpdz", model.privateEndpoint().id()); Assertions.assertEquals("t", model.groupIds().get(0)); - Assertions - .assertEquals( - PrivateEndpointServiceConnectionStatus.PENDING, model.privateLinkServiceConnectionState().status()); + Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.PENDING, + model.privateLinkServiceConnectionState().status()); Assertions.assertEquals("foooj", model.privateLinkServiceConnectionState().description()); Assertions.assertEquals("ifsqesaagdfmg", model.privateLinkServiceConnectionState().actionsRequired()); }