diff --git a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/CHANGELOG.md b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/CHANGELOG.md index 8ebcc001829b..0d9c29712383 100644 --- a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/CHANGELOG.md +++ b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/CHANGELOG.md @@ -1,14 +1,127 @@ # Release History -## 1.1.0-beta.1 (Unreleased) +## 1.1.0-beta.1 (2025-05-06) -### Features Added +- Azure Resource Manager Neon Postgres client library for Java. This package contains Microsoft Azure SDK for Neon Postgres Management SDK. 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.NeonDatabase$Definition` was removed + +#### `models.NeonRole$DefinitionStages` was removed + +#### `models.Compute$DefinitionStages` was removed + +#### `models.Endpoint$DefinitionStages` was removed + +#### `models.Endpoint$Definition` was removed + +#### `models.Endpoint$Update` was removed + +#### `models.NeonDatabase$Update` was removed + +#### `models.Compute$Definition` was removed + +#### `models.Compute$Update` was removed + +#### `models.NeonRole$Definition` was removed + +#### `models.NeonDatabase$UpdateStages` was removed + +#### `models.NeonRole$Update` was removed + +#### `models.NeonDatabase$DefinitionStages` was removed + +#### `models.Compute$UpdateStages` was removed + +#### `models.Endpoint$UpdateStages` was removed + +#### `models.NeonRole$UpdateStages` was removed + +#### `models.NeonRoles` was modified + +* `define(java.lang.String)` was removed +* `deleteById(java.lang.String)` was removed +* `deleteByIdWithResponse(java.lang.String,com.azure.core.util.Context)` was removed +* `deleteWithResponse(java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed +* `get(java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String)` was removed +* `getById(java.lang.String)` was removed +* `getByIdWithResponse(java.lang.String,com.azure.core.util.Context)` was removed +* `getWithResponse(java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed +* `delete(java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String)` was removed + +#### `models.NeonDatabases` was modified + +* `deleteById(java.lang.String)` was removed +* `get(java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String)` was removed +* `deleteWithResponse(java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed +* `getById(java.lang.String)` was removed +* `getByIdWithResponse(java.lang.String,com.azure.core.util.Context)` was removed +* `getWithResponse(java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed +* `delete(java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String)` was removed +* `define(java.lang.String)` was removed +* `deleteByIdWithResponse(java.lang.String,com.azure.core.util.Context)` was removed + +#### `models.Computes` was modified + +* `getByIdWithResponse(java.lang.String,com.azure.core.util.Context)` was removed +* `getWithResponse(java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed +* `get(java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String)` was removed +* `delete(java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String)` was removed +* `getById(java.lang.String)` was removed +* `deleteById(java.lang.String)` was removed +* `define(java.lang.String)` was removed +* `deleteWithResponse(java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed +* `deleteByIdWithResponse(java.lang.String,com.azure.core.util.Context)` was removed + +#### `models.Endpoint` was modified + +* `update()` was removed +* `resourceGroupName()` was removed +* `refresh()` was removed +* `refresh(com.azure.core.util.Context)` was removed + +#### `models.NeonDatabase` was modified + +* `refresh(com.azure.core.util.Context)` was removed +* `resourceGroupName()` was removed +* `update()` was removed +* `refresh()` was removed + +#### `models.NeonRole` was modified + +* `refresh()` was removed +* `update()` was removed +* `resourceGroupName()` was removed +* `refresh(com.azure.core.util.Context)` was removed + +#### `models.Endpoints` was modified + +* `getWithResponse(java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed +* `getByIdWithResponse(java.lang.String,com.azure.core.util.Context)` was removed +* `deleteById(java.lang.String)` was removed +* `define(java.lang.String)` was removed +* `deleteByIdWithResponse(java.lang.String,com.azure.core.util.Context)` was removed +* `delete(java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String)` was removed +* `deleteWithResponse(java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed +* `get(java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String)` was removed +* `getById(java.lang.String)` was removed + +#### `models.Compute` was modified + +* `resourceGroupName()` was removed +* `refresh(com.azure.core.util.Context)` was removed +* `update()` was removed +* `refresh()` was removed + +#### `models.ComputeProperties` was modified -### Other Changes +* `withAttributes(java.util.List)` was removed +* `withMemory(java.lang.Integer)` was removed +* `withCpuCores(java.lang.Integer)` was removed +* `withEntityName(java.lang.String)` was removed +* `withRegion(java.lang.String)` was removed +* `withStatus(java.lang.String)` was removed ## 1.0.0 (2025-04-21) diff --git a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/README.md b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/README.md index 9c83b5c2d7d1..cba91e7764fa 100644 --- a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/README.md +++ b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/README.md @@ -32,7 +32,7 @@ Various documentation is available to help you get started com.azure.resourcemanager azure-resourcemanager-neonpostgres - 1.0.0 + 1.1.0-beta.1 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/SAMPLE.md b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/SAMPLE.md index cf151d9acbbf..4df73291431b 100644 --- a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/SAMPLE.md +++ b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/SAMPLE.md @@ -7,39 +7,22 @@ - [Delete](#branches_delete) - [Get](#branches_get) - [List](#branches_list) -- [Update](#branches_update) ## Computes -- [CreateOrUpdate](#computes_createorupdate) -- [Delete](#computes_delete) -- [Get](#computes_get) - [List](#computes_list) -- [Update](#computes_update) ## Endpoints -- [CreateOrUpdate](#endpoints_createorupdate) -- [Delete](#endpoints_delete) -- [Get](#endpoints_get) - [List](#endpoints_list) -- [Update](#endpoints_update) ## NeonDatabases -- [CreateOrUpdate](#neondatabases_createorupdate) -- [Delete](#neondatabases_delete) -- [Get](#neondatabases_get) - [List](#neondatabases_list) -- [Update](#neondatabases_update) ## NeonRoles -- [CreateOrUpdate](#neonroles_createorupdate) -- [Delete](#neonroles_delete) -- [Get](#neonroles_get) - [List](#neonroles_list) -- [Update](#neonroles_update) ## Operations @@ -62,32 +45,8 @@ - [Get](#projects_get) - [GetConnectionUri](#projects_getconnectionuri) - [List](#projects_list) -- [Update](#projects_update) ### Branches_CreateOrUpdate -```java -/** - * Samples for Computes Get. - */ -public final class ComputesGetSamples { - /* - * x-ms-original-file: 2025-03-01/Computes_Get_MaximumSet_Gen.json - */ - /** - * Sample code: Computes_Get_MaximumSet. - * - * @param manager Entry point to NeonPostgresManager. - */ - public static void computesGetMaximumSet(com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { - manager.computes() - .getWithResponse("rgneon", "test-org", "entity-name", "entity-name", "entity-name", - com.azure.core.util.Context.NONE); - } -} -``` - -### Branches_Delete - ```java import com.azure.resourcemanager.neonpostgres.fluent.models.ConnectionUriPropertiesInner; @@ -99,14 +58,15 @@ public final class ProjectsGetConnectionUriSamples { * x-ms-original-file: 2025-03-01/Projects_GetConnectionUri_MaximumSet_Gen.json */ /** - * Sample code: Projects_GetConnectionUri_MaximumSet. + * Sample code: Projects_GetConnectionUri_MaximumSet - generated by [MaximumSet] rule - generated by [MaximumSet] + * rule. * * @param manager Entry point to NeonPostgresManager. */ - public static void - projectsGetConnectionUriMaximumSet(com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { + public static void projectsGetConnectionUriMaximumSetGeneratedByMaximumSetRuleGeneratedByMaximumSetRule( + com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { manager.projects() - .getConnectionUriWithResponse("rgneon", "test-org", "entity-name", + .getConnectionUriWithResponse("rgneon", "contoso-org", "sample-resource", new ConnectionUriPropertiesInner().withProjectId("riuifmoqtorrcffgksvfcobia") .withBranchId("iimmlbqv") .withDatabaseName("xc") @@ -118,7 +78,7 @@ public final class ProjectsGetConnectionUriSamples { } ``` -### Branches_Get +### Branches_Delete ```java /** @@ -129,18 +89,19 @@ public final class NeonDatabasesListSamples { * x-ms-original-file: 2025-03-01/NeonDatabases_List_MaximumSet_Gen.json */ /** - * Sample code: NeonDatabases_List_MaximumSet. + * Sample code: NeonDatabases_List_MaximumSet - generated by [MaximumSet] rule - generated by [MaximumSet] rule. * * @param manager Entry point to NeonPostgresManager. */ - public static void neonDatabasesListMaximumSet(com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { + public static void neonDatabasesListMaximumSetGeneratedByMaximumSetRuleGeneratedByMaximumSetRule( + com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { manager.neonDatabases() - .list("rgneon", "test-org", "entity-name", "entity-name", com.azure.core.util.Context.NONE); + .list("rgneon", "contoso-org", "sample-resource", "sample-resource", com.azure.core.util.Context.NONE); } } ``` -### Branches_List +### Branches_Get ```java /** @@ -151,17 +112,19 @@ public final class OrganizationsGetByResourceGroupSamples { * x-ms-original-file: 2025-03-01/Organizations_Get_MaximumSet_Gen.json */ /** - * Sample code: Organizations_Get_MaximumSet. + * Sample code: Organizations_Get_MaximumSet - generated by [MaximumSet] rule - generated by [MaximumSet] rule. * * @param manager Entry point to NeonPostgresManager. */ - public static void organizationsGetMaximumSet(com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { - manager.organizations().getByResourceGroupWithResponse("rgneon", "test-org", com.azure.core.util.Context.NONE); + public static void organizationsGetMaximumSetGeneratedByMaximumSetRuleGeneratedByMaximumSetRule( + com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { + manager.organizations() + .getByResourceGroupWithResponse("rgneon", "contoso-org", com.azure.core.util.Context.NONE); } } ``` -### Branches_Update +### Branches_List ```java /** @@ -169,625 +132,104 @@ public final class OrganizationsGetByResourceGroupSamples { */ public final class OrganizationsListByResourceGroupSamples { /* - * x-ms-original-file: 2025-03-01/Organizations_ListByResourceGroup_MaximumSet_Gen.json - */ - /** - * Sample code: Organizations_ListByResourceGroup_MaximumSet. - * - * @param manager Entry point to NeonPostgresManager. - */ - public static void - organizationsListByResourceGroupMaximumSet(com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { - manager.organizations().listByResourceGroup("rgneon", com.azure.core.util.Context.NONE); - } -} -``` - -### Computes_CreateOrUpdate - -```java -/** - * Samples for Projects Get. - */ -public final class ProjectsGetSamples { - /* - * x-ms-original-file: 2025-03-01/Projects_Get_MaximumSet_Gen.json - */ - /** - * Sample code: Projects_Get_MaximumSet. - * - * @param manager Entry point to NeonPostgresManager. - */ - public static void projectsGetMaximumSet(com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { - manager.projects().getWithResponse("rgneon", "test-org", "entity-name", com.azure.core.util.Context.NONE); - } -} -``` - -### Computes_Delete - -```java -/** - * Samples for Branches List. - */ -public final class BranchesListSamples { - /* - * x-ms-original-file: 2025-03-01/Branches_List_MaximumSet_Gen.json - */ - /** - * Sample code: Branches_List_MaximumSet. - * - * @param manager Entry point to NeonPostgresManager. - */ - public static void branchesListMaximumSet(com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { - manager.branches().list("rgneon", "test-org", "entity-name", com.azure.core.util.Context.NONE); - } -} -``` - -### Computes_Get - -```java -/** - * Samples for NeonRoles Delete. - */ -public final class NeonRolesDeleteSamples { - /* - * x-ms-original-file: 2025-03-01/NeonRoles_Delete_MaximumSet_Gen.json - */ - /** - * Sample code: NeonRoles_Delete_MaximumSet. - * - * @param manager Entry point to NeonPostgresManager. - */ - public static void neonRolesDeleteMaximumSet(com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { - manager.neonRoles() - .deleteWithResponse("rgneon", "test-org", "entity-name", "entity-name", "entity-name", - com.azure.core.util.Context.NONE); - } -} -``` - -### Computes_List - -```java -import com.azure.resourcemanager.neonpostgres.models.Attributes; -import com.azure.resourcemanager.neonpostgres.models.BranchProperties; -import com.azure.resourcemanager.neonpostgres.models.DefaultEndpointSettings; -import com.azure.resourcemanager.neonpostgres.models.EndpointProperties; -import com.azure.resourcemanager.neonpostgres.models.EndpointType; -import com.azure.resourcemanager.neonpostgres.models.NeonDatabaseProperties; -import com.azure.resourcemanager.neonpostgres.models.NeonRoleProperties; -import com.azure.resourcemanager.neonpostgres.models.Project; -import com.azure.resourcemanager.neonpostgres.models.ProjectProperties; -import java.util.Arrays; - -/** - * Samples for Projects Update. - */ -public final class ProjectsUpdateSamples { - /* - * x-ms-original-file: 2025-03-01/Projects_Update_MaximumSet_Gen.json - */ - /** - * Sample code: Projects_Update_MaximumSet. - * - * @param manager Entry point to NeonPostgresManager. - */ - public static void projectsUpdateMaximumSet(com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { - Project resource = manager.projects() - .getWithResponse("rgneon", "test-org", "test-project", com.azure.core.util.Context.NONE) - .getValue(); - resource.update() - .withProperties(new ProjectProperties().withEntityName("entity-name") - .withAttributes(Arrays.asList(new Attributes().withName("trhvzyvaqy").withValue("evpkgsskyavybxwwssm"))) - .withRegionId("vxvmjwuttpiakirzdf") - .withStorage(23L) - .withPgVersion(16) - .withHistoryRetention(16) - .withDefaultEndpointSettings( - new DefaultEndpointSettings().withAutoscalingLimitMinCu(8.0).withAutoscalingLimitMaxCu(4.0)) - .withBranch(new BranchProperties().withEntityName("entity-name") - .withAttributes( - Arrays.asList(new Attributes().withName("trhvzyvaqy").withValue("evpkgsskyavybxwwssm"))) - .withProjectId("oik") - .withParentId("entity-id") - .withRoleName("qrrairsupyosxnqotdwhbpc") - .withDatabaseName("duhxebzhd") - .withRoles(Arrays.asList(new NeonRoleProperties().withEntityName("entity-name") - .withAttributes( - Arrays.asList(new Attributes().withName("trhvzyvaqy").withValue("evpkgsskyavybxwwssm"))) - .withBranchId("wxbojkmdgaggkfiwqfakdkbyztm") - .withPermissions(Arrays.asList("myucqecpjriewzohxvadgkhiudnyx")) - .withIsSuperUser(true))) - .withDatabases(Arrays.asList(new NeonDatabaseProperties().withEntityName("entity-name") - .withAttributes( - Arrays.asList(new Attributes().withName("trhvzyvaqy").withValue("evpkgsskyavybxwwssm"))) - .withBranchId("orfdwdmzvfvlnrgussvcvoek") - .withOwnerName("odmbeg"))) - .withEndpoints(Arrays.asList(new EndpointProperties().withEntityName("entity-name") - .withAttributes( - Arrays.asList(new Attributes().withName("trhvzyvaqy").withValue("evpkgsskyavybxwwssm"))) - .withProjectId("rtvdeeflqzlrpfzhjqhcsfbldw") - .withBranchId("rzsyrhpfbydxtfkpaa") - .withEndpointType(EndpointType.READ_ONLY)))) - .withRoles(Arrays.asList(new NeonRoleProperties().withEntityName("entity-name") - .withAttributes( - Arrays.asList(new Attributes().withName("trhvzyvaqy").withValue("evpkgsskyavybxwwssm"))) - .withBranchId("wxbojkmdgaggkfiwqfakdkbyztm") - .withPermissions(Arrays.asList("myucqecpjriewzohxvadgkhiudnyx")) - .withIsSuperUser(true))) - .withDatabases(Arrays.asList(new NeonDatabaseProperties().withEntityName("entity-name") - .withAttributes( - Arrays.asList(new Attributes().withName("trhvzyvaqy").withValue("evpkgsskyavybxwwssm"))) - .withBranchId("orfdwdmzvfvlnrgussvcvoek") - .withOwnerName("odmbeg"))) - .withEndpoints(Arrays.asList(new EndpointProperties().withEntityName("entity-name") - .withAttributes( - Arrays.asList(new Attributes().withName("trhvzyvaqy").withValue("evpkgsskyavybxwwssm"))) - .withProjectId("rtvdeeflqzlrpfzhjqhcsfbldw") - .withBranchId("rzsyrhpfbydxtfkpaa") - .withEndpointType(EndpointType.READ_ONLY)))) - .apply(); - } -} -``` - -### Computes_Update - -```java -/** - * Samples for Endpoints List. - */ -public final class EndpointsListSamples { - /* - * x-ms-original-file: 2025-03-01/Endpoints_List_MaximumSet_Gen.json - */ - /** - * Sample code: Endpoints_List_MaximumSet. - * - * @param manager Entry point to NeonPostgresManager. - */ - public static void endpointsListMaximumSet(com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { - manager.endpoints().list("rgneon", "test-org", "entity-name", "entity-name", com.azure.core.util.Context.NONE); - } -} -``` - -### Endpoints_CreateOrUpdate - -```java -import com.azure.resourcemanager.neonpostgres.models.Attributes; -import com.azure.resourcemanager.neonpostgres.models.BranchProperties; -import com.azure.resourcemanager.neonpostgres.models.EndpointProperties; -import com.azure.resourcemanager.neonpostgres.models.EndpointType; -import com.azure.resourcemanager.neonpostgres.models.NeonDatabaseProperties; -import com.azure.resourcemanager.neonpostgres.models.NeonRoleProperties; -import java.util.Arrays; - -/** - * Samples for Branches CreateOrUpdate. - */ -public final class BranchesCreateOrUpdateSamples { - /* - * x-ms-original-file: 2025-03-01/Branches_CreateOrUpdate_MaximumSet_Gen.json + * x-ms-original-file: 2025-03-01/Organizations_ListByResourceGroup_MinimumSet_Gen.json */ - /** - * Sample code: Branches_CreateOrUpdate_MaximumSet. - * - * @param manager Entry point to NeonPostgresManager. - */ - public static void - branchesCreateOrUpdateMaximumSet(com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { - manager.branches() - .define("test-entity") - .withExistingProject("rgneon", "test-org", "test-entity") - .withProperties(new BranchProperties().withEntityName("entity-name") - .withAttributes(Arrays.asList(new Attributes().withName("trhvzyvaqy").withValue("evpkgsskyavybxwwssm"))) - .withProjectId("oik") - .withParentId("entity-id") - .withRoleName("qrrairsupyosxnqotdwhbpc") - .withDatabaseName("duhxebzhd") - .withRoles(Arrays.asList(new NeonRoleProperties().withEntityName("entity-name") - .withAttributes( - Arrays.asList(new Attributes().withName("trhvzyvaqy").withValue("evpkgsskyavybxwwssm"))) - .withBranchId("wxbojkmdgaggkfiwqfakdkbyztm") - .withPermissions(Arrays.asList("myucqecpjriewzohxvadgkhiudnyx")) - .withIsSuperUser(true))) - .withDatabases(Arrays.asList(new NeonDatabaseProperties().withEntityName("entity-name") - .withAttributes( - Arrays.asList(new Attributes().withName("trhvzyvaqy").withValue("evpkgsskyavybxwwssm"))) - .withBranchId("orfdwdmzvfvlnrgussvcvoek") - .withOwnerName("odmbeg"))) - .withEndpoints(Arrays.asList(new EndpointProperties().withEntityName("entity-name") - .withAttributes( - Arrays.asList(new Attributes().withName("trhvzyvaqy").withValue("evpkgsskyavybxwwssm"))) - .withProjectId("rtvdeeflqzlrpfzhjqhcsfbldw") - .withBranchId("rzsyrhpfbydxtfkpaa") - .withEndpointType(EndpointType.READ_ONLY)))) - .create(); - } -} -``` - -### Endpoints_Delete - -```java -import com.azure.resourcemanager.neonpostgres.models.Attributes; -import com.azure.resourcemanager.neonpostgres.models.Endpoint; -import com.azure.resourcemanager.neonpostgres.models.EndpointProperties; -import com.azure.resourcemanager.neonpostgres.models.EndpointType; -import java.util.Arrays; - -/** - * Samples for Endpoints Update. - */ -public final class EndpointsUpdateSamples { - /* - * x-ms-original-file: 2025-03-01/Endpoints_Update_MaximumSet_Gen.json - */ - /** - * Sample code: Endpoints_Update_MaximumSet. - * - * @param manager Entry point to NeonPostgresManager. - */ - public static void endpointsUpdateMaximumSet(com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { - Endpoint resource = manager.endpoints() - .getWithResponse("rgneon", "test-org", "entity-name", "entity-name", "entity-name", - com.azure.core.util.Context.NONE) - .getValue(); - resource.update() - .withProperties(new EndpointProperties().withEntityName("entity-name") - .withAttributes(Arrays.asList(new Attributes().withName("trhvzyvaqy").withValue("evpkgsskyavybxwwssm"))) - .withProjectId("rtvdeeflqzlrpfzhjqhcsfbldw") - .withBranchId("rzsyrhpfbydxtfkpaa") - .withEndpointType(EndpointType.READ_ONLY)) - .apply(); - } -} -``` - -### Endpoints_Get - -```java -/** - * Samples for Projects List. - */ -public final class ProjectsListSamples { - /* - * x-ms-original-file: 2025-03-01/Projects_List_MaximumSet_Gen.json - */ - /** - * Sample code: Projects_List_MaximumSet. - * - * @param manager Entry point to NeonPostgresManager. - */ - public static void projectsListMaximumSet(com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { - manager.projects().list("rgneon", "test-org", com.azure.core.util.Context.NONE); - } -} -``` - -### Endpoints_List - -```java -/** - * Samples for Branches Delete. - */ -public final class BranchesDeleteSamples { - /* - * x-ms-original-file: 2025-03-01/Branches_Delete_MaximumSet_Gen.json - */ - /** - * Sample code: Branches_Delete_MaximumSet. - * - * @param manager Entry point to NeonPostgresManager. - */ - public static void branchesDeleteMaximumSet(com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { - manager.branches() - .deleteWithResponse("rgneon", "test-org", "entity-name", "entity-name", com.azure.core.util.Context.NONE); - } -} -``` - -### Endpoints_Update - -```java -/** - * Samples for Endpoints Get. - */ -public final class EndpointsGetSamples { - /* - * x-ms-original-file: 2025-03-01/Endpoints_Get_MaximumSet_Gen.json - */ - /** - * Sample code: Endpoints_Get_MaximumSet. - * - * @param manager Entry point to NeonPostgresManager. - */ - public static void endpointsGetMaximumSet(com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { - manager.endpoints() - .getWithResponse("rgneon", "test-org", "entity-name", "entity-name", "entity-name", - com.azure.core.util.Context.NONE); - } -} -``` - -### NeonDatabases_CreateOrUpdate - -```java -/** - * Samples for Operations List. - */ -public final class OperationsListSamples { - /* - * x-ms-original-file: 2025-03-01/Operations_List_MinimumSet_Gen.json - */ - /** - * Sample code: Operations_List_MinimumSet. - * - * @param manager Entry point to NeonPostgresManager. - */ - public static void operationsListMinimumSet(com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { - manager.operations().list(com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-03-01/Operations_List_MaximumSet_Gen.json - */ - /** - * Sample code: Operations_List_MaximumSet. - * - * @param manager Entry point to NeonPostgresManager. - */ - public static void operationsListMaximumSet(com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { - manager.operations().list(com.azure.core.util.Context.NONE); - } -} -``` - -### NeonDatabases_Delete - -```java -import com.azure.resourcemanager.neonpostgres.models.Attributes; -import com.azure.resourcemanager.neonpostgres.models.Compute; -import com.azure.resourcemanager.neonpostgres.models.ComputeProperties; -import java.util.Arrays; - -/** - * Samples for Computes Update. - */ -public final class ComputesUpdateSamples { - /* - * x-ms-original-file: 2025-03-01/Computes_Update_MaximumSet_Gen.json - */ - /** - * Sample code: Computes_Update_MaximumSet. - * - * @param manager Entry point to NeonPostgresManager. - */ - public static void computesUpdateMaximumSet(com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { - Compute resource = manager.computes() - .getWithResponse("rgneon", "test-org", "entity-name", "entity-name", "entity-name", - com.azure.core.util.Context.NONE) - .getValue(); - resource.update() - .withProperties(new ComputeProperties().withEntityName("entity-name") - .withAttributes(Arrays.asList(new Attributes().withName("trhvzyvaqy").withValue("evpkgsskyavybxwwssm"))) - .withRegion("mcfyojzptdliawyuxyxzqxif") - .withCpuCores(29) - .withMemory(2) - .withStatus("upwdpznysuwt")) - .apply(); - } -} -``` - -### NeonDatabases_Get - -```java -/** - * Samples for NeonRoles Get. - */ -public final class NeonRolesGetSamples { - /* - * x-ms-original-file: 2025-03-01/NeonRoles_Get_MaximumSet_Gen.json - */ - /** - * Sample code: NeonRoles_Get_MaximumSet. - * - * @param manager Entry point to NeonPostgresManager. - */ - public static void neonRolesGetMaximumSet(com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { - manager.neonRoles() - .getWithResponse("rgneon", "test-org", "entity-name", "entity-name", "entity-name", - com.azure.core.util.Context.NONE); - } -} -``` - -### NeonDatabases_List - -```java -/** - * Samples for Branches Get. - */ -public final class BranchesGetSamples { - /* - * x-ms-original-file: 2025-03-01/Branches_Get_MaximumSet_Gen.json - */ - /** - * Sample code: Branches_Get_MaximumSet. - * - * @param manager Entry point to NeonPostgresManager. - */ - public static void branchesGetMaximumSet(com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { - manager.branches() - .getWithResponse("rgneon", "test-org", "entity-name", "entity-name", com.azure.core.util.Context.NONE); - } -} -``` - -### NeonDatabases_Update - -```java -/** - * Samples for Organizations Delete. - */ -public final class OrganizationsDeleteSamples { - /* - * x-ms-original-file: 2025-03-01/Organizations_Delete_MaximumSet_Gen.json - */ - /** - * Sample code: Organizations_Delete_MaximumSet. - * - * @param manager Entry point to NeonPostgresManager. - */ - public static void - organizationsDeleteMaximumSet(com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { - manager.organizations().delete("rgneon", "test-org", com.azure.core.util.Context.NONE); - } -} -``` - -### NeonRoles_CreateOrUpdate - -```java -/** - * Samples for NeonDatabases Delete. - */ -public final class NeonDatabasesDeleteSamples { - /* - * x-ms-original-file: 2025-03-01/NeonDatabases_Delete_MaximumSet_Gen.json - */ - /** - * Sample code: NeonDatabases_Delete_MaximumSet. - * - * @param manager Entry point to NeonPostgresManager. - */ - public static void - neonDatabasesDeleteMaximumSet(com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { - manager.neonDatabases() - .deleteWithResponse("rgneon", "test-org", "entity-name", "entity-name", "entity-name", - com.azure.core.util.Context.NONE); - } -} -``` - -### NeonRoles_Delete - -```java -import com.azure.resourcemanager.neonpostgres.models.Attributes; -import com.azure.resourcemanager.neonpostgres.models.NeonDatabaseProperties; -import java.util.Arrays; + /** + * Sample code: Organizations_ListByResourceGroup_MaximumSet - generated by [MaximumSet] rule - generated by + * [MinimumSet] rule. + * + * @param manager Entry point to NeonPostgresManager. + */ + public static void organizationsListByResourceGroupMaximumSetGeneratedByMaximumSetRuleGeneratedByMinimumSetRule( + com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { + manager.organizations().listByResourceGroup("rgneon", com.azure.core.util.Context.NONE); + } -/** - * Samples for NeonDatabases CreateOrUpdate. - */ -public final class NeonDatabasesCreateOrUpdateSamples { /* - * x-ms-original-file: 2025-03-01/NeonDatabases_CreateOrUpdate_MaximumSet_Gen.json + * x-ms-original-file: 2025-03-01/Organizations_ListByResourceGroup_MaximumSet_Gen.json */ /** - * Sample code: NeonDatabases_CreateOrUpdate_MaximumSet. + * Sample code: Organizations_ListByResourceGroup_MaximumSet - generated by [MaximumSet] rule - generated by + * [MaximumSet] rule. * * @param manager Entry point to NeonPostgresManager. */ - public static void - neonDatabasesCreateOrUpdateMaximumSet(com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { - manager.neonDatabases() - .define("entity-name") - .withExistingBranche("rgneon", "test-org", "entity-name", "entity-name") - .withProperties(new NeonDatabaseProperties().withEntityName("entity-name") - .withAttributes(Arrays.asList(new Attributes().withName("trhvzyvaqy").withValue("evpkgsskyavybxwwssm"))) - .withBranchId("orfdwdmzvfvlnrgussvcvoek") - .withOwnerName("odmbeg")) - .create(); + public static void organizationsListByResourceGroupMaximumSetGeneratedByMaximumSetRuleGeneratedByMaximumSetRule( + com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { + manager.organizations().listByResourceGroup("rgneon", com.azure.core.util.Context.NONE); } } ``` -### NeonRoles_Get +### Computes_List ```java /** - * Samples for NeonDatabases Get. + * Samples for Projects Delete. */ -public final class NeonDatabasesGetSamples { +public final class ProjectsDeleteSamples { /* - * x-ms-original-file: 2025-03-01/NeonDatabases_Get_MaximumSet_Gen.json + * x-ms-original-file: 2025-03-01/Projects_Delete_MaximumSet_Gen.json */ /** - * Sample code: NeonDatabases_Get_MaximumSet. + * Sample code: Projects_Delete_MaximumSet - generated by [MaximumSet] rule - generated by [MaximumSet] rule. * * @param manager Entry point to NeonPostgresManager. */ - public static void neonDatabasesGetMaximumSet(com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { - manager.neonDatabases() - .getWithResponse("rgneon", "test-org", "entity-name", "entity-name", "entity-name", - com.azure.core.util.Context.NONE); + public static void projectsDeleteMaximumSetGeneratedByMaximumSetRuleGeneratedByMaximumSetRule( + com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { + manager.projects() + .deleteWithResponse("rgneon", "contoso-org", "sample-resource", com.azure.core.util.Context.NONE); } } ``` -### NeonRoles_List +### Endpoints_List ```java -import com.azure.resourcemanager.neonpostgres.models.Attributes; -import com.azure.resourcemanager.neonpostgres.models.NeonRole; -import com.azure.resourcemanager.neonpostgres.models.NeonRoleProperties; -import java.util.Arrays; - /** - * Samples for NeonRoles Update. + * Samples for Projects Get. */ -public final class NeonRolesUpdateSamples { +public final class ProjectsGetSamples { /* - * x-ms-original-file: 2025-03-01/NeonRoles_Update_MaximumSet_Gen.json + * x-ms-original-file: 2025-03-01/Projects_Get_MaximumSet_Gen.json */ /** - * Sample code: NeonRoles_Update_MaximumSet. + * Sample code: Projects_Get_MaximumSet - generated by [MaximumSet] rule - generated by [MaximumSet] rule. * * @param manager Entry point to NeonPostgresManager. */ - public static void neonRolesUpdateMaximumSet(com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { - NeonRole resource = manager.neonRoles() - .getWithResponse("rgneon", "test-org", "entity-name", "entity-name", "entity-name", - com.azure.core.util.Context.NONE) - .getValue(); - resource.update() - .withProperties(new NeonRoleProperties().withEntityName("entity-name") - .withAttributes(Arrays.asList(new Attributes().withName("trhvzyvaqy").withValue("evpkgsskyavybxwwssm"))) - .withBranchId("wxbojkmdgaggkfiwqfakdkbyztm") - .withPermissions(Arrays.asList("myucqecpjriewzohxvadgkhiudnyx")) - .withIsSuperUser(true)) - .apply(); + public static void projectsGetMaximumSetGeneratedByMaximumSetRuleGeneratedByMaximumSetRule( + com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { + manager.projects() + .getWithResponse("rgneon", "contoso-org", "sample-resource", com.azure.core.util.Context.NONE); } } ``` -### NeonRoles_Update +### NeonDatabases_List ```java /** - * Samples for Projects Delete. + * Samples for Branches List. */ -public final class ProjectsDeleteSamples { +public final class BranchesListSamples { /* - * x-ms-original-file: 2025-03-01/Projects_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2025-03-01/Branches_List_MaximumSet_Gen.json */ /** - * Sample code: Projects_Delete_MaximumSet. + * Sample code: Branches_List_MaximumSet - generated by [MaximumSet] rule - generated by [MaximumSet] rule. * * @param manager Entry point to NeonPostgresManager. */ - public static void projectsDeleteMaximumSet(com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { - manager.projects().deleteWithResponse("rgneon", "test-org", "entity-name", com.azure.core.util.Context.NONE); + public static void branchesListMaximumSetGeneratedByMaximumSetRuleGeneratedByMaximumSetRule( + com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { + manager.branches().list("rgneon", "contoso-org", "sample-resource", com.azure.core.util.Context.NONE); } } ``` -### Operations_List +### NeonRoles_List ```java import com.azure.resourcemanager.neonpostgres.models.Attributes; @@ -819,17 +261,18 @@ public final class OrganizationsCreateOrUpdateSamples { * x-ms-original-file: 2025-03-01/Organizations_CreateOrUpdate_MaximumSet_Gen.json */ /** - * Sample code: Organizations_CreateOrUpdate_MaximumSet. + * Sample code: Organizations_CreateOrUpdate_MaximumSet - generated by [MaximumSet] rule - generated by [MaximumSet] + * rule. * * @param manager Entry point to NeonPostgresManager. */ - public static void - organizationsCreateOrUpdateMaximumSet(com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { + public static void organizationsCreateOrUpdateMaximumSetGeneratedByMaximumSetRuleGeneratedByMaximumSetRule( + com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { manager.organizations() - .define("test-org") + .define("contoso-org") .withRegion("kcdph") .withExistingResourceGroup("rgneon") - .withTags(mapOf("key8832", "fakeTokenPlaceholder")) + .withTags(mapOf()) .withProperties(new OrganizationProperties() .withMarketplaceDetails(new MarketplaceDetails().withSubscriptionId("xfahbbbzwlcwhhjbxarnwfcy") .withSubscriptionStatus(MarketplaceSubscriptionStatus.PENDING_FULFILLMENT_START) @@ -925,42 +368,7 @@ public final class OrganizationsCreateOrUpdateSamples { } ``` -### Organizations_CreateOrUpdate - -```java -import com.azure.resourcemanager.neonpostgres.models.Attributes; -import com.azure.resourcemanager.neonpostgres.models.ComputeProperties; -import java.util.Arrays; - -/** - * Samples for Computes CreateOrUpdate. - */ -public final class ComputesCreateOrUpdateSamples { - /* - * x-ms-original-file: 2025-03-01/Computes_CreateOrUpdate_MaximumSet_Gen.json - */ - /** - * Sample code: Computes_CreateOrUpdate_MaximumSet. - * - * @param manager Entry point to NeonPostgresManager. - */ - public static void - computesCreateOrUpdateMaximumSet(com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { - manager.computes() - .define("entity-name") - .withExistingBranche("rgneon", "test-org", "entity-name", "entity-name") - .withProperties(new ComputeProperties().withEntityName("entity-name") - .withAttributes(Arrays.asList(new Attributes().withName("trhvzyvaqy").withValue("evpkgsskyavybxwwssm"))) - .withRegion("mcfyojzptdliawyuxyxzqxif") - .withCpuCores(29) - .withMemory(2) - .withStatus("upwdpznysuwt")) - .create(); - } -} -``` - -### Organizations_Delete +### Operations_List ```java import com.azure.resourcemanager.neonpostgres.models.PgVersion; @@ -973,12 +381,13 @@ public final class OrganizationsGetPostgresVersionsSamples { * x-ms-original-file: 2025-03-01/Organizations_GetPostgresVersions_MaximumSet_Gen.json */ /** - * Sample code: Organizations_GetPostgresVersions_MaximumSet. + * Sample code: Organizations_GetPostgresVersions_MaximumSet - generated by [MaximumSet] rule - generated by + * [MaximumSet] rule. * * @param manager Entry point to NeonPostgresManager. */ - public static void - organizationsGetPostgresVersionsMaximumSet(com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { + public static void organizationsGetPostgresVersionsMaximumSetGeneratedByMaximumSetRuleGeneratedByMaximumSetRule( + com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { manager.organizations() .getPostgresVersionsWithResponse("rgneon", new PgVersion().withVersion(7), com.azure.core.util.Context.NONE); @@ -988,18 +397,19 @@ public final class OrganizationsGetPostgresVersionsSamples { * x-ms-original-file: 2025-03-01/Organizations_GetPostgresVersions_MinimumSet_Gen.json */ /** - * Sample code: Organizations_GetPostgresVersions_MinimumSet. + * Sample code: Organizations_GetPostgresVersions_MaximumSet - generated by [MaximumSet] rule - generated by + * [MinimumSet] rule. * * @param manager Entry point to NeonPostgresManager. */ - public static void - organizationsGetPostgresVersionsMinimumSet(com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { + public static void organizationsGetPostgresVersionsMaximumSetGeneratedByMaximumSetRuleGeneratedByMinimumSetRule( + com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { manager.organizations().getPostgresVersionsWithResponse("rgneon", null, com.azure.core.util.Context.NONE); } } ``` -### Organizations_GetByResourceGroup +### Organizations_CreateOrUpdate ```java /** @@ -1010,17 +420,42 @@ public final class ComputesListSamples { * x-ms-original-file: 2025-03-01/Computes_List_MaximumSet_Gen.json */ /** - * Sample code: Computes_List_MaximumSet. + * Sample code: Computes_List_MaximumSet - generated by [MaximumSet] rule - generated by [MaximumSet] rule. * * @param manager Entry point to NeonPostgresManager. */ - public static void computesListMaximumSet(com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { - manager.computes().list("rgneon", "test-org", "entity-name", "entity-name", com.azure.core.util.Context.NONE); + public static void computesListMaximumSetGeneratedByMaximumSetRuleGeneratedByMaximumSetRule( + com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { + manager.computes() + .list("rgneon", "contoso-org", "sample-resource", "sample-resource", com.azure.core.util.Context.NONE); } } ``` -### Organizations_GetPostgresVersions +### Organizations_Delete + +```java +/** + * Samples for Endpoints List. + */ +public final class EndpointsListSamples { + /* + * x-ms-original-file: 2025-03-01/Endpoints_List_MaximumSet_Gen.json + */ + /** + * Sample code: Endpoints_List_MaximumSet - generated by [MaximumSet] rule - generated by [MaximumSet] rule. + * + * @param manager Entry point to NeonPostgresManager. + */ + public static void endpointsListMaximumSetGeneratedByMaximumSetRuleGeneratedByMaximumSetRule( + com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { + manager.endpoints() + .list("rgneon", "contoso-org", "sample-resource", "sample-resource", com.azure.core.util.Context.NONE); + } +} +``` + +### Organizations_GetByResourceGroup ```java /** @@ -1031,110 +466,136 @@ public final class OrganizationsListSamples { * x-ms-original-file: 2025-03-01/Organizations_ListBySubscription_MaximumSet_Gen.json */ /** - * Sample code: Organizations_ListBySubscription_MaximumSet. + * Sample code: Organizations_ListBySubscription_MaximumSet - generated by [MaximumSet] rule - generated by + * [MaximumSet] rule. + * + * @param manager Entry point to NeonPostgresManager. + */ + public static void organizationsListBySubscriptionMaximumSetGeneratedByMaximumSetRuleGeneratedByMaximumSetRule( + com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { + manager.organizations().list(com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-03-01/Organizations_ListBySubscription_MinimumSet_Gen.json + */ + /** + * Sample code: Organizations_ListBySubscription_MaximumSet - generated by [MaximumSet] rule - generated by + * [MinimumSet] rule. * * @param manager Entry point to NeonPostgresManager. */ - public static void - organizationsListBySubscriptionMaximumSet(com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { + public static void organizationsListBySubscriptionMaximumSetGeneratedByMaximumSetRuleGeneratedByMinimumSetRule( + com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { manager.organizations().list(com.azure.core.util.Context.NONE); } } ``` -### Organizations_List +### Organizations_GetPostgresVersions ```java import com.azure.resourcemanager.neonpostgres.models.Attributes; +import com.azure.resourcemanager.neonpostgres.models.BranchProperties; +import com.azure.resourcemanager.neonpostgres.models.EndpointProperties; +import com.azure.resourcemanager.neonpostgres.models.EndpointType; +import com.azure.resourcemanager.neonpostgres.models.NeonDatabaseProperties; import com.azure.resourcemanager.neonpostgres.models.NeonRoleProperties; import java.util.Arrays; /** - * Samples for NeonRoles CreateOrUpdate. + * Samples for Branches CreateOrUpdate. */ -public final class NeonRolesCreateOrUpdateSamples { +public final class BranchesCreateOrUpdateSamples { /* - * x-ms-original-file: 2025-03-01/NeonRoles_CreateOrUpdate_MaximumSet_Gen.json + * x-ms-original-file: 2025-03-01/Branches_CreateOrUpdate_MaximumSet_Gen.json */ /** - * Sample code: NeonRoles_CreateOrUpdate_MaximumSet. + * Sample code: Branches_CreateOrUpdate_MaximumSet - generated by [MaximumSet] rule - generated by [MaximumSet] + * rule. * * @param manager Entry point to NeonPostgresManager. */ - public static void - neonRolesCreateOrUpdateMaximumSet(com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { - manager.neonRoles() - .define("entity-name") - .withExistingBranche("rgneon", "test-org", "entity-name", "entity-name") - .withProperties(new NeonRoleProperties().withEntityName("entity-name") + public static void branchesCreateOrUpdateMaximumSetGeneratedByMaximumSetRuleGeneratedByMaximumSetRule( + com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { + manager.branches() + .define("sample-resource") + .withExistingProject("rgneon", "contoso-org", "sample-resource") + .withProperties(new BranchProperties().withEntityName("entity-name") .withAttributes(Arrays.asList(new Attributes().withName("trhvzyvaqy").withValue("evpkgsskyavybxwwssm"))) - .withBranchId("wxbojkmdgaggkfiwqfakdkbyztm") - .withPermissions(Arrays.asList("myucqecpjriewzohxvadgkhiudnyx")) - .withIsSuperUser(true)) + .withProjectId("oik") + .withParentId("entity-id") + .withRoleName("qrrairsupyosxnqotdwhbpc") + .withDatabaseName("duhxebzhd") + .withRoles(Arrays.asList(new NeonRoleProperties().withEntityName("entity-name") + .withAttributes( + Arrays.asList(new Attributes().withName("trhvzyvaqy").withValue("evpkgsskyavybxwwssm"))) + .withBranchId("wxbojkmdgaggkfiwqfakdkbyztm") + .withPermissions(Arrays.asList("myucqecpjriewzohxvadgkhiudnyx")) + .withIsSuperUser(true))) + .withDatabases(Arrays.asList(new NeonDatabaseProperties().withEntityName("entity-name") + .withAttributes( + Arrays.asList(new Attributes().withName("trhvzyvaqy").withValue("evpkgsskyavybxwwssm"))) + .withBranchId("orfdwdmzvfvlnrgussvcvoek") + .withOwnerName("odmbeg"))) + .withEndpoints(Arrays.asList(new EndpointProperties().withEntityName("entity-name") + .withAttributes( + Arrays.asList(new Attributes().withName("trhvzyvaqy").withValue("evpkgsskyavybxwwssm"))) + .withProjectId("rtvdeeflqzlrpfzhjqhcsfbldw") + .withBranchId("rzsyrhpfbydxtfkpaa") + .withEndpointType(EndpointType.READ_ONLY)))) .create(); } } ``` -### Organizations_ListByResourceGroup +### Organizations_List ```java -import com.azure.resourcemanager.neonpostgres.models.Attributes; -import com.azure.resourcemanager.neonpostgres.models.EndpointProperties; -import com.azure.resourcemanager.neonpostgres.models.EndpointType; -import java.util.Arrays; - /** - * Samples for Endpoints CreateOrUpdate. + * Samples for Projects List. */ -public final class EndpointsCreateOrUpdateSamples { +public final class ProjectsListSamples { /* - * x-ms-original-file: 2025-03-01/Endpoints_CreateOrUpdate_MaximumSet_Gen.json + * x-ms-original-file: 2025-03-01/Projects_List_MaximumSet_Gen.json */ /** - * Sample code: Endpoints_CreateOrUpdate_MaximumSet. + * Sample code: Projects_List_MaximumSet - generated by [MaximumSet] rule - generated by [MaximumSet] rule. * * @param manager Entry point to NeonPostgresManager. */ - public static void - endpointsCreateOrUpdateMaximumSet(com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { - manager.endpoints() - .define("entity-name") - .withExistingBranche("rgneon", "test-org", "entity-name", "entity-name") - .withProperties(new EndpointProperties().withEntityName("entity-name") - .withAttributes(Arrays.asList(new Attributes().withName("trhvzyvaqy").withValue("evpkgsskyavybxwwssm"))) - .withProjectId("rtvdeeflqzlrpfzhjqhcsfbldw") - .withBranchId("rzsyrhpfbydxtfkpaa") - .withEndpointType(EndpointType.READ_ONLY)) - .create(); + public static void projectsListMaximumSetGeneratedByMaximumSetRuleGeneratedByMaximumSetRule( + com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { + manager.projects().list("rgneon", "contoso-org", com.azure.core.util.Context.NONE); } } ``` -### Organizations_Update +### Organizations_ListByResourceGroup ```java /** - * Samples for Endpoints Delete. + * Samples for Branches Delete. */ -public final class EndpointsDeleteSamples { +public final class BranchesDeleteSamples { /* - * x-ms-original-file: 2025-03-01/Endpoints_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2025-03-01/Branches_Delete_MaximumSet_Gen.json */ /** - * Sample code: Endpoints_Delete_MaximumSet. + * Sample code: Branches_Delete_MaximumSet - generated by [MaximumSet] rule - generated by [MaximumSet] rule. * * @param manager Entry point to NeonPostgresManager. */ - public static void endpointsDeleteMaximumSet(com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { - manager.endpoints() - .deleteWithResponse("rgneon", "test-org", "entity-name", "entity-name", "entity-name", + public static void branchesDeleteMaximumSetGeneratedByMaximumSetRuleGeneratedByMaximumSetRule( + com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { + manager.branches() + .deleteWithResponse("rgneon", "contoso-org", "sample-resource", "sample-resource", com.azure.core.util.Context.NONE); } } ``` -### Projects_CreateOrUpdate +### Organizations_Update ```java import com.azure.resourcemanager.neonpostgres.models.Attributes; @@ -1155,15 +616,16 @@ public final class ProjectsCreateOrUpdateSamples { * x-ms-original-file: 2025-03-01/Projects_CreateOrUpdate_MaximumSet_Gen.json */ /** - * Sample code: Projects_CreateOrUpdate_MaximumSet. + * Sample code: Projects_CreateOrUpdate_MaximumSet - generated by [MaximumSet] rule - generated by [MaximumSet] + * rule. * * @param manager Entry point to NeonPostgresManager. */ - public static void - projectsCreateOrUpdateMaximumSet(com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { + public static void projectsCreateOrUpdateMaximumSetGeneratedByMaximumSetRuleGeneratedByMaximumSetRule( + com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { manager.projects() - .define("entity-name") - .withExistingOrganization("rgneon", "test-org") + .define("sample-resource") + .withExistingOrganization("rgneon", "contoso-org") .withProperties(new ProjectProperties().withEntityName("entity-name") .withAttributes(Arrays.asList(new Attributes().withName("trhvzyvaqy").withValue("evpkgsskyavybxwwssm"))) .withRegionId("tlcltldfrnxh") @@ -1218,64 +680,7 @@ public final class ProjectsCreateOrUpdateSamples { } ``` -### Projects_Delete - -```java -import com.azure.resourcemanager.neonpostgres.models.Attributes; -import com.azure.resourcemanager.neonpostgres.models.Branch; -import com.azure.resourcemanager.neonpostgres.models.BranchProperties; -import com.azure.resourcemanager.neonpostgres.models.EndpointProperties; -import com.azure.resourcemanager.neonpostgres.models.EndpointType; -import com.azure.resourcemanager.neonpostgres.models.NeonDatabaseProperties; -import com.azure.resourcemanager.neonpostgres.models.NeonRoleProperties; -import java.util.Arrays; - -/** - * Samples for Branches Update. - */ -public final class BranchesUpdateSamples { - /* - * x-ms-original-file: 2025-03-01/Branches_Update_MaximumSet_Gen.json - */ - /** - * Sample code: Branches_Update_MaximumSet. - * - * @param manager Entry point to NeonPostgresManager. - */ - public static void branchesUpdateMaximumSet(com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { - Branch resource = manager.branches() - .getWithResponse("rgneon", "test-org", "entity-name", "entity-name", com.azure.core.util.Context.NONE) - .getValue(); - resource.update() - .withProperties(new BranchProperties().withEntityName("entity-name") - .withAttributes(Arrays.asList(new Attributes().withName("trhvzyvaqy").withValue("evpkgsskyavybxwwssm"))) - .withProjectId("oik") - .withParentId("entity-id") - .withRoleName("qrrairsupyosxnqotdwhbpc") - .withDatabaseName("duhxebzhd") - .withRoles(Arrays.asList(new NeonRoleProperties().withEntityName("entity-name") - .withAttributes( - Arrays.asList(new Attributes().withName("trhvzyvaqy").withValue("evpkgsskyavybxwwssm"))) - .withBranchId("wxbojkmdgaggkfiwqfakdkbyztm") - .withPermissions(Arrays.asList("myucqecpjriewzohxvadgkhiudnyx")) - .withIsSuperUser(true))) - .withDatabases(Arrays.asList(new NeonDatabaseProperties().withEntityName("entity-name") - .withAttributes( - Arrays.asList(new Attributes().withName("trhvzyvaqy").withValue("evpkgsskyavybxwwssm"))) - .withBranchId("orfdwdmzvfvlnrgussvcvoek") - .withOwnerName("odmbeg"))) - .withEndpoints(Arrays.asList(new EndpointProperties().withEntityName("entity-name") - .withAttributes( - Arrays.asList(new Attributes().withName("trhvzyvaqy").withValue("evpkgsskyavybxwwssm"))) - .withProjectId("rtvdeeflqzlrpfzhjqhcsfbldw") - .withBranchId("rzsyrhpfbydxtfkpaa") - .withEndpointType(EndpointType.READ_ONLY)))) - .apply(); - } -} -``` - -### Projects_Get +### Projects_CreateOrUpdate ```java import com.azure.resourcemanager.neonpostgres.models.Attributes; @@ -1308,17 +713,17 @@ public final class OrganizationsUpdateSamples { * x-ms-original-file: 2025-03-01/Organizations_Update_MaximumSet_Gen.json */ /** - * Sample code: Organizations_Update_MaximumSet. + * Sample code: Organizations_Update_MaximumSet - generated by [MaximumSet] rule - generated by [MaximumSet] rule. * * @param manager Entry point to NeonPostgresManager. */ - public static void - organizationsUpdateMaximumSet(com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { + public static void organizationsUpdateMaximumSetGeneratedByMaximumSetRuleGeneratedByMaximumSetRule( + com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { OrganizationResource resource = manager.organizations() - .getByResourceGroupWithResponse("rgneon", "test-org", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("rgneon", "contoso-org", com.azure.core.util.Context.NONE) .getValue(); resource.update() - .withTags(mapOf("key609", "fakeTokenPlaceholder")) + .withTags(mapOf()) .withProperties(new OrganizationProperties() .withMarketplaceDetails(new MarketplaceDetails().withSubscriptionId("yxmkfivp") .withSubscriptionStatus(MarketplaceSubscriptionStatus.PENDING_FULFILLMENT_START) @@ -1414,7 +819,7 @@ public final class OrganizationsUpdateSamples { } ``` -### Projects_GetConnectionUri +### Projects_Delete ```java /** @@ -1425,71 +830,95 @@ public final class NeonRolesListSamples { * x-ms-original-file: 2025-03-01/NeonRoles_List_MaximumSet_Gen.json */ /** - * Sample code: NeonRoles_List_MaximumSet. + * Sample code: NeonRoles_List_MaximumSet - generated by [MaximumSet] rule - generated by [MaximumSet] rule. * * @param manager Entry point to NeonPostgresManager. */ - public static void neonRolesListMaximumSet(com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { - manager.neonRoles().list("rgneon", "test-org", "entity-name", "entity-name", com.azure.core.util.Context.NONE); + public static void neonRolesListMaximumSetGeneratedByMaximumSetRuleGeneratedByMaximumSetRule( + com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { + manager.neonRoles() + .list("rgneon", "contoso-org", "sample-resource", "sample-resource", com.azure.core.util.Context.NONE); } } ``` -### Projects_List +### Projects_Get ```java /** - * Samples for Computes Delete. + * Samples for Operations List. */ -public final class ComputesDeleteSamples { +public final class OperationsListSamples { /* - * x-ms-original-file: 2025-03-01/Computes_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2025-03-01/Operations_List_MinimumSet_Gen.json */ /** - * Sample code: Computes_Delete_MaximumSet. + * Sample code: Operations_List_MaximumSet - generated by [MaximumSet] rule - generated by [MinimumSet] rule. * * @param manager Entry point to NeonPostgresManager. */ - public static void computesDeleteMaximumSet(com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { - manager.computes() - .deleteWithResponse("rgneon", "test-org", "entity-name", "entity-name", "entity-name", - com.azure.core.util.Context.NONE); + public static void operationsListMaximumSetGeneratedByMaximumSetRuleGeneratedByMinimumSetRule( + com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { + manager.operations().list(com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-03-01/Operations_List_MaximumSet_Gen.json + */ + /** + * Sample code: Operations_List_MaximumSet - generated by [MaximumSet] rule - generated by [MaximumSet] rule. + * + * @param manager Entry point to NeonPostgresManager. + */ + public static void operationsListMaximumSetGeneratedByMaximumSetRuleGeneratedByMaximumSetRule( + com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { + manager.operations().list(com.azure.core.util.Context.NONE); } } ``` -### Projects_Update +### Projects_GetConnectionUri ```java -import com.azure.resourcemanager.neonpostgres.models.Attributes; -import com.azure.resourcemanager.neonpostgres.models.NeonDatabase; -import com.azure.resourcemanager.neonpostgres.models.NeonDatabaseProperties; -import java.util.Arrays; +/** + * Samples for Branches Get. + */ +public final class BranchesGetSamples { + /* + * x-ms-original-file: 2025-03-01/Branches_Get_MaximumSet_Gen.json + */ + /** + * Sample code: Branches_Get_MaximumSet - generated by [MaximumSet] rule - generated by [MaximumSet] rule. + * + * @param manager Entry point to NeonPostgresManager. + */ + public static void branchesGetMaximumSetGeneratedByMaximumSetRuleGeneratedByMaximumSetRule( + com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { + manager.branches() + .getWithResponse("rgneon", "contoso-org", "sample-resource", "sample-resource", + com.azure.core.util.Context.NONE); + } +} +``` + +### Projects_List +```java /** - * Samples for NeonDatabases Update. + * Samples for Organizations Delete. */ -public final class NeonDatabasesUpdateSamples { +public final class OrganizationsDeleteSamples { /* - * x-ms-original-file: 2025-03-01/NeonDatabases_Update_MaximumSet_Gen.json + * x-ms-original-file: 2025-03-01/Organizations_Delete_MaximumSet_Gen.json */ /** - * Sample code: NeonDatabases_Update_MaximumSet. + * Sample code: Organizations_Delete_MaximumSet - generated by [MaximumSet] rule - generated by [MaximumSet] rule. * * @param manager Entry point to NeonPostgresManager. */ - public static void - neonDatabasesUpdateMaximumSet(com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { - NeonDatabase resource = manager.neonDatabases() - .getWithResponse("rgneon", "test-org", "entity-name", "entity-name", "entity-name", - com.azure.core.util.Context.NONE) - .getValue(); - resource.update() - .withProperties(new NeonDatabaseProperties().withEntityName("entity-name") - .withAttributes(Arrays.asList(new Attributes().withName("trhvzyvaqy").withValue("evpkgsskyavybxwwssm"))) - .withBranchId("orfdwdmzvfvlnrgussvcvoek") - .withOwnerName("odmbeg")) - .apply(); + public static void organizationsDeleteMaximumSetGeneratedByMaximumSetRuleGeneratedByMaximumSetRule( + com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { + manager.organizations().delete("rgneon", "contoso-org", com.azure.core.util.Context.NONE); } } ``` diff --git a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/pom.xml b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/pom.xml index a11a18352ba2..1e01cacb7a28 100644 --- a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/pom.xml +++ b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/pom.xml @@ -45,6 +45,7 @@ UTF-8 0 0 + true diff --git a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/NeonPostgresManager.java b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/NeonPostgresManager.java index f62157471115..5cf0c5ba0508 100644 --- a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/NeonPostgresManager.java +++ b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/NeonPostgresManager.java @@ -334,7 +334,7 @@ public Branches branches() { } /** - * Gets the resource collection API of Computes. It manages Compute. + * Gets the resource collection API of Computes. * * @return Resource collection API of Computes. */ @@ -346,7 +346,7 @@ public Computes computes() { } /** - * Gets the resource collection API of NeonDatabases. It manages NeonDatabase. + * Gets the resource collection API of NeonDatabases. * * @return Resource collection API of NeonDatabases. */ @@ -358,7 +358,7 @@ public NeonDatabases neonDatabases() { } /** - * Gets the resource collection API of NeonRoles. It manages NeonRole. + * Gets the resource collection API of NeonRoles. * * @return Resource collection API of NeonRoles. */ @@ -370,7 +370,7 @@ public NeonRoles neonRoles() { } /** - * Gets the resource collection API of Endpoints. It manages Endpoint. + * Gets the resource collection API of Endpoints. * * @return Resource collection API of Endpoints. */ diff --git a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/fluent/BranchesClient.java b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/fluent/BranchesClient.java index 860d56aac6a0..5fac3cf15810 100644 --- a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/fluent/BranchesClient.java +++ b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/fluent/BranchesClient.java @@ -119,76 +119,6 @@ BranchInner createOrUpdate(String resourceGroupName, String organizationName, St BranchInner createOrUpdate(String resourceGroupName, String organizationName, String projectName, String branchName, BranchInner resource, Context context); - /** - * Update a Branch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param properties The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the Branch resource type. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, BranchInner> beginUpdate(String resourceGroupName, String organizationName, - String projectName, String branchName, BranchInner properties); - - /** - * Update a Branch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param properties The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the Branch resource type. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, BranchInner> beginUpdate(String resourceGroupName, String organizationName, - String projectName, String branchName, BranchInner properties, Context context); - - /** - * Update a Branch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param properties The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Branch resource type. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - BranchInner update(String resourceGroupName, String organizationName, String projectName, String branchName, - BranchInner properties); - - /** - * Update a Branch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param properties The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Branch resource type. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - BranchInner update(String resourceGroupName, String organizationName, String projectName, String branchName, - BranchInner properties, Context context); - /** * Delete a Branch. * diff --git a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/fluent/ComputesClient.java b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/fluent/ComputesClient.java index 46c8fd5cbb66..9f911d0b6c45 100644 --- a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/fluent/ComputesClient.java +++ b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/fluent/ComputesClient.java @@ -7,234 +7,13 @@ import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; -import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.neonpostgres.fluent.models.ComputeInner; /** * An instance of this class provides access to all the operations defined in ComputesClient. */ public interface ComputesClient { - /** - * Get a Compute. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param computeName The name of the Compute. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Compute along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String organizationName, String projectName, - String branchName, String computeName, Context context); - - /** - * Get a Compute. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param computeName The name of the Compute. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 Compute. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ComputeInner get(String resourceGroupName, String organizationName, String projectName, String branchName, - String computeName); - - /** - * Create a Compute. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param computeName The name of the Compute. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the Compute resource type. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ComputeInner> beginCreateOrUpdate(String resourceGroupName, - String organizationName, String projectName, String branchName, String computeName, ComputeInner resource); - - /** - * Create a Compute. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param computeName The name of the Compute. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the Compute resource type. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ComputeInner> beginCreateOrUpdate(String resourceGroupName, - String organizationName, String projectName, String branchName, String computeName, ComputeInner resource, - Context context); - - /** - * Create a Compute. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param computeName The name of the Compute. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Compute resource type. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ComputeInner createOrUpdate(String resourceGroupName, String organizationName, String projectName, - String branchName, String computeName, ComputeInner resource); - - /** - * Create a Compute. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param computeName The name of the Compute. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Compute resource type. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ComputeInner createOrUpdate(String resourceGroupName, String organizationName, String projectName, - String branchName, String computeName, ComputeInner resource, Context context); - - /** - * Update a Compute. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param computeName The name of the Compute. - * @param properties The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the Compute resource type. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ComputeInner> beginUpdate(String resourceGroupName, String organizationName, - String projectName, String branchName, String computeName, ComputeInner properties); - - /** - * Update a Compute. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param computeName The name of the Compute. - * @param properties The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the Compute resource type. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ComputeInner> beginUpdate(String resourceGroupName, String organizationName, - String projectName, String branchName, String computeName, ComputeInner properties, Context context); - - /** - * Update a Compute. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param computeName The name of the Compute. - * @param properties The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Compute resource type. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ComputeInner update(String resourceGroupName, String organizationName, String projectName, String branchName, - String computeName, ComputeInner properties); - - /** - * Update a Compute. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param computeName The name of the Compute. - * @param properties The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Compute resource type. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ComputeInner update(String resourceGroupName, String organizationName, String projectName, String branchName, - String computeName, ComputeInner properties, Context context); - - /** - * Delete a Compute. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param computeName The name of the Compute. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse(String resourceGroupName, String organizationName, String projectName, - String branchName, String computeName, Context context); - - /** - * Delete a Compute. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param computeName The name of the Compute. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String organizationName, String projectName, String branchName, - String computeName); - /** * List Compute resources by Branch. * diff --git a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/fluent/EndpointsClient.java b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/fluent/EndpointsClient.java index 29810ef875da..cf4f6a5a06ac 100644 --- a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/fluent/EndpointsClient.java +++ b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/fluent/EndpointsClient.java @@ -7,234 +7,13 @@ import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; -import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.neonpostgres.fluent.models.EndpointInner; /** * An instance of this class provides access to all the operations defined in EndpointsClient. */ public interface EndpointsClient { - /** - * Get a Endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param endpointName The name of the Endpoint. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Endpoint along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String organizationName, String projectName, - String branchName, String endpointName, Context context); - - /** - * Get a Endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param endpointName The name of the Endpoint. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 Endpoint. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - EndpointInner get(String resourceGroupName, String organizationName, String projectName, String branchName, - String endpointName); - - /** - * Create a Endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param endpointName The name of the Endpoint. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the Neon compute endpoint resource type. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, EndpointInner> beginCreateOrUpdate(String resourceGroupName, - String organizationName, String projectName, String branchName, String endpointName, EndpointInner resource); - - /** - * Create a Endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param endpointName The name of the Endpoint. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the Neon compute endpoint resource type. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, EndpointInner> beginCreateOrUpdate(String resourceGroupName, - String organizationName, String projectName, String branchName, String endpointName, EndpointInner resource, - Context context); - - /** - * Create a Endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param endpointName The name of the Endpoint. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Neon compute endpoint resource type. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - EndpointInner createOrUpdate(String resourceGroupName, String organizationName, String projectName, - String branchName, String endpointName, EndpointInner resource); - - /** - * Create a Endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param endpointName The name of the Endpoint. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Neon compute endpoint resource type. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - EndpointInner createOrUpdate(String resourceGroupName, String organizationName, String projectName, - String branchName, String endpointName, EndpointInner resource, Context context); - - /** - * Update a Endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param endpointName The name of the Endpoint. - * @param properties The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the Neon compute endpoint resource type. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, EndpointInner> beginUpdate(String resourceGroupName, String organizationName, - String projectName, String branchName, String endpointName, EndpointInner properties); - - /** - * Update a Endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param endpointName The name of the Endpoint. - * @param properties The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the Neon compute endpoint resource type. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, EndpointInner> beginUpdate(String resourceGroupName, String organizationName, - String projectName, String branchName, String endpointName, EndpointInner properties, Context context); - - /** - * Update a Endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param endpointName The name of the Endpoint. - * @param properties The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Neon compute endpoint resource type. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - EndpointInner update(String resourceGroupName, String organizationName, String projectName, String branchName, - String endpointName, EndpointInner properties); - - /** - * Update a Endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param endpointName The name of the Endpoint. - * @param properties The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Neon compute endpoint resource type. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - EndpointInner update(String resourceGroupName, String organizationName, String projectName, String branchName, - String endpointName, EndpointInner properties, Context context); - - /** - * Delete a Endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param endpointName The name of the Endpoint. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse(String resourceGroupName, String organizationName, String projectName, - String branchName, String endpointName, Context context); - - /** - * Delete a Endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param endpointName The name of the Endpoint. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String organizationName, String projectName, String branchName, - String endpointName); - /** * List Endpoint resources by Branch. * diff --git a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/fluent/NeonDatabasesClient.java b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/fluent/NeonDatabasesClient.java index 9c976416e80c..800e31f8b6d3 100644 --- a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/fluent/NeonDatabasesClient.java +++ b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/fluent/NeonDatabasesClient.java @@ -7,237 +7,13 @@ import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; -import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.neonpostgres.fluent.models.NeonDatabaseInner; /** * An instance of this class provides access to all the operations defined in NeonDatabasesClient. */ public interface NeonDatabasesClient { - /** - * Get a NeonDatabase. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param neonDatabaseName The name of the NeonDatabase. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a NeonDatabase along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String organizationName, String projectName, - String branchName, String neonDatabaseName, Context context); - - /** - * Get a NeonDatabase. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param neonDatabaseName The name of the NeonDatabase. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 NeonDatabase. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - NeonDatabaseInner get(String resourceGroupName, String organizationName, String projectName, String branchName, - String neonDatabaseName); - - /** - * Create a NeonDatabase. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param neonDatabaseName The name of the NeonDatabase. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the Neon Database resource type. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, NeonDatabaseInner> beginCreateOrUpdate(String resourceGroupName, - String organizationName, String projectName, String branchName, String neonDatabaseName, - NeonDatabaseInner resource); - - /** - * Create a NeonDatabase. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param neonDatabaseName The name of the NeonDatabase. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the Neon Database resource type. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, NeonDatabaseInner> beginCreateOrUpdate(String resourceGroupName, - String organizationName, String projectName, String branchName, String neonDatabaseName, - NeonDatabaseInner resource, Context context); - - /** - * Create a NeonDatabase. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param neonDatabaseName The name of the NeonDatabase. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Neon Database resource type. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - NeonDatabaseInner createOrUpdate(String resourceGroupName, String organizationName, String projectName, - String branchName, String neonDatabaseName, NeonDatabaseInner resource); - - /** - * Create a NeonDatabase. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param neonDatabaseName The name of the NeonDatabase. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Neon Database resource type. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - NeonDatabaseInner createOrUpdate(String resourceGroupName, String organizationName, String projectName, - String branchName, String neonDatabaseName, NeonDatabaseInner resource, Context context); - - /** - * Update a NeonDatabase. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param neonDatabaseName The name of the NeonDatabase. - * @param properties The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the Neon Database resource type. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, NeonDatabaseInner> beginUpdate(String resourceGroupName, - String organizationName, String projectName, String branchName, String neonDatabaseName, - NeonDatabaseInner properties); - - /** - * Update a NeonDatabase. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param neonDatabaseName The name of the NeonDatabase. - * @param properties The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the Neon Database resource type. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, NeonDatabaseInner> beginUpdate(String resourceGroupName, - String organizationName, String projectName, String branchName, String neonDatabaseName, - NeonDatabaseInner properties, Context context); - - /** - * Update a NeonDatabase. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param neonDatabaseName The name of the NeonDatabase. - * @param properties The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Neon Database resource type. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - NeonDatabaseInner update(String resourceGroupName, String organizationName, String projectName, String branchName, - String neonDatabaseName, NeonDatabaseInner properties); - - /** - * Update a NeonDatabase. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param neonDatabaseName The name of the NeonDatabase. - * @param properties The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Neon Database resource type. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - NeonDatabaseInner update(String resourceGroupName, String organizationName, String projectName, String branchName, - String neonDatabaseName, NeonDatabaseInner properties, Context context); - - /** - * Delete a NeonDatabase. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param neonDatabaseName The name of the NeonDatabase. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse(String resourceGroupName, String organizationName, String projectName, - String branchName, String neonDatabaseName, Context context); - - /** - * Delete a NeonDatabase. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param neonDatabaseName The name of the NeonDatabase. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String organizationName, String projectName, String branchName, - String neonDatabaseName); - /** * List NeonDatabase resources by Branch. * diff --git a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/fluent/NeonRolesClient.java b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/fluent/NeonRolesClient.java index 2a262a12c02e..c7a3c34af8df 100644 --- a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/fluent/NeonRolesClient.java +++ b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/fluent/NeonRolesClient.java @@ -7,234 +7,13 @@ import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; -import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.neonpostgres.fluent.models.NeonRoleInner; /** * An instance of this class provides access to all the operations defined in NeonRolesClient. */ public interface NeonRolesClient { - /** - * Get a NeonRole. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param neonRoleName The name of the NeonRole. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a NeonRole along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String organizationName, String projectName, - String branchName, String neonRoleName, Context context); - - /** - * Get a NeonRole. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param neonRoleName The name of the NeonRole. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 NeonRole. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - NeonRoleInner get(String resourceGroupName, String organizationName, String projectName, String branchName, - String neonRoleName); - - /** - * Create a NeonRole. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param neonRoleName The name of the NeonRole. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the Neon Role resource type. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, NeonRoleInner> beginCreateOrUpdate(String resourceGroupName, - String organizationName, String projectName, String branchName, String neonRoleName, NeonRoleInner resource); - - /** - * Create a NeonRole. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param neonRoleName The name of the NeonRole. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the Neon Role resource type. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, NeonRoleInner> beginCreateOrUpdate(String resourceGroupName, - String organizationName, String projectName, String branchName, String neonRoleName, NeonRoleInner resource, - Context context); - - /** - * Create a NeonRole. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param neonRoleName The name of the NeonRole. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Neon Role resource type. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - NeonRoleInner createOrUpdate(String resourceGroupName, String organizationName, String projectName, - String branchName, String neonRoleName, NeonRoleInner resource); - - /** - * Create a NeonRole. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param neonRoleName The name of the NeonRole. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Neon Role resource type. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - NeonRoleInner createOrUpdate(String resourceGroupName, String organizationName, String projectName, - String branchName, String neonRoleName, NeonRoleInner resource, Context context); - - /** - * Update a NeonRole. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param neonRoleName The name of the NeonRole. - * @param properties The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the Neon Role resource type. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, NeonRoleInner> beginUpdate(String resourceGroupName, String organizationName, - String projectName, String branchName, String neonRoleName, NeonRoleInner properties); - - /** - * Update a NeonRole. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param neonRoleName The name of the NeonRole. - * @param properties The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the Neon Role resource type. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, NeonRoleInner> beginUpdate(String resourceGroupName, String organizationName, - String projectName, String branchName, String neonRoleName, NeonRoleInner properties, Context context); - - /** - * Update a NeonRole. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param neonRoleName The name of the NeonRole. - * @param properties The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Neon Role resource type. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - NeonRoleInner update(String resourceGroupName, String organizationName, String projectName, String branchName, - String neonRoleName, NeonRoleInner properties); - - /** - * Update a NeonRole. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param neonRoleName The name of the NeonRole. - * @param properties The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Neon Role resource type. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - NeonRoleInner update(String resourceGroupName, String organizationName, String projectName, String branchName, - String neonRoleName, NeonRoleInner properties, Context context); - - /** - * Delete a NeonRole. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param neonRoleName The name of the NeonRole. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse(String resourceGroupName, String organizationName, String projectName, - String branchName, String neonRoleName, Context context); - - /** - * Delete a NeonRole. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param neonRoleName The name of the NeonRole. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String organizationName, String projectName, String branchName, - String neonRoleName); - /** * List NeonRole resources by Branch. * diff --git a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/fluent/ProjectsClient.java b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/fluent/ProjectsClient.java index 534f73bbcf64..329f99dab2ef 100644 --- a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/fluent/ProjectsClient.java +++ b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/fluent/ProjectsClient.java @@ -114,71 +114,6 @@ ProjectInner createOrUpdate(String resourceGroupName, String organizationName, S ProjectInner createOrUpdate(String resourceGroupName, String organizationName, String projectName, ProjectInner resource, Context context); - /** - * Update a Project. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param properties The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the Project resource type. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ProjectInner> beginUpdate(String resourceGroupName, String organizationName, - String projectName, ProjectInner properties); - - /** - * Update a Project. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param properties The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the Project resource type. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ProjectInner> beginUpdate(String resourceGroupName, String organizationName, - String projectName, ProjectInner properties, Context context); - - /** - * Update a Project. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param properties The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Project resource type. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ProjectInner update(String resourceGroupName, String organizationName, String projectName, ProjectInner properties); - - /** - * Update a Project. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param properties The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Project resource type. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ProjectInner update(String resourceGroupName, String organizationName, String projectName, ProjectInner properties, - Context context); - /** * Delete a Project. * diff --git a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/fluent/models/ComputeInner.java b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/fluent/models/ComputeInner.java index a3c791f77435..92ccffcbb2ff 100644 --- a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/fluent/models/ComputeInner.java +++ b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/fluent/models/ComputeInner.java @@ -4,7 +4,7 @@ package com.azure.resourcemanager.neonpostgres.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; import com.azure.json.JsonReader; @@ -16,7 +16,7 @@ /** * The Compute resource type. */ -@Fluent +@Immutable public final class ComputeInner extends ProxyResource { /* * The resource-specific properties for this resource. @@ -46,7 +46,7 @@ public final class ComputeInner extends ProxyResource { /** * Creates an instance of ComputeInner class. */ - public ComputeInner() { + private ComputeInner() { } /** @@ -58,17 +58,6 @@ public ComputeProperties properties() { return this.properties; } - /** - * Set the properties property: The resource-specific properties for this resource. - * - * @param properties the properties value to set. - * @return the ComputeInner object itself. - */ - public ComputeInner withProperties(ComputeProperties properties) { - this.properties = properties; - return this; - } - /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * diff --git a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/fluent/models/EndpointInner.java b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/fluent/models/EndpointInner.java index 5a9e1297fd85..a651891a4e4b 100644 --- a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/fluent/models/EndpointInner.java +++ b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/fluent/models/EndpointInner.java @@ -4,7 +4,7 @@ package com.azure.resourcemanager.neonpostgres.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; import com.azure.json.JsonReader; @@ -16,7 +16,7 @@ /** * The Neon compute endpoint resource type. */ -@Fluent +@Immutable public final class EndpointInner extends ProxyResource { /* * The resource-specific properties for this resource. @@ -46,7 +46,7 @@ public final class EndpointInner extends ProxyResource { /** * Creates an instance of EndpointInner class. */ - public EndpointInner() { + private EndpointInner() { } /** @@ -58,17 +58,6 @@ public EndpointProperties properties() { return this.properties; } - /** - * Set the properties property: The resource-specific properties for this resource. - * - * @param properties the properties value to set. - * @return the EndpointInner object itself. - */ - public EndpointInner withProperties(EndpointProperties properties) { - this.properties = properties; - return this; - } - /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * diff --git a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/fluent/models/NeonDatabaseInner.java b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/fluent/models/NeonDatabaseInner.java index 9a0e92b4e24f..1c70bd97e489 100644 --- a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/fluent/models/NeonDatabaseInner.java +++ b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/fluent/models/NeonDatabaseInner.java @@ -4,7 +4,7 @@ package com.azure.resourcemanager.neonpostgres.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; import com.azure.json.JsonReader; @@ -16,7 +16,7 @@ /** * The Neon Database resource type. */ -@Fluent +@Immutable public final class NeonDatabaseInner extends ProxyResource { /* * The resource-specific properties for this resource. @@ -46,7 +46,7 @@ public final class NeonDatabaseInner extends ProxyResource { /** * Creates an instance of NeonDatabaseInner class. */ - public NeonDatabaseInner() { + private NeonDatabaseInner() { } /** @@ -58,17 +58,6 @@ public NeonDatabaseProperties properties() { return this.properties; } - /** - * Set the properties property: The resource-specific properties for this resource. - * - * @param properties the properties value to set. - * @return the NeonDatabaseInner object itself. - */ - public NeonDatabaseInner withProperties(NeonDatabaseProperties properties) { - this.properties = properties; - return this; - } - /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * diff --git a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/fluent/models/NeonRoleInner.java b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/fluent/models/NeonRoleInner.java index 6bb6ba1664d9..011f2f947106 100644 --- a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/fluent/models/NeonRoleInner.java +++ b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/fluent/models/NeonRoleInner.java @@ -4,7 +4,7 @@ package com.azure.resourcemanager.neonpostgres.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; import com.azure.json.JsonReader; @@ -16,7 +16,7 @@ /** * The Neon Role resource type. */ -@Fluent +@Immutable public final class NeonRoleInner extends ProxyResource { /* * The resource-specific properties for this resource. @@ -46,7 +46,7 @@ public final class NeonRoleInner extends ProxyResource { /** * Creates an instance of NeonRoleInner class. */ - public NeonRoleInner() { + private NeonRoleInner() { } /** @@ -58,17 +58,6 @@ public NeonRoleProperties properties() { return this.properties; } - /** - * Set the properties property: The resource-specific properties for this resource. - * - * @param properties the properties value to set. - * @return the NeonRoleInner object itself. - */ - public NeonRoleInner withProperties(NeonRoleProperties properties) { - this.properties = properties; - return this; - } - /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * diff --git a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/implementation/BranchImpl.java b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/implementation/BranchImpl.java index 1a214eaceb9d..38902f10e6a1 100644 --- a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/implementation/BranchImpl.java +++ b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/implementation/BranchImpl.java @@ -90,14 +90,15 @@ public BranchImpl update() { public Branch apply() { this.innerObject = serviceManager.serviceClient() .getBranches() - .update(resourceGroupName, organizationName, projectName, branchName, this.innerModel(), Context.NONE); + .createOrUpdate(resourceGroupName, organizationName, projectName, branchName, this.innerModel(), + Context.NONE); return this; } public Branch apply(Context context) { this.innerObject = serviceManager.serviceClient() .getBranches() - .update(resourceGroupName, organizationName, projectName, branchName, this.innerModel(), context); + .createOrUpdate(resourceGroupName, organizationName, projectName, branchName, this.innerModel(), context); return this; } diff --git a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/implementation/BranchesClientImpl.java b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/implementation/BranchesClientImpl.java index cbc274761fcb..2015078a7e4f 100644 --- a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/implementation/BranchesClientImpl.java +++ b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/implementation/BranchesClientImpl.java @@ -12,7 +12,6 @@ import com.azure.core.annotation.Headers; import com.azure.core.annotation.Host; import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.Patch; import com.azure.core.annotation.PathParam; import com.azure.core.annotation.Put; import com.azure.core.annotation.QueryParam; @@ -90,17 +89,6 @@ Mono>> createOrUpdate(@HostParam("endpoint") String en @PathParam("branchName") String branchName, @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, @BodyParam("application/json") BranchInner resource, Context context); - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("organizationName") String organizationName, @PathParam("projectName") String projectName, - @PathParam("branchName") String branchName, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") BranchInner properties, - Context context); - @Headers({ "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}") @ExpectedResponses({ 200, 204 }) @@ -547,277 +535,6 @@ public BranchInner createOrUpdate(String resourceGroupName, String organizationN .block(); } - /** - * Update a Branch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param properties The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 Branch resource type along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String organizationName, - String projectName, String branchName, BranchInner properties) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (organizationName == null) { - return Mono - .error(new IllegalArgumentException("Parameter organizationName is required and cannot be null.")); - } - if (projectName == null) { - return Mono.error(new IllegalArgumentException("Parameter projectName is required and cannot be null.")); - } - if (branchName == null) { - return Mono.error(new IllegalArgumentException("Parameter branchName is required and cannot be null.")); - } - if (properties == null) { - return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); - } else { - properties.validate(); - } - final String contentType = "application/json"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, organizationName, projectName, branchName, - contentType, accept, properties, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Update a Branch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param properties The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Branch resource type along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String organizationName, - String projectName, String branchName, BranchInner properties, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (organizationName == null) { - return Mono - .error(new IllegalArgumentException("Parameter organizationName is required and cannot be null.")); - } - if (projectName == null) { - return Mono.error(new IllegalArgumentException("Parameter projectName is required and cannot be null.")); - } - if (branchName == null) { - return Mono.error(new IllegalArgumentException("Parameter branchName is required and cannot be null.")); - } - if (properties == null) { - return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); - } else { - properties.validate(); - } - final String contentType = "application/json"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, organizationName, projectName, branchName, contentType, accept, properties, context); - } - - /** - * Update a Branch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param properties The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the Branch resource type. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, BranchInner> beginUpdateAsync(String resourceGroupName, - String organizationName, String projectName, String branchName, BranchInner properties) { - Mono>> mono - = updateWithResponseAsync(resourceGroupName, organizationName, projectName, branchName, properties); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - BranchInner.class, BranchInner.class, this.client.getContext()); - } - - /** - * Update a Branch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param properties The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the Branch resource type. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, BranchInner> beginUpdateAsync(String resourceGroupName, - String organizationName, String projectName, String branchName, BranchInner properties, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = updateWithResponseAsync(resourceGroupName, organizationName, - projectName, branchName, properties, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - BranchInner.class, BranchInner.class, context); - } - - /** - * Update a Branch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param properties The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the Branch resource type. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, BranchInner> beginUpdate(String resourceGroupName, - String organizationName, String projectName, String branchName, BranchInner properties) { - return this.beginUpdateAsync(resourceGroupName, organizationName, projectName, branchName, properties) - .getSyncPoller(); - } - - /** - * Update a Branch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param properties The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the Branch resource type. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, BranchInner> beginUpdate(String resourceGroupName, - String organizationName, String projectName, String branchName, BranchInner properties, Context context) { - return this.beginUpdateAsync(resourceGroupName, organizationName, projectName, branchName, properties, context) - .getSyncPoller(); - } - - /** - * Update a Branch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param properties The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 Branch resource type on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String organizationName, String projectName, - String branchName, BranchInner properties) { - return beginUpdateAsync(resourceGroupName, organizationName, projectName, branchName, properties).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Update a Branch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param properties The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Branch resource type on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String organizationName, String projectName, - String branchName, BranchInner properties, Context context) { - return beginUpdateAsync(resourceGroupName, organizationName, projectName, branchName, properties, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Update a Branch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param properties The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 Branch resource type. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public BranchInner update(String resourceGroupName, String organizationName, String projectName, String branchName, - BranchInner properties) { - return updateAsync(resourceGroupName, organizationName, projectName, branchName, properties).block(); - } - - /** - * Update a Branch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param properties The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Branch resource type. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public BranchInner update(String resourceGroupName, String organizationName, String projectName, String branchName, - BranchInner properties, Context context) { - return updateAsync(resourceGroupName, organizationName, projectName, branchName, properties, context).block(); - } - /** * Delete a Branch. * diff --git a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/implementation/ComputeImpl.java b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/implementation/ComputeImpl.java index 39a4bb1af281..fe0fc86f36b8 100644 --- a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/implementation/ComputeImpl.java +++ b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/implementation/ComputeImpl.java @@ -5,16 +5,20 @@ package com.azure.resourcemanager.neonpostgres.implementation; import com.azure.core.management.SystemData; -import com.azure.core.util.Context; import com.azure.resourcemanager.neonpostgres.fluent.models.ComputeInner; import com.azure.resourcemanager.neonpostgres.models.Compute; import com.azure.resourcemanager.neonpostgres.models.ComputeProperties; -public final class ComputeImpl implements Compute, Compute.Definition, Compute.Update { +public final class ComputeImpl implements Compute { private ComputeInner innerObject; private final com.azure.resourcemanager.neonpostgres.NeonPostgresManager serviceManager; + ComputeImpl(ComputeInner innerObject, com.azure.resourcemanager.neonpostgres.NeonPostgresManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + public String id() { return this.innerModel().id(); } @@ -35,10 +39,6 @@ public SystemData systemData() { return this.innerModel().systemData(); } - public String resourceGroupName() { - return resourceGroupName; - } - public ComputeInner innerModel() { return this.innerObject; } @@ -46,96 +46,4 @@ public ComputeInner innerModel() { private com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager() { return this.serviceManager; } - - private String resourceGroupName; - - private String organizationName; - - private String projectName; - - private String branchName; - - private String computeName; - - public ComputeImpl withExistingBranche(String resourceGroupName, String organizationName, String projectName, - String branchName) { - this.resourceGroupName = resourceGroupName; - this.organizationName = organizationName; - this.projectName = projectName; - this.branchName = branchName; - return this; - } - - public Compute create() { - this.innerObject = serviceManager.serviceClient() - .getComputes() - .createOrUpdate(resourceGroupName, organizationName, projectName, branchName, computeName, - this.innerModel(), Context.NONE); - return this; - } - - public Compute create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getComputes() - .createOrUpdate(resourceGroupName, organizationName, projectName, branchName, computeName, - this.innerModel(), context); - return this; - } - - ComputeImpl(String name, com.azure.resourcemanager.neonpostgres.NeonPostgresManager serviceManager) { - this.innerObject = new ComputeInner(); - this.serviceManager = serviceManager; - this.computeName = name; - } - - public ComputeImpl update() { - return this; - } - - public Compute apply() { - this.innerObject = serviceManager.serviceClient() - .getComputes() - .update(resourceGroupName, organizationName, projectName, branchName, computeName, this.innerModel(), - Context.NONE); - return this; - } - - public Compute apply(Context context) { - this.innerObject = serviceManager.serviceClient() - .getComputes() - .update(resourceGroupName, organizationName, projectName, branchName, computeName, this.innerModel(), - context); - return this; - } - - ComputeImpl(ComputeInner innerObject, com.azure.resourcemanager.neonpostgres.NeonPostgresManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.organizationName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "organizations"); - this.projectName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "projects"); - this.branchName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "branches"); - this.computeName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "computes"); - } - - public Compute refresh() { - this.innerObject = serviceManager.serviceClient() - .getComputes() - .getWithResponse(resourceGroupName, organizationName, projectName, branchName, computeName, Context.NONE) - .getValue(); - return this; - } - - public Compute refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getComputes() - .getWithResponse(resourceGroupName, organizationName, projectName, branchName, computeName, context) - .getValue(); - return this; - } - - public ComputeImpl withProperties(ComputeProperties properties) { - this.innerModel().withProperties(properties); - return this; - } } diff --git a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/implementation/ComputesClientImpl.java b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/implementation/ComputesClientImpl.java index 9f93777fd3f3..3ec9c78060d2 100644 --- a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/implementation/ComputesClientImpl.java +++ b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/implementation/ComputesClientImpl.java @@ -4,17 +4,13 @@ package com.azure.resourcemanager.neonpostgres.implementation; -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; import com.azure.core.annotation.ExpectedResponses; import com.azure.core.annotation.Get; import com.azure.core.annotation.HeaderParam; import com.azure.core.annotation.Headers; import com.azure.core.annotation.Host; import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.Patch; import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Put; import com.azure.core.annotation.QueryParam; import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceInterface; @@ -27,16 +23,11 @@ import com.azure.core.http.rest.Response; import com.azure.core.http.rest.RestProxy; import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.neonpostgres.fluent.ComputesClient; import com.azure.resourcemanager.neonpostgres.fluent.models.ComputeInner; import com.azure.resourcemanager.neonpostgres.implementation.models.ComputeListResult; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; /** @@ -70,50 +61,6 @@ public final class ComputesClientImpl implements ComputesClient { @Host("{endpoint}") @ServiceInterface(name = "NeonPostgresManageme") public interface ComputesService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/computes/{computeName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("organizationName") String organizationName, @PathParam("projectName") String projectName, - @PathParam("branchName") String branchName, @PathParam("computeName") String computeName, - @HeaderParam("Accept") String accept, Context context); - - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/computes/{computeName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("organizationName") String organizationName, @PathParam("projectName") String projectName, - @PathParam("branchName") String branchName, @PathParam("computeName") String computeName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") ComputeInner resource, Context context); - - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/computes/{computeName}") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("organizationName") String organizationName, @PathParam("projectName") String projectName, - @PathParam("branchName") String branchName, @PathParam("computeName") String computeName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") ComputeInner properties, Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/computes/{computeName}") - @ExpectedResponses({ 200, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("organizationName") String organizationName, @PathParam("projectName") String projectName, - @PathParam("branchName") String branchName, @PathParam("computeName") String computeName, - @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/computes") @ExpectedResponses({ 200 }) @@ -132,911 +79,6 @@ Mono> listNext(@PathParam(value = "nextLink", encode @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } - /** - * Get a Compute. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param computeName The name of the Compute. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 Compute along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String organizationName, - String projectName, String branchName, String computeName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (organizationName == null) { - return Mono - .error(new IllegalArgumentException("Parameter organizationName is required and cannot be null.")); - } - if (projectName == null) { - return Mono.error(new IllegalArgumentException("Parameter projectName is required and cannot be null.")); - } - if (branchName == null) { - return Mono.error(new IllegalArgumentException("Parameter branchName is required and cannot be null.")); - } - if (computeName == null) { - return Mono.error(new IllegalArgumentException("Parameter computeName 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, organizationName, projectName, branchName, - computeName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get a Compute. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param computeName The name of the Compute. - * @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 Compute along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String organizationName, - String projectName, String branchName, String computeName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (organizationName == null) { - return Mono - .error(new IllegalArgumentException("Parameter organizationName is required and cannot be null.")); - } - if (projectName == null) { - return Mono.error(new IllegalArgumentException("Parameter projectName is required and cannot be null.")); - } - if (branchName == null) { - return Mono.error(new IllegalArgumentException("Parameter branchName is required and cannot be null.")); - } - if (computeName == null) { - return Mono.error(new IllegalArgumentException("Parameter computeName 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, organizationName, projectName, branchName, computeName, accept, context); - } - - /** - * Get a Compute. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param computeName The name of the Compute. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 Compute on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String organizationName, String projectName, - String branchName, String computeName) { - return getWithResponseAsync(resourceGroupName, organizationName, projectName, branchName, computeName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get a Compute. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param computeName The name of the Compute. - * @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 Compute along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String organizationName, String projectName, - String branchName, String computeName, Context context) { - return getWithResponseAsync(resourceGroupName, organizationName, projectName, branchName, computeName, context) - .block(); - } - - /** - * Get a Compute. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param computeName The name of the Compute. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 Compute. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ComputeInner get(String resourceGroupName, String organizationName, String projectName, String branchName, - String computeName) { - return getWithResponse(resourceGroupName, organizationName, projectName, branchName, computeName, Context.NONE) - .getValue(); - } - - /** - * Create a Compute. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param computeName The name of the Compute. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 Compute resource type along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String organizationName, String projectName, String branchName, String computeName, ComputeInner resource) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (organizationName == null) { - return Mono - .error(new IllegalArgumentException("Parameter organizationName is required and cannot be null.")); - } - if (projectName == null) { - return Mono.error(new IllegalArgumentException("Parameter projectName is required and cannot be null.")); - } - if (branchName == null) { - return Mono.error(new IllegalArgumentException("Parameter branchName is required and cannot be null.")); - } - if (computeName == null) { - return Mono.error(new IllegalArgumentException("Parameter computeName is required and cannot be null.")); - } - if (resource == null) { - return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); - } else { - resource.validate(); - } - final String contentType = "application/json"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, organizationName, projectName, branchName, - computeName, contentType, accept, resource, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create a Compute. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param computeName The name of the Compute. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Compute resource type along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String organizationName, String projectName, String branchName, String computeName, ComputeInner resource, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (organizationName == null) { - return Mono - .error(new IllegalArgumentException("Parameter organizationName is required and cannot be null.")); - } - if (projectName == null) { - return Mono.error(new IllegalArgumentException("Parameter projectName is required and cannot be null.")); - } - if (branchName == null) { - return Mono.error(new IllegalArgumentException("Parameter branchName is required and cannot be null.")); - } - if (computeName == null) { - return Mono.error(new IllegalArgumentException("Parameter computeName is required and cannot be null.")); - } - if (resource == null) { - return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); - } else { - resource.validate(); - } - final String contentType = "application/json"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, organizationName, projectName, branchName, computeName, - contentType, accept, resource, context); - } - - /** - * Create a Compute. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param computeName The name of the Compute. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the Compute resource type. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ComputeInner> beginCreateOrUpdateAsync(String resourceGroupName, - String organizationName, String projectName, String branchName, String computeName, ComputeInner resource) { - Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, organizationName, - projectName, branchName, computeName, resource); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ComputeInner.class, ComputeInner.class, this.client.getContext()); - } - - /** - * Create a Compute. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param computeName The name of the Compute. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the Compute resource type. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ComputeInner> beginCreateOrUpdateAsync(String resourceGroupName, - String organizationName, String projectName, String branchName, String computeName, ComputeInner resource, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, organizationName, - projectName, branchName, computeName, resource, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ComputeInner.class, ComputeInner.class, context); - } - - /** - * Create a Compute. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param computeName The name of the Compute. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the Compute resource type. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ComputeInner> beginCreateOrUpdate(String resourceGroupName, - String organizationName, String projectName, String branchName, String computeName, ComputeInner resource) { - return this - .beginCreateOrUpdateAsync(resourceGroupName, organizationName, projectName, branchName, computeName, - resource) - .getSyncPoller(); - } - - /** - * Create a Compute. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param computeName The name of the Compute. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the Compute resource type. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ComputeInner> beginCreateOrUpdate(String resourceGroupName, - String organizationName, String projectName, String branchName, String computeName, ComputeInner resource, - Context context) { - return this - .beginCreateOrUpdateAsync(resourceGroupName, organizationName, projectName, branchName, computeName, - resource, context) - .getSyncPoller(); - } - - /** - * Create a Compute. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param computeName The name of the Compute. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 Compute resource type on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String organizationName, - String projectName, String branchName, String computeName, ComputeInner resource) { - return beginCreateOrUpdateAsync(resourceGroupName, organizationName, projectName, branchName, computeName, - resource).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create a Compute. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param computeName The name of the Compute. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Compute resource type on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String organizationName, - String projectName, String branchName, String computeName, ComputeInner resource, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, organizationName, projectName, branchName, computeName, - resource, context).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create a Compute. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param computeName The name of the Compute. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 Compute resource type. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ComputeInner createOrUpdate(String resourceGroupName, String organizationName, String projectName, - String branchName, String computeName, ComputeInner resource) { - return createOrUpdateAsync(resourceGroupName, organizationName, projectName, branchName, computeName, resource) - .block(); - } - - /** - * Create a Compute. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param computeName The name of the Compute. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Compute resource type. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ComputeInner createOrUpdate(String resourceGroupName, String organizationName, String projectName, - String branchName, String computeName, ComputeInner resource, Context context) { - return createOrUpdateAsync(resourceGroupName, organizationName, projectName, branchName, computeName, resource, - context).block(); - } - - /** - * Update a Compute. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param computeName The name of the Compute. - * @param properties The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 Compute resource type along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String organizationName, - String projectName, String branchName, String computeName, ComputeInner properties) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (organizationName == null) { - return Mono - .error(new IllegalArgumentException("Parameter organizationName is required and cannot be null.")); - } - if (projectName == null) { - return Mono.error(new IllegalArgumentException("Parameter projectName is required and cannot be null.")); - } - if (branchName == null) { - return Mono.error(new IllegalArgumentException("Parameter branchName is required and cannot be null.")); - } - if (computeName == null) { - return Mono.error(new IllegalArgumentException("Parameter computeName is required and cannot be null.")); - } - if (properties == null) { - return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); - } else { - properties.validate(); - } - final String contentType = "application/json"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, organizationName, projectName, branchName, - computeName, contentType, accept, properties, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Update a Compute. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param computeName The name of the Compute. - * @param properties The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Compute resource type along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String organizationName, - String projectName, String branchName, String computeName, ComputeInner properties, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (organizationName == null) { - return Mono - .error(new IllegalArgumentException("Parameter organizationName is required and cannot be null.")); - } - if (projectName == null) { - return Mono.error(new IllegalArgumentException("Parameter projectName is required and cannot be null.")); - } - if (branchName == null) { - return Mono.error(new IllegalArgumentException("Parameter branchName is required and cannot be null.")); - } - if (computeName == null) { - return Mono.error(new IllegalArgumentException("Parameter computeName is required and cannot be null.")); - } - if (properties == null) { - return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); - } else { - properties.validate(); - } - final String contentType = "application/json"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, organizationName, projectName, branchName, computeName, contentType, accept, properties, - context); - } - - /** - * Update a Compute. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param computeName The name of the Compute. - * @param properties The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the Compute resource type. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ComputeInner> beginUpdateAsync(String resourceGroupName, - String organizationName, String projectName, String branchName, String computeName, ComputeInner properties) { - Mono>> mono = updateWithResponseAsync(resourceGroupName, organizationName, - projectName, branchName, computeName, properties); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ComputeInner.class, ComputeInner.class, this.client.getContext()); - } - - /** - * Update a Compute. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param computeName The name of the Compute. - * @param properties The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the Compute resource type. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ComputeInner> beginUpdateAsync(String resourceGroupName, - String organizationName, String projectName, String branchName, String computeName, ComputeInner properties, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = updateWithResponseAsync(resourceGroupName, organizationName, - projectName, branchName, computeName, properties, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ComputeInner.class, ComputeInner.class, context); - } - - /** - * Update a Compute. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param computeName The name of the Compute. - * @param properties The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the Compute resource type. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ComputeInner> beginUpdate(String resourceGroupName, - String organizationName, String projectName, String branchName, String computeName, ComputeInner properties) { - return this - .beginUpdateAsync(resourceGroupName, organizationName, projectName, branchName, computeName, properties) - .getSyncPoller(); - } - - /** - * Update a Compute. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param computeName The name of the Compute. - * @param properties The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the Compute resource type. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ComputeInner> beginUpdate(String resourceGroupName, - String organizationName, String projectName, String branchName, String computeName, ComputeInner properties, - Context context) { - return this - .beginUpdateAsync(resourceGroupName, organizationName, projectName, branchName, computeName, properties, - context) - .getSyncPoller(); - } - - /** - * Update a Compute. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param computeName The name of the Compute. - * @param properties The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 Compute resource type on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String organizationName, String projectName, - String branchName, String computeName, ComputeInner properties) { - return beginUpdateAsync(resourceGroupName, organizationName, projectName, branchName, computeName, properties) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Update a Compute. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param computeName The name of the Compute. - * @param properties The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Compute resource type on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String organizationName, String projectName, - String branchName, String computeName, ComputeInner properties, Context context) { - return beginUpdateAsync(resourceGroupName, organizationName, projectName, branchName, computeName, properties, - context).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Update a Compute. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param computeName The name of the Compute. - * @param properties The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 Compute resource type. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ComputeInner update(String resourceGroupName, String organizationName, String projectName, String branchName, - String computeName, ComputeInner properties) { - return updateAsync(resourceGroupName, organizationName, projectName, branchName, computeName, properties) - .block(); - } - - /** - * Update a Compute. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param computeName The name of the Compute. - * @param properties The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Compute resource type. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ComputeInner update(String resourceGroupName, String organizationName, String projectName, String branchName, - String computeName, ComputeInner properties, Context context) { - return updateAsync(resourceGroupName, organizationName, projectName, branchName, computeName, properties, - context).block(); - } - - /** - * Delete a Compute. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param computeName The name of the Compute. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String organizationName, - String projectName, String branchName, String computeName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (organizationName == null) { - return Mono - .error(new IllegalArgumentException("Parameter organizationName is required and cannot be null.")); - } - if (projectName == null) { - return Mono.error(new IllegalArgumentException("Parameter projectName is required and cannot be null.")); - } - if (branchName == null) { - return Mono.error(new IllegalArgumentException("Parameter branchName is required and cannot be null.")); - } - if (computeName == null) { - return Mono.error(new IllegalArgumentException("Parameter computeName 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, organizationName, projectName, branchName, - computeName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete a Compute. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param computeName The name of the Compute. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String organizationName, - String projectName, String branchName, String computeName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (organizationName == null) { - return Mono - .error(new IllegalArgumentException("Parameter organizationName is required and cannot be null.")); - } - if (projectName == null) { - return Mono.error(new IllegalArgumentException("Parameter projectName is required and cannot be null.")); - } - if (branchName == null) { - return Mono.error(new IllegalArgumentException("Parameter branchName is required and cannot be null.")); - } - if (computeName == null) { - return Mono.error(new IllegalArgumentException("Parameter computeName 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, organizationName, projectName, branchName, computeName, accept, context); - } - - /** - * Delete a Compute. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param computeName The name of the Compute. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String organizationName, String projectName, - String branchName, String computeName) { - return deleteWithResponseAsync(resourceGroupName, organizationName, projectName, branchName, computeName) - .flatMap(ignored -> Mono.empty()); - } - - /** - * Delete a Compute. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param computeName The name of the Compute. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse(String resourceGroupName, String organizationName, String projectName, - String branchName, String computeName, Context context) { - return deleteWithResponseAsync(resourceGroupName, organizationName, projectName, branchName, computeName, - context).block(); - } - - /** - * Delete a Compute. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param computeName The name of the Compute. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String organizationName, String projectName, String branchName, - String computeName) { - deleteWithResponse(resourceGroupName, organizationName, projectName, branchName, computeName, Context.NONE); - } - /** * List Compute resources by Branch. * diff --git a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/implementation/ComputesImpl.java b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/implementation/ComputesImpl.java index fa627d6e6538..9eea4e64945e 100644 --- a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/implementation/ComputesImpl.java +++ b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/implementation/ComputesImpl.java @@ -5,8 +5,6 @@ package com.azure.resourcemanager.neonpostgres.implementation; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.neonpostgres.fluent.ComputesClient; @@ -27,40 +25,6 @@ public ComputesImpl(ComputesClient innerClient, this.serviceManager = serviceManager; } - public Response getWithResponse(String resourceGroupName, String organizationName, String projectName, - String branchName, String computeName, Context context) { - Response inner = this.serviceClient() - .getWithResponse(resourceGroupName, organizationName, projectName, branchName, computeName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ComputeImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public Compute get(String resourceGroupName, String organizationName, String projectName, String branchName, - String computeName) { - ComputeInner inner - = this.serviceClient().get(resourceGroupName, organizationName, projectName, branchName, computeName); - if (inner != null) { - return new ComputeImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response deleteWithResponse(String resourceGroupName, String organizationName, String projectName, - String branchName, String computeName, Context context) { - return this.serviceClient() - .deleteWithResponse(resourceGroupName, organizationName, projectName, branchName, computeName, context); - } - - public void delete(String resourceGroupName, String organizationName, String projectName, String branchName, - String computeName) { - this.serviceClient().delete(resourceGroupName, organizationName, projectName, branchName, computeName); - } - public PagedIterable list(String resourceGroupName, String organizationName, String projectName, String branchName) { PagedIterable inner @@ -75,126 +39,6 @@ public PagedIterable list(String resourceGroupName, String organization return ResourceManagerUtils.mapPage(inner, inner1 -> new ComputeImpl(inner1, this.manager())); } - public Compute getById(String id) { - 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))); - } - String organizationName = ResourceManagerUtils.getValueFromIdByName(id, "organizations"); - if (organizationName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'organizations'.", id))); - } - String projectName = ResourceManagerUtils.getValueFromIdByName(id, "projects"); - if (projectName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'projects'.", id))); - } - String branchName = ResourceManagerUtils.getValueFromIdByName(id, "branches"); - if (branchName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'branches'.", id))); - } - String computeName = ResourceManagerUtils.getValueFromIdByName(id, "computes"); - if (computeName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'computes'.", id))); - } - return this - .getWithResponse(resourceGroupName, organizationName, projectName, branchName, computeName, Context.NONE) - .getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - 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))); - } - String organizationName = ResourceManagerUtils.getValueFromIdByName(id, "organizations"); - if (organizationName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'organizations'.", id))); - } - String projectName = ResourceManagerUtils.getValueFromIdByName(id, "projects"); - if (projectName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'projects'.", id))); - } - String branchName = ResourceManagerUtils.getValueFromIdByName(id, "branches"); - if (branchName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'branches'.", id))); - } - String computeName = ResourceManagerUtils.getValueFromIdByName(id, "computes"); - if (computeName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'computes'.", id))); - } - return this.getWithResponse(resourceGroupName, organizationName, projectName, branchName, computeName, context); - } - - public void deleteById(String id) { - 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))); - } - String organizationName = ResourceManagerUtils.getValueFromIdByName(id, "organizations"); - if (organizationName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'organizations'.", id))); - } - String projectName = ResourceManagerUtils.getValueFromIdByName(id, "projects"); - if (projectName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'projects'.", id))); - } - String branchName = ResourceManagerUtils.getValueFromIdByName(id, "branches"); - if (branchName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'branches'.", id))); - } - String computeName = ResourceManagerUtils.getValueFromIdByName(id, "computes"); - if (computeName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'computes'.", id))); - } - this.deleteWithResponse(resourceGroupName, organizationName, projectName, branchName, computeName, - Context.NONE); - } - - public Response deleteByIdWithResponse(String id, Context context) { - 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))); - } - String organizationName = ResourceManagerUtils.getValueFromIdByName(id, "organizations"); - if (organizationName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'organizations'.", id))); - } - String projectName = ResourceManagerUtils.getValueFromIdByName(id, "projects"); - if (projectName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'projects'.", id))); - } - String branchName = ResourceManagerUtils.getValueFromIdByName(id, "branches"); - if (branchName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'branches'.", id))); - } - String computeName = ResourceManagerUtils.getValueFromIdByName(id, "computes"); - if (computeName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'computes'.", id))); - } - return this.deleteWithResponse(resourceGroupName, organizationName, projectName, branchName, computeName, - context); - } - private ComputesClient serviceClient() { return this.innerClient; } @@ -202,8 +46,4 @@ private ComputesClient serviceClient() { private com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager() { return this.serviceManager; } - - public ComputeImpl define(String name) { - return new ComputeImpl(name, this.manager()); - } } diff --git a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/implementation/EndpointImpl.java b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/implementation/EndpointImpl.java index 9b5d495125da..1b23eec70c64 100644 --- a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/implementation/EndpointImpl.java +++ b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/implementation/EndpointImpl.java @@ -5,16 +5,20 @@ package com.azure.resourcemanager.neonpostgres.implementation; import com.azure.core.management.SystemData; -import com.azure.core.util.Context; import com.azure.resourcemanager.neonpostgres.fluent.models.EndpointInner; import com.azure.resourcemanager.neonpostgres.models.Endpoint; import com.azure.resourcemanager.neonpostgres.models.EndpointProperties; -public final class EndpointImpl implements Endpoint, Endpoint.Definition, Endpoint.Update { +public final class EndpointImpl implements Endpoint { private EndpointInner innerObject; private final com.azure.resourcemanager.neonpostgres.NeonPostgresManager serviceManager; + EndpointImpl(EndpointInner innerObject, com.azure.resourcemanager.neonpostgres.NeonPostgresManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + public String id() { return this.innerModel().id(); } @@ -35,10 +39,6 @@ public SystemData systemData() { return this.innerModel().systemData(); } - public String resourceGroupName() { - return resourceGroupName; - } - public EndpointInner innerModel() { return this.innerObject; } @@ -46,96 +46,4 @@ public EndpointInner innerModel() { private com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager() { return this.serviceManager; } - - private String resourceGroupName; - - private String organizationName; - - private String projectName; - - private String branchName; - - private String endpointName; - - public EndpointImpl withExistingBranche(String resourceGroupName, String organizationName, String projectName, - String branchName) { - this.resourceGroupName = resourceGroupName; - this.organizationName = organizationName; - this.projectName = projectName; - this.branchName = branchName; - return this; - } - - public Endpoint create() { - this.innerObject = serviceManager.serviceClient() - .getEndpoints() - .createOrUpdate(resourceGroupName, organizationName, projectName, branchName, endpointName, - this.innerModel(), Context.NONE); - return this; - } - - public Endpoint create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getEndpoints() - .createOrUpdate(resourceGroupName, organizationName, projectName, branchName, endpointName, - this.innerModel(), context); - return this; - } - - EndpointImpl(String name, com.azure.resourcemanager.neonpostgres.NeonPostgresManager serviceManager) { - this.innerObject = new EndpointInner(); - this.serviceManager = serviceManager; - this.endpointName = name; - } - - public EndpointImpl update() { - return this; - } - - public Endpoint apply() { - this.innerObject = serviceManager.serviceClient() - .getEndpoints() - .update(resourceGroupName, organizationName, projectName, branchName, endpointName, this.innerModel(), - Context.NONE); - return this; - } - - public Endpoint apply(Context context) { - this.innerObject = serviceManager.serviceClient() - .getEndpoints() - .update(resourceGroupName, organizationName, projectName, branchName, endpointName, this.innerModel(), - context); - return this; - } - - EndpointImpl(EndpointInner innerObject, com.azure.resourcemanager.neonpostgres.NeonPostgresManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.organizationName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "organizations"); - this.projectName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "projects"); - this.branchName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "branches"); - this.endpointName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "endpoints"); - } - - public Endpoint refresh() { - this.innerObject = serviceManager.serviceClient() - .getEndpoints() - .getWithResponse(resourceGroupName, organizationName, projectName, branchName, endpointName, Context.NONE) - .getValue(); - return this; - } - - public Endpoint refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getEndpoints() - .getWithResponse(resourceGroupName, organizationName, projectName, branchName, endpointName, context) - .getValue(); - return this; - } - - public EndpointImpl withProperties(EndpointProperties properties) { - this.innerModel().withProperties(properties); - return this; - } } diff --git a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/implementation/EndpointsClientImpl.java b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/implementation/EndpointsClientImpl.java index a2ec38c9de4d..32090fffbf11 100644 --- a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/implementation/EndpointsClientImpl.java +++ b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/implementation/EndpointsClientImpl.java @@ -4,17 +4,13 @@ package com.azure.resourcemanager.neonpostgres.implementation; -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; import com.azure.core.annotation.ExpectedResponses; import com.azure.core.annotation.Get; import com.azure.core.annotation.HeaderParam; import com.azure.core.annotation.Headers; import com.azure.core.annotation.Host; import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.Patch; import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Put; import com.azure.core.annotation.QueryParam; import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceInterface; @@ -27,16 +23,11 @@ import com.azure.core.http.rest.Response; import com.azure.core.http.rest.RestProxy; import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.neonpostgres.fluent.EndpointsClient; import com.azure.resourcemanager.neonpostgres.fluent.models.EndpointInner; import com.azure.resourcemanager.neonpostgres.implementation.models.EndpointListResult; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; /** @@ -71,50 +62,6 @@ public final class EndpointsClientImpl implements EndpointsClient { @Host("{endpoint}") @ServiceInterface(name = "NeonPostgresManageme") public interface EndpointsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/endpoints/{endpointName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("organizationName") String organizationName, @PathParam("projectName") String projectName, - @PathParam("branchName") String branchName, @PathParam("endpointName") String endpointName, - @HeaderParam("Accept") String accept, Context context); - - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/endpoints/{endpointName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("organizationName") String organizationName, @PathParam("projectName") String projectName, - @PathParam("branchName") String branchName, @PathParam("endpointName") String endpointName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") EndpointInner resource, Context context); - - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/endpoints/{endpointName}") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("organizationName") String organizationName, @PathParam("projectName") String projectName, - @PathParam("branchName") String branchName, @PathParam("endpointName") String endpointName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") EndpointInner properties, Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/endpoints/{endpointName}") - @ExpectedResponses({ 200, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("organizationName") String organizationName, @PathParam("projectName") String projectName, - @PathParam("branchName") String branchName, @PathParam("endpointName") String endpointName, - @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/endpoints") @ExpectedResponses({ 200 }) @@ -133,915 +80,6 @@ Mono> listNext(@PathParam(value = "nextLink", encod @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } - /** - * Get a Endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param endpointName The name of the Endpoint. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Endpoint along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String organizationName, - String projectName, String branchName, String endpointName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (organizationName == null) { - return Mono - .error(new IllegalArgumentException("Parameter organizationName is required and cannot be null.")); - } - if (projectName == null) { - return Mono.error(new IllegalArgumentException("Parameter projectName is required and cannot be null.")); - } - if (branchName == null) { - return Mono.error(new IllegalArgumentException("Parameter branchName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName 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, organizationName, projectName, branchName, - endpointName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get a Endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param endpointName The name of the Endpoint. - * @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 Endpoint along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String organizationName, - String projectName, String branchName, String endpointName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (organizationName == null) { - return Mono - .error(new IllegalArgumentException("Parameter organizationName is required and cannot be null.")); - } - if (projectName == null) { - return Mono.error(new IllegalArgumentException("Parameter projectName is required and cannot be null.")); - } - if (branchName == null) { - return Mono.error(new IllegalArgumentException("Parameter branchName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName 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, organizationName, projectName, branchName, endpointName, accept, context); - } - - /** - * Get a Endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param endpointName The name of the Endpoint. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Endpoint on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String organizationName, String projectName, - String branchName, String endpointName) { - return getWithResponseAsync(resourceGroupName, organizationName, projectName, branchName, endpointName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get a Endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param endpointName The name of the Endpoint. - * @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 Endpoint along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String organizationName, - String projectName, String branchName, String endpointName, Context context) { - return getWithResponseAsync(resourceGroupName, organizationName, projectName, branchName, endpointName, context) - .block(); - } - - /** - * Get a Endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param endpointName The name of the Endpoint. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Endpoint. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public EndpointInner get(String resourceGroupName, String organizationName, String projectName, String branchName, - String endpointName) { - return getWithResponse(resourceGroupName, organizationName, projectName, branchName, endpointName, Context.NONE) - .getValue(); - } - - /** - * Create a Endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param endpointName The name of the Endpoint. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 Neon compute endpoint resource type along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String organizationName, String projectName, String branchName, String endpointName, EndpointInner resource) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (organizationName == null) { - return Mono - .error(new IllegalArgumentException("Parameter organizationName is required and cannot be null.")); - } - if (projectName == null) { - return Mono.error(new IllegalArgumentException("Parameter projectName is required and cannot be null.")); - } - if (branchName == null) { - return Mono.error(new IllegalArgumentException("Parameter branchName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - if (resource == null) { - return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); - } else { - resource.validate(); - } - final String contentType = "application/json"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, organizationName, projectName, branchName, - endpointName, contentType, accept, resource, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create a Endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param endpointName The name of the Endpoint. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Neon compute endpoint resource type along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String organizationName, String projectName, String branchName, String endpointName, EndpointInner resource, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (organizationName == null) { - return Mono - .error(new IllegalArgumentException("Parameter organizationName is required and cannot be null.")); - } - if (projectName == null) { - return Mono.error(new IllegalArgumentException("Parameter projectName is required and cannot be null.")); - } - if (branchName == null) { - return Mono.error(new IllegalArgumentException("Parameter branchName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - if (resource == null) { - return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); - } else { - resource.validate(); - } - final String contentType = "application/json"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, organizationName, projectName, branchName, endpointName, - contentType, accept, resource, context); - } - - /** - * Create a Endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param endpointName The name of the Endpoint. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the Neon compute endpoint resource type. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, EndpointInner> beginCreateOrUpdateAsync(String resourceGroupName, - String organizationName, String projectName, String branchName, String endpointName, EndpointInner resource) { - Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, organizationName, - projectName, branchName, endpointName, resource); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - EndpointInner.class, EndpointInner.class, this.client.getContext()); - } - - /** - * Create a Endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param endpointName The name of the Endpoint. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the Neon compute endpoint resource type. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, EndpointInner> beginCreateOrUpdateAsync(String resourceGroupName, - String organizationName, String projectName, String branchName, String endpointName, EndpointInner resource, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, organizationName, - projectName, branchName, endpointName, resource, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - EndpointInner.class, EndpointInner.class, context); - } - - /** - * Create a Endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param endpointName The name of the Endpoint. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the Neon compute endpoint resource type. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, EndpointInner> beginCreateOrUpdate(String resourceGroupName, - String organizationName, String projectName, String branchName, String endpointName, EndpointInner resource) { - return this - .beginCreateOrUpdateAsync(resourceGroupName, organizationName, projectName, branchName, endpointName, - resource) - .getSyncPoller(); - } - - /** - * Create a Endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param endpointName The name of the Endpoint. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the Neon compute endpoint resource type. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, EndpointInner> beginCreateOrUpdate(String resourceGroupName, - String organizationName, String projectName, String branchName, String endpointName, EndpointInner resource, - Context context) { - return this - .beginCreateOrUpdateAsync(resourceGroupName, organizationName, projectName, branchName, endpointName, - resource, context) - .getSyncPoller(); - } - - /** - * Create a Endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param endpointName The name of the Endpoint. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 Neon compute endpoint resource type on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String organizationName, - String projectName, String branchName, String endpointName, EndpointInner resource) { - return beginCreateOrUpdateAsync(resourceGroupName, organizationName, projectName, branchName, endpointName, - resource).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create a Endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param endpointName The name of the Endpoint. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Neon compute endpoint resource type on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String organizationName, - String projectName, String branchName, String endpointName, EndpointInner resource, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, organizationName, projectName, branchName, endpointName, - resource, context).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create a Endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param endpointName The name of the Endpoint. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 Neon compute endpoint resource type. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public EndpointInner createOrUpdate(String resourceGroupName, String organizationName, String projectName, - String branchName, String endpointName, EndpointInner resource) { - return createOrUpdateAsync(resourceGroupName, organizationName, projectName, branchName, endpointName, resource) - .block(); - } - - /** - * Create a Endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param endpointName The name of the Endpoint. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Neon compute endpoint resource type. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public EndpointInner createOrUpdate(String resourceGroupName, String organizationName, String projectName, - String branchName, String endpointName, EndpointInner resource, Context context) { - return createOrUpdateAsync(resourceGroupName, organizationName, projectName, branchName, endpointName, resource, - context).block(); - } - - /** - * Update a Endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param endpointName The name of the Endpoint. - * @param properties The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 Neon compute endpoint resource type along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String organizationName, - String projectName, String branchName, String endpointName, EndpointInner properties) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (organizationName == null) { - return Mono - .error(new IllegalArgumentException("Parameter organizationName is required and cannot be null.")); - } - if (projectName == null) { - return Mono.error(new IllegalArgumentException("Parameter projectName is required and cannot be null.")); - } - if (branchName == null) { - return Mono.error(new IllegalArgumentException("Parameter branchName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - if (properties == null) { - return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); - } else { - properties.validate(); - } - final String contentType = "application/json"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, organizationName, projectName, branchName, - endpointName, contentType, accept, properties, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Update a Endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param endpointName The name of the Endpoint. - * @param properties The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Neon compute endpoint resource type along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String organizationName, - String projectName, String branchName, String endpointName, EndpointInner properties, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (organizationName == null) { - return Mono - .error(new IllegalArgumentException("Parameter organizationName is required and cannot be null.")); - } - if (projectName == null) { - return Mono.error(new IllegalArgumentException("Parameter projectName is required and cannot be null.")); - } - if (branchName == null) { - return Mono.error(new IllegalArgumentException("Parameter branchName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - if (properties == null) { - return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); - } else { - properties.validate(); - } - final String contentType = "application/json"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, organizationName, projectName, branchName, endpointName, contentType, accept, properties, - context); - } - - /** - * Update a Endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param endpointName The name of the Endpoint. - * @param properties The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the Neon compute endpoint resource type. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, EndpointInner> beginUpdateAsync(String resourceGroupName, - String organizationName, String projectName, String branchName, String endpointName, EndpointInner properties) { - Mono>> mono = updateWithResponseAsync(resourceGroupName, organizationName, - projectName, branchName, endpointName, properties); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - EndpointInner.class, EndpointInner.class, this.client.getContext()); - } - - /** - * Update a Endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param endpointName The name of the Endpoint. - * @param properties The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the Neon compute endpoint resource type. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, EndpointInner> beginUpdateAsync(String resourceGroupName, - String organizationName, String projectName, String branchName, String endpointName, EndpointInner properties, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = updateWithResponseAsync(resourceGroupName, organizationName, - projectName, branchName, endpointName, properties, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - EndpointInner.class, EndpointInner.class, context); - } - - /** - * Update a Endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param endpointName The name of the Endpoint. - * @param properties The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the Neon compute endpoint resource type. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, EndpointInner> beginUpdate(String resourceGroupName, - String organizationName, String projectName, String branchName, String endpointName, EndpointInner properties) { - return this - .beginUpdateAsync(resourceGroupName, organizationName, projectName, branchName, endpointName, properties) - .getSyncPoller(); - } - - /** - * Update a Endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param endpointName The name of the Endpoint. - * @param properties The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the Neon compute endpoint resource type. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, EndpointInner> beginUpdate(String resourceGroupName, - String organizationName, String projectName, String branchName, String endpointName, EndpointInner properties, - Context context) { - return this - .beginUpdateAsync(resourceGroupName, organizationName, projectName, branchName, endpointName, properties, - context) - .getSyncPoller(); - } - - /** - * Update a Endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param endpointName The name of the Endpoint. - * @param properties The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 Neon compute endpoint resource type on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String organizationName, String projectName, - String branchName, String endpointName, EndpointInner properties) { - return beginUpdateAsync(resourceGroupName, organizationName, projectName, branchName, endpointName, properties) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Update a Endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param endpointName The name of the Endpoint. - * @param properties The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Neon compute endpoint resource type on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String organizationName, String projectName, - String branchName, String endpointName, EndpointInner properties, Context context) { - return beginUpdateAsync(resourceGroupName, organizationName, projectName, branchName, endpointName, properties, - context).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Update a Endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param endpointName The name of the Endpoint. - * @param properties The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 Neon compute endpoint resource type. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public EndpointInner update(String resourceGroupName, String organizationName, String projectName, - String branchName, String endpointName, EndpointInner properties) { - return updateAsync(resourceGroupName, organizationName, projectName, branchName, endpointName, properties) - .block(); - } - - /** - * Update a Endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param endpointName The name of the Endpoint. - * @param properties The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Neon compute endpoint resource type. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public EndpointInner update(String resourceGroupName, String organizationName, String projectName, - String branchName, String endpointName, EndpointInner properties, Context context) { - return updateAsync(resourceGroupName, organizationName, projectName, branchName, endpointName, properties, - context).block(); - } - - /** - * Delete a Endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param endpointName The name of the Endpoint. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String organizationName, - String projectName, String branchName, String endpointName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (organizationName == null) { - return Mono - .error(new IllegalArgumentException("Parameter organizationName is required and cannot be null.")); - } - if (projectName == null) { - return Mono.error(new IllegalArgumentException("Parameter projectName is required and cannot be null.")); - } - if (branchName == null) { - return Mono.error(new IllegalArgumentException("Parameter branchName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName 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, organizationName, projectName, branchName, - endpointName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete a Endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param endpointName The name of the Endpoint. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String organizationName, - String projectName, String branchName, String endpointName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (organizationName == null) { - return Mono - .error(new IllegalArgumentException("Parameter organizationName is required and cannot be null.")); - } - if (projectName == null) { - return Mono.error(new IllegalArgumentException("Parameter projectName is required and cannot be null.")); - } - if (branchName == null) { - return Mono.error(new IllegalArgumentException("Parameter branchName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName 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, organizationName, projectName, branchName, endpointName, accept, context); - } - - /** - * Delete a Endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param endpointName The name of the Endpoint. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String organizationName, String projectName, - String branchName, String endpointName) { - return deleteWithResponseAsync(resourceGroupName, organizationName, projectName, branchName, endpointName) - .flatMap(ignored -> Mono.empty()); - } - - /** - * Delete a Endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param endpointName The name of the Endpoint. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse(String resourceGroupName, String organizationName, String projectName, - String branchName, String endpointName, Context context) { - return deleteWithResponseAsync(resourceGroupName, organizationName, projectName, branchName, endpointName, - context).block(); - } - - /** - * Delete a Endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param endpointName The name of the Endpoint. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String organizationName, String projectName, String branchName, - String endpointName) { - deleteWithResponse(resourceGroupName, organizationName, projectName, branchName, endpointName, Context.NONE); - } - /** * List Endpoint resources by Branch. * diff --git a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/implementation/EndpointsImpl.java b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/implementation/EndpointsImpl.java index e18046ee3260..a79d9dfe7aa6 100644 --- a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/implementation/EndpointsImpl.java +++ b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/implementation/EndpointsImpl.java @@ -5,8 +5,6 @@ package com.azure.resourcemanager.neonpostgres.implementation; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.neonpostgres.fluent.EndpointsClient; @@ -27,40 +25,6 @@ public EndpointsImpl(EndpointsClient innerClient, this.serviceManager = serviceManager; } - public Response getWithResponse(String resourceGroupName, String organizationName, String projectName, - String branchName, String endpointName, Context context) { - Response inner = this.serviceClient() - .getWithResponse(resourceGroupName, organizationName, projectName, branchName, endpointName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new EndpointImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public Endpoint get(String resourceGroupName, String organizationName, String projectName, String branchName, - String endpointName) { - EndpointInner inner - = this.serviceClient().get(resourceGroupName, organizationName, projectName, branchName, endpointName); - if (inner != null) { - return new EndpointImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response deleteWithResponse(String resourceGroupName, String organizationName, String projectName, - String branchName, String endpointName, Context context) { - return this.serviceClient() - .deleteWithResponse(resourceGroupName, organizationName, projectName, branchName, endpointName, context); - } - - public void delete(String resourceGroupName, String organizationName, String projectName, String branchName, - String endpointName) { - this.serviceClient().delete(resourceGroupName, organizationName, projectName, branchName, endpointName); - } - public PagedIterable list(String resourceGroupName, String organizationName, String projectName, String branchName) { PagedIterable inner @@ -75,127 +39,6 @@ public PagedIterable list(String resourceGroupName, String organizatio return ResourceManagerUtils.mapPage(inner, inner1 -> new EndpointImpl(inner1, this.manager())); } - public Endpoint getById(String id) { - 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))); - } - String organizationName = ResourceManagerUtils.getValueFromIdByName(id, "organizations"); - if (organizationName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'organizations'.", id))); - } - String projectName = ResourceManagerUtils.getValueFromIdByName(id, "projects"); - if (projectName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'projects'.", id))); - } - String branchName = ResourceManagerUtils.getValueFromIdByName(id, "branches"); - if (branchName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'branches'.", id))); - } - String endpointName = ResourceManagerUtils.getValueFromIdByName(id, "endpoints"); - if (endpointName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'endpoints'.", id))); - } - return this - .getWithResponse(resourceGroupName, organizationName, projectName, branchName, endpointName, Context.NONE) - .getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - 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))); - } - String organizationName = ResourceManagerUtils.getValueFromIdByName(id, "organizations"); - if (organizationName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'organizations'.", id))); - } - String projectName = ResourceManagerUtils.getValueFromIdByName(id, "projects"); - if (projectName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'projects'.", id))); - } - String branchName = ResourceManagerUtils.getValueFromIdByName(id, "branches"); - if (branchName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'branches'.", id))); - } - String endpointName = ResourceManagerUtils.getValueFromIdByName(id, "endpoints"); - if (endpointName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'endpoints'.", id))); - } - return this.getWithResponse(resourceGroupName, organizationName, projectName, branchName, endpointName, - context); - } - - public void deleteById(String id) { - 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))); - } - String organizationName = ResourceManagerUtils.getValueFromIdByName(id, "organizations"); - if (organizationName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'organizations'.", id))); - } - String projectName = ResourceManagerUtils.getValueFromIdByName(id, "projects"); - if (projectName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'projects'.", id))); - } - String branchName = ResourceManagerUtils.getValueFromIdByName(id, "branches"); - if (branchName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'branches'.", id))); - } - String endpointName = ResourceManagerUtils.getValueFromIdByName(id, "endpoints"); - if (endpointName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'endpoints'.", id))); - } - this.deleteWithResponse(resourceGroupName, organizationName, projectName, branchName, endpointName, - Context.NONE); - } - - public Response deleteByIdWithResponse(String id, Context context) { - 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))); - } - String organizationName = ResourceManagerUtils.getValueFromIdByName(id, "organizations"); - if (organizationName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'organizations'.", id))); - } - String projectName = ResourceManagerUtils.getValueFromIdByName(id, "projects"); - if (projectName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'projects'.", id))); - } - String branchName = ResourceManagerUtils.getValueFromIdByName(id, "branches"); - if (branchName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'branches'.", id))); - } - String endpointName = ResourceManagerUtils.getValueFromIdByName(id, "endpoints"); - if (endpointName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'endpoints'.", id))); - } - return this.deleteWithResponse(resourceGroupName, organizationName, projectName, branchName, endpointName, - context); - } - private EndpointsClient serviceClient() { return this.innerClient; } @@ -203,8 +46,4 @@ private EndpointsClient serviceClient() { private com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager() { return this.serviceManager; } - - public EndpointImpl define(String name) { - return new EndpointImpl(name, this.manager()); - } } diff --git a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/implementation/NeonDatabaseImpl.java b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/implementation/NeonDatabaseImpl.java index 91ce011731a6..631e77d7e98e 100644 --- a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/implementation/NeonDatabaseImpl.java +++ b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/implementation/NeonDatabaseImpl.java @@ -5,16 +5,21 @@ package com.azure.resourcemanager.neonpostgres.implementation; import com.azure.core.management.SystemData; -import com.azure.core.util.Context; import com.azure.resourcemanager.neonpostgres.fluent.models.NeonDatabaseInner; import com.azure.resourcemanager.neonpostgres.models.NeonDatabase; import com.azure.resourcemanager.neonpostgres.models.NeonDatabaseProperties; -public final class NeonDatabaseImpl implements NeonDatabase, NeonDatabase.Definition, NeonDatabase.Update { +public final class NeonDatabaseImpl implements NeonDatabase { private NeonDatabaseInner innerObject; private final com.azure.resourcemanager.neonpostgres.NeonPostgresManager serviceManager; + NeonDatabaseImpl(NeonDatabaseInner innerObject, + com.azure.resourcemanager.neonpostgres.NeonPostgresManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + public String id() { return this.innerModel().id(); } @@ -35,10 +40,6 @@ public SystemData systemData() { return this.innerModel().systemData(); } - public String resourceGroupName() { - return resourceGroupName; - } - public NeonDatabaseInner innerModel() { return this.innerObject; } @@ -46,98 +47,4 @@ public NeonDatabaseInner innerModel() { private com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager() { return this.serviceManager; } - - private String resourceGroupName; - - private String organizationName; - - private String projectName; - - private String branchName; - - private String neonDatabaseName; - - public NeonDatabaseImpl withExistingBranche(String resourceGroupName, String organizationName, String projectName, - String branchName) { - this.resourceGroupName = resourceGroupName; - this.organizationName = organizationName; - this.projectName = projectName; - this.branchName = branchName; - return this; - } - - public NeonDatabase create() { - this.innerObject = serviceManager.serviceClient() - .getNeonDatabases() - .createOrUpdate(resourceGroupName, organizationName, projectName, branchName, neonDatabaseName, - this.innerModel(), Context.NONE); - return this; - } - - public NeonDatabase create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getNeonDatabases() - .createOrUpdate(resourceGroupName, organizationName, projectName, branchName, neonDatabaseName, - this.innerModel(), context); - return this; - } - - NeonDatabaseImpl(String name, com.azure.resourcemanager.neonpostgres.NeonPostgresManager serviceManager) { - this.innerObject = new NeonDatabaseInner(); - this.serviceManager = serviceManager; - this.neonDatabaseName = name; - } - - public NeonDatabaseImpl update() { - return this; - } - - public NeonDatabase apply() { - this.innerObject = serviceManager.serviceClient() - .getNeonDatabases() - .update(resourceGroupName, organizationName, projectName, branchName, neonDatabaseName, this.innerModel(), - Context.NONE); - return this; - } - - public NeonDatabase apply(Context context) { - this.innerObject = serviceManager.serviceClient() - .getNeonDatabases() - .update(resourceGroupName, organizationName, projectName, branchName, neonDatabaseName, this.innerModel(), - context); - return this; - } - - NeonDatabaseImpl(NeonDatabaseInner innerObject, - com.azure.resourcemanager.neonpostgres.NeonPostgresManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.organizationName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "organizations"); - this.projectName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "projects"); - this.branchName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "branches"); - this.neonDatabaseName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "neonDatabases"); - } - - public NeonDatabase refresh() { - this.innerObject = serviceManager.serviceClient() - .getNeonDatabases() - .getWithResponse(resourceGroupName, organizationName, projectName, branchName, neonDatabaseName, - Context.NONE) - .getValue(); - return this; - } - - public NeonDatabase refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getNeonDatabases() - .getWithResponse(resourceGroupName, organizationName, projectName, branchName, neonDatabaseName, context) - .getValue(); - return this; - } - - public NeonDatabaseImpl withProperties(NeonDatabaseProperties properties) { - this.innerModel().withProperties(properties); - return this; - } } diff --git a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/implementation/NeonDatabasesClientImpl.java b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/implementation/NeonDatabasesClientImpl.java index 583ae21c0dab..763b70163988 100644 --- a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/implementation/NeonDatabasesClientImpl.java +++ b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/implementation/NeonDatabasesClientImpl.java @@ -4,17 +4,13 @@ package com.azure.resourcemanager.neonpostgres.implementation; -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; import com.azure.core.annotation.ExpectedResponses; import com.azure.core.annotation.Get; import com.azure.core.annotation.HeaderParam; import com.azure.core.annotation.Headers; import com.azure.core.annotation.Host; import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.Patch; import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Put; import com.azure.core.annotation.QueryParam; import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceInterface; @@ -27,16 +23,11 @@ import com.azure.core.http.rest.Response; import com.azure.core.http.rest.RestProxy; import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.neonpostgres.fluent.NeonDatabasesClient; import com.azure.resourcemanager.neonpostgres.fluent.models.NeonDatabaseInner; import com.azure.resourcemanager.neonpostgres.implementation.models.NeonDatabaseListResult; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; /** @@ -71,50 +62,6 @@ public final class NeonDatabasesClientImpl implements NeonDatabasesClient { @Host("{endpoint}") @ServiceInterface(name = "NeonPostgresManageme") public interface NeonDatabasesService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/neonDatabases/{neonDatabaseName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("organizationName") String organizationName, @PathParam("projectName") String projectName, - @PathParam("branchName") String branchName, @PathParam("neonDatabaseName") String neonDatabaseName, - @HeaderParam("Accept") String accept, Context context); - - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/neonDatabases/{neonDatabaseName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("organizationName") String organizationName, @PathParam("projectName") String projectName, - @PathParam("branchName") String branchName, @PathParam("neonDatabaseName") String neonDatabaseName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") NeonDatabaseInner resource, Context context); - - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/neonDatabases/{neonDatabaseName}") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("organizationName") String organizationName, @PathParam("projectName") String projectName, - @PathParam("branchName") String branchName, @PathParam("neonDatabaseName") String neonDatabaseName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") NeonDatabaseInner properties, Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/neonDatabases/{neonDatabaseName}") - @ExpectedResponses({ 200, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("organizationName") String organizationName, @PathParam("projectName") String projectName, - @PathParam("branchName") String branchName, @PathParam("neonDatabaseName") String neonDatabaseName, - @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/neonDatabases") @ExpectedResponses({ 200 }) @@ -133,925 +80,6 @@ Mono> listNext(@PathParam(value = "nextLink", e @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } - /** - * Get a NeonDatabase. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param neonDatabaseName The name of the NeonDatabase. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 NeonDatabase along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String organizationName, - String projectName, String branchName, String neonDatabaseName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (organizationName == null) { - return Mono - .error(new IllegalArgumentException("Parameter organizationName is required and cannot be null.")); - } - if (projectName == null) { - return Mono.error(new IllegalArgumentException("Parameter projectName is required and cannot be null.")); - } - if (branchName == null) { - return Mono.error(new IllegalArgumentException("Parameter branchName is required and cannot be null.")); - } - if (neonDatabaseName == null) { - return Mono - .error(new IllegalArgumentException("Parameter neonDatabaseName 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, organizationName, projectName, branchName, - neonDatabaseName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get a NeonDatabase. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param neonDatabaseName The name of the NeonDatabase. - * @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 NeonDatabase along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String organizationName, - String projectName, String branchName, String neonDatabaseName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (organizationName == null) { - return Mono - .error(new IllegalArgumentException("Parameter organizationName is required and cannot be null.")); - } - if (projectName == null) { - return Mono.error(new IllegalArgumentException("Parameter projectName is required and cannot be null.")); - } - if (branchName == null) { - return Mono.error(new IllegalArgumentException("Parameter branchName is required and cannot be null.")); - } - if (neonDatabaseName == null) { - return Mono - .error(new IllegalArgumentException("Parameter neonDatabaseName 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, organizationName, projectName, branchName, neonDatabaseName, accept, context); - } - - /** - * Get a NeonDatabase. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param neonDatabaseName The name of the NeonDatabase. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 NeonDatabase on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String organizationName, String projectName, - String branchName, String neonDatabaseName) { - return getWithResponseAsync(resourceGroupName, organizationName, projectName, branchName, neonDatabaseName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get a NeonDatabase. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param neonDatabaseName The name of the NeonDatabase. - * @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 NeonDatabase along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String organizationName, - String projectName, String branchName, String neonDatabaseName, Context context) { - return getWithResponseAsync(resourceGroupName, organizationName, projectName, branchName, neonDatabaseName, - context).block(); - } - - /** - * Get a NeonDatabase. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param neonDatabaseName The name of the NeonDatabase. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 NeonDatabase. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public NeonDatabaseInner get(String resourceGroupName, String organizationName, String projectName, - String branchName, String neonDatabaseName) { - return getWithResponse(resourceGroupName, organizationName, projectName, branchName, neonDatabaseName, - Context.NONE).getValue(); - } - - /** - * Create a NeonDatabase. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param neonDatabaseName The name of the NeonDatabase. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 Neon Database resource type along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String organizationName, String projectName, String branchName, String neonDatabaseName, - NeonDatabaseInner resource) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (organizationName == null) { - return Mono - .error(new IllegalArgumentException("Parameter organizationName is required and cannot be null.")); - } - if (projectName == null) { - return Mono.error(new IllegalArgumentException("Parameter projectName is required and cannot be null.")); - } - if (branchName == null) { - return Mono.error(new IllegalArgumentException("Parameter branchName is required and cannot be null.")); - } - if (neonDatabaseName == null) { - return Mono - .error(new IllegalArgumentException("Parameter neonDatabaseName is required and cannot be null.")); - } - if (resource == null) { - return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); - } else { - resource.validate(); - } - final String contentType = "application/json"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, organizationName, projectName, branchName, - neonDatabaseName, contentType, accept, resource, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create a NeonDatabase. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param neonDatabaseName The name of the NeonDatabase. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Neon Database resource type along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String organizationName, String projectName, String branchName, String neonDatabaseName, - NeonDatabaseInner resource, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (organizationName == null) { - return Mono - .error(new IllegalArgumentException("Parameter organizationName is required and cannot be null.")); - } - if (projectName == null) { - return Mono.error(new IllegalArgumentException("Parameter projectName is required and cannot be null.")); - } - if (branchName == null) { - return Mono.error(new IllegalArgumentException("Parameter branchName is required and cannot be null.")); - } - if (neonDatabaseName == null) { - return Mono - .error(new IllegalArgumentException("Parameter neonDatabaseName is required and cannot be null.")); - } - if (resource == null) { - return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); - } else { - resource.validate(); - } - final String contentType = "application/json"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, organizationName, projectName, branchName, - neonDatabaseName, contentType, accept, resource, context); - } - - /** - * Create a NeonDatabase. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param neonDatabaseName The name of the NeonDatabase. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the Neon Database resource type. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, NeonDatabaseInner> beginCreateOrUpdateAsync( - String resourceGroupName, String organizationName, String projectName, String branchName, - String neonDatabaseName, NeonDatabaseInner resource) { - Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, organizationName, - projectName, branchName, neonDatabaseName, resource); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - NeonDatabaseInner.class, NeonDatabaseInner.class, this.client.getContext()); - } - - /** - * Create a NeonDatabase. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param neonDatabaseName The name of the NeonDatabase. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the Neon Database resource type. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, NeonDatabaseInner> beginCreateOrUpdateAsync( - String resourceGroupName, String organizationName, String projectName, String branchName, - String neonDatabaseName, NeonDatabaseInner resource, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, organizationName, - projectName, branchName, neonDatabaseName, resource, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - NeonDatabaseInner.class, NeonDatabaseInner.class, context); - } - - /** - * Create a NeonDatabase. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param neonDatabaseName The name of the NeonDatabase. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the Neon Database resource type. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, NeonDatabaseInner> beginCreateOrUpdate(String resourceGroupName, - String organizationName, String projectName, String branchName, String neonDatabaseName, - NeonDatabaseInner resource) { - return this - .beginCreateOrUpdateAsync(resourceGroupName, organizationName, projectName, branchName, neonDatabaseName, - resource) - .getSyncPoller(); - } - - /** - * Create a NeonDatabase. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param neonDatabaseName The name of the NeonDatabase. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the Neon Database resource type. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, NeonDatabaseInner> beginCreateOrUpdate(String resourceGroupName, - String organizationName, String projectName, String branchName, String neonDatabaseName, - NeonDatabaseInner resource, Context context) { - return this - .beginCreateOrUpdateAsync(resourceGroupName, organizationName, projectName, branchName, neonDatabaseName, - resource, context) - .getSyncPoller(); - } - - /** - * Create a NeonDatabase. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param neonDatabaseName The name of the NeonDatabase. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 Neon Database resource type on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String organizationName, - String projectName, String branchName, String neonDatabaseName, NeonDatabaseInner resource) { - return beginCreateOrUpdateAsync(resourceGroupName, organizationName, projectName, branchName, neonDatabaseName, - resource).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create a NeonDatabase. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param neonDatabaseName The name of the NeonDatabase. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Neon Database resource type on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String organizationName, - String projectName, String branchName, String neonDatabaseName, NeonDatabaseInner resource, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, organizationName, projectName, branchName, neonDatabaseName, - resource, context).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create a NeonDatabase. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param neonDatabaseName The name of the NeonDatabase. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 Neon Database resource type. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public NeonDatabaseInner createOrUpdate(String resourceGroupName, String organizationName, String projectName, - String branchName, String neonDatabaseName, NeonDatabaseInner resource) { - return createOrUpdateAsync(resourceGroupName, organizationName, projectName, branchName, neonDatabaseName, - resource).block(); - } - - /** - * Create a NeonDatabase. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param neonDatabaseName The name of the NeonDatabase. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Neon Database resource type. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public NeonDatabaseInner createOrUpdate(String resourceGroupName, String organizationName, String projectName, - String branchName, String neonDatabaseName, NeonDatabaseInner resource, Context context) { - return createOrUpdateAsync(resourceGroupName, organizationName, projectName, branchName, neonDatabaseName, - resource, context).block(); - } - - /** - * Update a NeonDatabase. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param neonDatabaseName The name of the NeonDatabase. - * @param properties The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 Neon Database resource type along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String organizationName, - String projectName, String branchName, String neonDatabaseName, NeonDatabaseInner properties) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (organizationName == null) { - return Mono - .error(new IllegalArgumentException("Parameter organizationName is required and cannot be null.")); - } - if (projectName == null) { - return Mono.error(new IllegalArgumentException("Parameter projectName is required and cannot be null.")); - } - if (branchName == null) { - return Mono.error(new IllegalArgumentException("Parameter branchName is required and cannot be null.")); - } - if (neonDatabaseName == null) { - return Mono - .error(new IllegalArgumentException("Parameter neonDatabaseName is required and cannot be null.")); - } - if (properties == null) { - return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); - } else { - properties.validate(); - } - final String contentType = "application/json"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, organizationName, projectName, branchName, - neonDatabaseName, contentType, accept, properties, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Update a NeonDatabase. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param neonDatabaseName The name of the NeonDatabase. - * @param properties The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Neon Database resource type along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String organizationName, - String projectName, String branchName, String neonDatabaseName, NeonDatabaseInner properties, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (organizationName == null) { - return Mono - .error(new IllegalArgumentException("Parameter organizationName is required and cannot be null.")); - } - if (projectName == null) { - return Mono.error(new IllegalArgumentException("Parameter projectName is required and cannot be null.")); - } - if (branchName == null) { - return Mono.error(new IllegalArgumentException("Parameter branchName is required and cannot be null.")); - } - if (neonDatabaseName == null) { - return Mono - .error(new IllegalArgumentException("Parameter neonDatabaseName is required and cannot be null.")); - } - if (properties == null) { - return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); - } else { - properties.validate(); - } - final String contentType = "application/json"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, organizationName, projectName, branchName, neonDatabaseName, contentType, accept, - properties, context); - } - - /** - * Update a NeonDatabase. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param neonDatabaseName The name of the NeonDatabase. - * @param properties The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the Neon Database resource type. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, NeonDatabaseInner> beginUpdateAsync(String resourceGroupName, - String organizationName, String projectName, String branchName, String neonDatabaseName, - NeonDatabaseInner properties) { - Mono>> mono = updateWithResponseAsync(resourceGroupName, organizationName, - projectName, branchName, neonDatabaseName, properties); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - NeonDatabaseInner.class, NeonDatabaseInner.class, this.client.getContext()); - } - - /** - * Update a NeonDatabase. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param neonDatabaseName The name of the NeonDatabase. - * @param properties The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the Neon Database resource type. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, NeonDatabaseInner> beginUpdateAsync(String resourceGroupName, - String organizationName, String projectName, String branchName, String neonDatabaseName, - NeonDatabaseInner properties, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = updateWithResponseAsync(resourceGroupName, organizationName, - projectName, branchName, neonDatabaseName, properties, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - NeonDatabaseInner.class, NeonDatabaseInner.class, context); - } - - /** - * Update a NeonDatabase. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param neonDatabaseName The name of the NeonDatabase. - * @param properties The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the Neon Database resource type. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, NeonDatabaseInner> beginUpdate(String resourceGroupName, - String organizationName, String projectName, String branchName, String neonDatabaseName, - NeonDatabaseInner properties) { - return this - .beginUpdateAsync(resourceGroupName, organizationName, projectName, branchName, neonDatabaseName, - properties) - .getSyncPoller(); - } - - /** - * Update a NeonDatabase. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param neonDatabaseName The name of the NeonDatabase. - * @param properties The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the Neon Database resource type. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, NeonDatabaseInner> beginUpdate(String resourceGroupName, - String organizationName, String projectName, String branchName, String neonDatabaseName, - NeonDatabaseInner properties, Context context) { - return this - .beginUpdateAsync(resourceGroupName, organizationName, projectName, branchName, neonDatabaseName, - properties, context) - .getSyncPoller(); - } - - /** - * Update a NeonDatabase. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param neonDatabaseName The name of the NeonDatabase. - * @param properties The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 Neon Database resource type on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String organizationName, String projectName, - String branchName, String neonDatabaseName, NeonDatabaseInner properties) { - return beginUpdateAsync(resourceGroupName, organizationName, projectName, branchName, neonDatabaseName, - properties).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Update a NeonDatabase. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param neonDatabaseName The name of the NeonDatabase. - * @param properties The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Neon Database resource type on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String organizationName, String projectName, - String branchName, String neonDatabaseName, NeonDatabaseInner properties, Context context) { - return beginUpdateAsync(resourceGroupName, organizationName, projectName, branchName, neonDatabaseName, - properties, context).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Update a NeonDatabase. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param neonDatabaseName The name of the NeonDatabase. - * @param properties The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 Neon Database resource type. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public NeonDatabaseInner update(String resourceGroupName, String organizationName, String projectName, - String branchName, String neonDatabaseName, NeonDatabaseInner properties) { - return updateAsync(resourceGroupName, organizationName, projectName, branchName, neonDatabaseName, properties) - .block(); - } - - /** - * Update a NeonDatabase. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param neonDatabaseName The name of the NeonDatabase. - * @param properties The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Neon Database resource type. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public NeonDatabaseInner update(String resourceGroupName, String organizationName, String projectName, - String branchName, String neonDatabaseName, NeonDatabaseInner properties, Context context) { - return updateAsync(resourceGroupName, organizationName, projectName, branchName, neonDatabaseName, properties, - context).block(); - } - - /** - * Delete a NeonDatabase. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param neonDatabaseName The name of the NeonDatabase. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String organizationName, - String projectName, String branchName, String neonDatabaseName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (organizationName == null) { - return Mono - .error(new IllegalArgumentException("Parameter organizationName is required and cannot be null.")); - } - if (projectName == null) { - return Mono.error(new IllegalArgumentException("Parameter projectName is required and cannot be null.")); - } - if (branchName == null) { - return Mono.error(new IllegalArgumentException("Parameter branchName is required and cannot be null.")); - } - if (neonDatabaseName == null) { - return Mono - .error(new IllegalArgumentException("Parameter neonDatabaseName 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, organizationName, projectName, branchName, - neonDatabaseName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete a NeonDatabase. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param neonDatabaseName The name of the NeonDatabase. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String organizationName, - String projectName, String branchName, String neonDatabaseName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (organizationName == null) { - return Mono - .error(new IllegalArgumentException("Parameter organizationName is required and cannot be null.")); - } - if (projectName == null) { - return Mono.error(new IllegalArgumentException("Parameter projectName is required and cannot be null.")); - } - if (branchName == null) { - return Mono.error(new IllegalArgumentException("Parameter branchName is required and cannot be null.")); - } - if (neonDatabaseName == null) { - return Mono - .error(new IllegalArgumentException("Parameter neonDatabaseName 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, organizationName, projectName, branchName, neonDatabaseName, accept, context); - } - - /** - * Delete a NeonDatabase. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param neonDatabaseName The name of the NeonDatabase. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String organizationName, String projectName, - String branchName, String neonDatabaseName) { - return deleteWithResponseAsync(resourceGroupName, organizationName, projectName, branchName, neonDatabaseName) - .flatMap(ignored -> Mono.empty()); - } - - /** - * Delete a NeonDatabase. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param neonDatabaseName The name of the NeonDatabase. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse(String resourceGroupName, String organizationName, String projectName, - String branchName, String neonDatabaseName, Context context) { - return deleteWithResponseAsync(resourceGroupName, organizationName, projectName, branchName, neonDatabaseName, - context).block(); - } - - /** - * Delete a NeonDatabase. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param neonDatabaseName The name of the NeonDatabase. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String organizationName, String projectName, String branchName, - String neonDatabaseName) { - deleteWithResponse(resourceGroupName, organizationName, projectName, branchName, neonDatabaseName, - Context.NONE); - } - /** * List NeonDatabase resources by Branch. * diff --git a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/implementation/NeonDatabasesImpl.java b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/implementation/NeonDatabasesImpl.java index a9e8df1495a4..344e0cf2d21f 100644 --- a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/implementation/NeonDatabasesImpl.java +++ b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/implementation/NeonDatabasesImpl.java @@ -5,8 +5,6 @@ package com.azure.resourcemanager.neonpostgres.implementation; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.neonpostgres.fluent.NeonDatabasesClient; @@ -27,41 +25,6 @@ public NeonDatabasesImpl(NeonDatabasesClient innerClient, this.serviceManager = serviceManager; } - public Response getWithResponse(String resourceGroupName, String organizationName, String projectName, - String branchName, String neonDatabaseName, Context context) { - Response inner = this.serviceClient() - .getWithResponse(resourceGroupName, organizationName, projectName, branchName, neonDatabaseName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new NeonDatabaseImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public NeonDatabase get(String resourceGroupName, String organizationName, String projectName, String branchName, - String neonDatabaseName) { - NeonDatabaseInner inner - = this.serviceClient().get(resourceGroupName, organizationName, projectName, branchName, neonDatabaseName); - if (inner != null) { - return new NeonDatabaseImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response deleteWithResponse(String resourceGroupName, String organizationName, String projectName, - String branchName, String neonDatabaseName, Context context) { - return this.serviceClient() - .deleteWithResponse(resourceGroupName, organizationName, projectName, branchName, neonDatabaseName, - context); - } - - public void delete(String resourceGroupName, String organizationName, String projectName, String branchName, - String neonDatabaseName) { - this.serviceClient().delete(resourceGroupName, organizationName, projectName, branchName, neonDatabaseName); - } - public PagedIterable list(String resourceGroupName, String organizationName, String projectName, String branchName) { PagedIterable inner @@ -76,128 +39,6 @@ public PagedIterable list(String resourceGroupName, String organiz return ResourceManagerUtils.mapPage(inner, inner1 -> new NeonDatabaseImpl(inner1, this.manager())); } - public NeonDatabase getById(String id) { - 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))); - } - String organizationName = ResourceManagerUtils.getValueFromIdByName(id, "organizations"); - if (organizationName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'organizations'.", id))); - } - String projectName = ResourceManagerUtils.getValueFromIdByName(id, "projects"); - if (projectName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'projects'.", id))); - } - String branchName = ResourceManagerUtils.getValueFromIdByName(id, "branches"); - if (branchName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'branches'.", id))); - } - String neonDatabaseName = ResourceManagerUtils.getValueFromIdByName(id, "neonDatabases"); - if (neonDatabaseName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'neonDatabases'.", id))); - } - return this - .getWithResponse(resourceGroupName, organizationName, projectName, branchName, neonDatabaseName, - Context.NONE) - .getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - 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))); - } - String organizationName = ResourceManagerUtils.getValueFromIdByName(id, "organizations"); - if (organizationName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'organizations'.", id))); - } - String projectName = ResourceManagerUtils.getValueFromIdByName(id, "projects"); - if (projectName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'projects'.", id))); - } - String branchName = ResourceManagerUtils.getValueFromIdByName(id, "branches"); - if (branchName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'branches'.", id))); - } - String neonDatabaseName = ResourceManagerUtils.getValueFromIdByName(id, "neonDatabases"); - if (neonDatabaseName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'neonDatabases'.", id))); - } - return this.getWithResponse(resourceGroupName, organizationName, projectName, branchName, neonDatabaseName, - context); - } - - public void deleteById(String id) { - 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))); - } - String organizationName = ResourceManagerUtils.getValueFromIdByName(id, "organizations"); - if (organizationName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'organizations'.", id))); - } - String projectName = ResourceManagerUtils.getValueFromIdByName(id, "projects"); - if (projectName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'projects'.", id))); - } - String branchName = ResourceManagerUtils.getValueFromIdByName(id, "branches"); - if (branchName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'branches'.", id))); - } - String neonDatabaseName = ResourceManagerUtils.getValueFromIdByName(id, "neonDatabases"); - if (neonDatabaseName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'neonDatabases'.", id))); - } - this.deleteWithResponse(resourceGroupName, organizationName, projectName, branchName, neonDatabaseName, - Context.NONE); - } - - public Response deleteByIdWithResponse(String id, Context context) { - 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))); - } - String organizationName = ResourceManagerUtils.getValueFromIdByName(id, "organizations"); - if (organizationName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'organizations'.", id))); - } - String projectName = ResourceManagerUtils.getValueFromIdByName(id, "projects"); - if (projectName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'projects'.", id))); - } - String branchName = ResourceManagerUtils.getValueFromIdByName(id, "branches"); - if (branchName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'branches'.", id))); - } - String neonDatabaseName = ResourceManagerUtils.getValueFromIdByName(id, "neonDatabases"); - if (neonDatabaseName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'neonDatabases'.", id))); - } - return this.deleteWithResponse(resourceGroupName, organizationName, projectName, branchName, neonDatabaseName, - context); - } - private NeonDatabasesClient serviceClient() { return this.innerClient; } @@ -205,8 +46,4 @@ private NeonDatabasesClient serviceClient() { private com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager() { return this.serviceManager; } - - public NeonDatabaseImpl define(String name) { - return new NeonDatabaseImpl(name, this.manager()); - } } diff --git a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/implementation/NeonRoleImpl.java b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/implementation/NeonRoleImpl.java index 45dbd23134c2..a3f2161782f5 100644 --- a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/implementation/NeonRoleImpl.java +++ b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/implementation/NeonRoleImpl.java @@ -5,16 +5,20 @@ package com.azure.resourcemanager.neonpostgres.implementation; import com.azure.core.management.SystemData; -import com.azure.core.util.Context; import com.azure.resourcemanager.neonpostgres.fluent.models.NeonRoleInner; import com.azure.resourcemanager.neonpostgres.models.NeonRole; import com.azure.resourcemanager.neonpostgres.models.NeonRoleProperties; -public final class NeonRoleImpl implements NeonRole, NeonRole.Definition, NeonRole.Update { +public final class NeonRoleImpl implements NeonRole { private NeonRoleInner innerObject; private final com.azure.resourcemanager.neonpostgres.NeonPostgresManager serviceManager; + NeonRoleImpl(NeonRoleInner innerObject, com.azure.resourcemanager.neonpostgres.NeonPostgresManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + public String id() { return this.innerModel().id(); } @@ -35,10 +39,6 @@ public SystemData systemData() { return this.innerModel().systemData(); } - public String resourceGroupName() { - return resourceGroupName; - } - public NeonRoleInner innerModel() { return this.innerObject; } @@ -46,96 +46,4 @@ public NeonRoleInner innerModel() { private com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager() { return this.serviceManager; } - - private String resourceGroupName; - - private String organizationName; - - private String projectName; - - private String branchName; - - private String neonRoleName; - - public NeonRoleImpl withExistingBranche(String resourceGroupName, String organizationName, String projectName, - String branchName) { - this.resourceGroupName = resourceGroupName; - this.organizationName = organizationName; - this.projectName = projectName; - this.branchName = branchName; - return this; - } - - public NeonRole create() { - this.innerObject = serviceManager.serviceClient() - .getNeonRoles() - .createOrUpdate(resourceGroupName, organizationName, projectName, branchName, neonRoleName, - this.innerModel(), Context.NONE); - return this; - } - - public NeonRole create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getNeonRoles() - .createOrUpdate(resourceGroupName, organizationName, projectName, branchName, neonRoleName, - this.innerModel(), context); - return this; - } - - NeonRoleImpl(String name, com.azure.resourcemanager.neonpostgres.NeonPostgresManager serviceManager) { - this.innerObject = new NeonRoleInner(); - this.serviceManager = serviceManager; - this.neonRoleName = name; - } - - public NeonRoleImpl update() { - return this; - } - - public NeonRole apply() { - this.innerObject = serviceManager.serviceClient() - .getNeonRoles() - .update(resourceGroupName, organizationName, projectName, branchName, neonRoleName, this.innerModel(), - Context.NONE); - return this; - } - - public NeonRole apply(Context context) { - this.innerObject = serviceManager.serviceClient() - .getNeonRoles() - .update(resourceGroupName, organizationName, projectName, branchName, neonRoleName, this.innerModel(), - context); - return this; - } - - NeonRoleImpl(NeonRoleInner innerObject, com.azure.resourcemanager.neonpostgres.NeonPostgresManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.organizationName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "organizations"); - this.projectName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "projects"); - this.branchName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "branches"); - this.neonRoleName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "neonRoles"); - } - - public NeonRole refresh() { - this.innerObject = serviceManager.serviceClient() - .getNeonRoles() - .getWithResponse(resourceGroupName, organizationName, projectName, branchName, neonRoleName, Context.NONE) - .getValue(); - return this; - } - - public NeonRole refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getNeonRoles() - .getWithResponse(resourceGroupName, organizationName, projectName, branchName, neonRoleName, context) - .getValue(); - return this; - } - - public NeonRoleImpl withProperties(NeonRoleProperties properties) { - this.innerModel().withProperties(properties); - return this; - } } diff --git a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/implementation/NeonRolesClientImpl.java b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/implementation/NeonRolesClientImpl.java index 64c08c86c934..7ad500db3ba3 100644 --- a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/implementation/NeonRolesClientImpl.java +++ b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/implementation/NeonRolesClientImpl.java @@ -4,17 +4,13 @@ package com.azure.resourcemanager.neonpostgres.implementation; -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; import com.azure.core.annotation.ExpectedResponses; import com.azure.core.annotation.Get; import com.azure.core.annotation.HeaderParam; import com.azure.core.annotation.Headers; import com.azure.core.annotation.Host; import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.Patch; import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Put; import com.azure.core.annotation.QueryParam; import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceInterface; @@ -27,16 +23,11 @@ import com.azure.core.http.rest.Response; import com.azure.core.http.rest.RestProxy; import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.neonpostgres.fluent.NeonRolesClient; import com.azure.resourcemanager.neonpostgres.fluent.models.NeonRoleInner; import com.azure.resourcemanager.neonpostgres.implementation.models.NeonRoleListResult; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; /** @@ -71,50 +62,6 @@ public final class NeonRolesClientImpl implements NeonRolesClient { @Host("{endpoint}") @ServiceInterface(name = "NeonPostgresManageme") public interface NeonRolesService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/neonRoles/{neonRoleName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("organizationName") String organizationName, @PathParam("projectName") String projectName, - @PathParam("branchName") String branchName, @PathParam("neonRoleName") String neonRoleName, - @HeaderParam("Accept") String accept, Context context); - - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/neonRoles/{neonRoleName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("organizationName") String organizationName, @PathParam("projectName") String projectName, - @PathParam("branchName") String branchName, @PathParam("neonRoleName") String neonRoleName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") NeonRoleInner resource, Context context); - - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/neonRoles/{neonRoleName}") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("organizationName") String organizationName, @PathParam("projectName") String projectName, - @PathParam("branchName") String branchName, @PathParam("neonRoleName") String neonRoleName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") NeonRoleInner properties, Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/neonRoles/{neonRoleName}") - @ExpectedResponses({ 200, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("organizationName") String organizationName, @PathParam("projectName") String projectName, - @PathParam("branchName") String branchName, @PathParam("neonRoleName") String neonRoleName, - @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/neonRoles") @ExpectedResponses({ 200 }) @@ -133,911 +80,6 @@ Mono> listNext(@PathParam(value = "nextLink", encod @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } - /** - * Get a NeonRole. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param neonRoleName The name of the NeonRole. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 NeonRole along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String organizationName, - String projectName, String branchName, String neonRoleName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (organizationName == null) { - return Mono - .error(new IllegalArgumentException("Parameter organizationName is required and cannot be null.")); - } - if (projectName == null) { - return Mono.error(new IllegalArgumentException("Parameter projectName is required and cannot be null.")); - } - if (branchName == null) { - return Mono.error(new IllegalArgumentException("Parameter branchName is required and cannot be null.")); - } - if (neonRoleName == null) { - return Mono.error(new IllegalArgumentException("Parameter neonRoleName 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, organizationName, projectName, branchName, - neonRoleName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get a NeonRole. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param neonRoleName The name of the NeonRole. - * @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 NeonRole along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String organizationName, - String projectName, String branchName, String neonRoleName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (organizationName == null) { - return Mono - .error(new IllegalArgumentException("Parameter organizationName is required and cannot be null.")); - } - if (projectName == null) { - return Mono.error(new IllegalArgumentException("Parameter projectName is required and cannot be null.")); - } - if (branchName == null) { - return Mono.error(new IllegalArgumentException("Parameter branchName is required and cannot be null.")); - } - if (neonRoleName == null) { - return Mono.error(new IllegalArgumentException("Parameter neonRoleName 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, organizationName, projectName, branchName, neonRoleName, accept, context); - } - - /** - * Get a NeonRole. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param neonRoleName The name of the NeonRole. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 NeonRole on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String organizationName, String projectName, - String branchName, String neonRoleName) { - return getWithResponseAsync(resourceGroupName, organizationName, projectName, branchName, neonRoleName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get a NeonRole. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param neonRoleName The name of the NeonRole. - * @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 NeonRole along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String organizationName, - String projectName, String branchName, String neonRoleName, Context context) { - return getWithResponseAsync(resourceGroupName, organizationName, projectName, branchName, neonRoleName, context) - .block(); - } - - /** - * Get a NeonRole. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param neonRoleName The name of the NeonRole. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 NeonRole. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public NeonRoleInner get(String resourceGroupName, String organizationName, String projectName, String branchName, - String neonRoleName) { - return getWithResponse(resourceGroupName, organizationName, projectName, branchName, neonRoleName, Context.NONE) - .getValue(); - } - - /** - * Create a NeonRole. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param neonRoleName The name of the NeonRole. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 Neon Role resource type along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String organizationName, String projectName, String branchName, String neonRoleName, NeonRoleInner resource) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (organizationName == null) { - return Mono - .error(new IllegalArgumentException("Parameter organizationName is required and cannot be null.")); - } - if (projectName == null) { - return Mono.error(new IllegalArgumentException("Parameter projectName is required and cannot be null.")); - } - if (branchName == null) { - return Mono.error(new IllegalArgumentException("Parameter branchName is required and cannot be null.")); - } - if (neonRoleName == null) { - return Mono.error(new IllegalArgumentException("Parameter neonRoleName is required and cannot be null.")); - } - if (resource == null) { - return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); - } else { - resource.validate(); - } - final String contentType = "application/json"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, organizationName, projectName, branchName, - neonRoleName, contentType, accept, resource, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create a NeonRole. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param neonRoleName The name of the NeonRole. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Neon Role resource type along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String organizationName, String projectName, String branchName, String neonRoleName, NeonRoleInner resource, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (organizationName == null) { - return Mono - .error(new IllegalArgumentException("Parameter organizationName is required and cannot be null.")); - } - if (projectName == null) { - return Mono.error(new IllegalArgumentException("Parameter projectName is required and cannot be null.")); - } - if (branchName == null) { - return Mono.error(new IllegalArgumentException("Parameter branchName is required and cannot be null.")); - } - if (neonRoleName == null) { - return Mono.error(new IllegalArgumentException("Parameter neonRoleName is required and cannot be null.")); - } - if (resource == null) { - return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); - } else { - resource.validate(); - } - final String contentType = "application/json"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, organizationName, projectName, branchName, neonRoleName, - contentType, accept, resource, context); - } - - /** - * Create a NeonRole. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param neonRoleName The name of the NeonRole. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the Neon Role resource type. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, NeonRoleInner> beginCreateOrUpdateAsync(String resourceGroupName, - String organizationName, String projectName, String branchName, String neonRoleName, NeonRoleInner resource) { - Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, organizationName, - projectName, branchName, neonRoleName, resource); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - NeonRoleInner.class, NeonRoleInner.class, this.client.getContext()); - } - - /** - * Create a NeonRole. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param neonRoleName The name of the NeonRole. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the Neon Role resource type. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, NeonRoleInner> beginCreateOrUpdateAsync(String resourceGroupName, - String organizationName, String projectName, String branchName, String neonRoleName, NeonRoleInner resource, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, organizationName, - projectName, branchName, neonRoleName, resource, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - NeonRoleInner.class, NeonRoleInner.class, context); - } - - /** - * Create a NeonRole. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param neonRoleName The name of the NeonRole. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the Neon Role resource type. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, NeonRoleInner> beginCreateOrUpdate(String resourceGroupName, - String organizationName, String projectName, String branchName, String neonRoleName, NeonRoleInner resource) { - return this - .beginCreateOrUpdateAsync(resourceGroupName, organizationName, projectName, branchName, neonRoleName, - resource) - .getSyncPoller(); - } - - /** - * Create a NeonRole. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param neonRoleName The name of the NeonRole. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the Neon Role resource type. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, NeonRoleInner> beginCreateOrUpdate(String resourceGroupName, - String organizationName, String projectName, String branchName, String neonRoleName, NeonRoleInner resource, - Context context) { - return this - .beginCreateOrUpdateAsync(resourceGroupName, organizationName, projectName, branchName, neonRoleName, - resource, context) - .getSyncPoller(); - } - - /** - * Create a NeonRole. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param neonRoleName The name of the NeonRole. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 Neon Role resource type on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String organizationName, - String projectName, String branchName, String neonRoleName, NeonRoleInner resource) { - return beginCreateOrUpdateAsync(resourceGroupName, organizationName, projectName, branchName, neonRoleName, - resource).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create a NeonRole. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param neonRoleName The name of the NeonRole. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Neon Role resource type on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String organizationName, - String projectName, String branchName, String neonRoleName, NeonRoleInner resource, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, organizationName, projectName, branchName, neonRoleName, - resource, context).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create a NeonRole. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param neonRoleName The name of the NeonRole. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 Neon Role resource type. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public NeonRoleInner createOrUpdate(String resourceGroupName, String organizationName, String projectName, - String branchName, String neonRoleName, NeonRoleInner resource) { - return createOrUpdateAsync(resourceGroupName, organizationName, projectName, branchName, neonRoleName, resource) - .block(); - } - - /** - * Create a NeonRole. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param neonRoleName The name of the NeonRole. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Neon Role resource type. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public NeonRoleInner createOrUpdate(String resourceGroupName, String organizationName, String projectName, - String branchName, String neonRoleName, NeonRoleInner resource, Context context) { - return createOrUpdateAsync(resourceGroupName, organizationName, projectName, branchName, neonRoleName, resource, - context).block(); - } - - /** - * Update a NeonRole. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param neonRoleName The name of the NeonRole. - * @param properties The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 Neon Role resource type along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String organizationName, - String projectName, String branchName, String neonRoleName, NeonRoleInner properties) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (organizationName == null) { - return Mono - .error(new IllegalArgumentException("Parameter organizationName is required and cannot be null.")); - } - if (projectName == null) { - return Mono.error(new IllegalArgumentException("Parameter projectName is required and cannot be null.")); - } - if (branchName == null) { - return Mono.error(new IllegalArgumentException("Parameter branchName is required and cannot be null.")); - } - if (neonRoleName == null) { - return Mono.error(new IllegalArgumentException("Parameter neonRoleName is required and cannot be null.")); - } - if (properties == null) { - return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); - } else { - properties.validate(); - } - final String contentType = "application/json"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, organizationName, projectName, branchName, - neonRoleName, contentType, accept, properties, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Update a NeonRole. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param neonRoleName The name of the NeonRole. - * @param properties The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Neon Role resource type along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String organizationName, - String projectName, String branchName, String neonRoleName, NeonRoleInner properties, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (organizationName == null) { - return Mono - .error(new IllegalArgumentException("Parameter organizationName is required and cannot be null.")); - } - if (projectName == null) { - return Mono.error(new IllegalArgumentException("Parameter projectName is required and cannot be null.")); - } - if (branchName == null) { - return Mono.error(new IllegalArgumentException("Parameter branchName is required and cannot be null.")); - } - if (neonRoleName == null) { - return Mono.error(new IllegalArgumentException("Parameter neonRoleName is required and cannot be null.")); - } - if (properties == null) { - return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); - } else { - properties.validate(); - } - final String contentType = "application/json"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, organizationName, projectName, branchName, neonRoleName, contentType, accept, properties, - context); - } - - /** - * Update a NeonRole. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param neonRoleName The name of the NeonRole. - * @param properties The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the Neon Role resource type. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, NeonRoleInner> beginUpdateAsync(String resourceGroupName, - String organizationName, String projectName, String branchName, String neonRoleName, NeonRoleInner properties) { - Mono>> mono = updateWithResponseAsync(resourceGroupName, organizationName, - projectName, branchName, neonRoleName, properties); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - NeonRoleInner.class, NeonRoleInner.class, this.client.getContext()); - } - - /** - * Update a NeonRole. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param neonRoleName The name of the NeonRole. - * @param properties The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the Neon Role resource type. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, NeonRoleInner> beginUpdateAsync(String resourceGroupName, - String organizationName, String projectName, String branchName, String neonRoleName, NeonRoleInner properties, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = updateWithResponseAsync(resourceGroupName, organizationName, - projectName, branchName, neonRoleName, properties, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - NeonRoleInner.class, NeonRoleInner.class, context); - } - - /** - * Update a NeonRole. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param neonRoleName The name of the NeonRole. - * @param properties The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the Neon Role resource type. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, NeonRoleInner> beginUpdate(String resourceGroupName, - String organizationName, String projectName, String branchName, String neonRoleName, NeonRoleInner properties) { - return this - .beginUpdateAsync(resourceGroupName, organizationName, projectName, branchName, neonRoleName, properties) - .getSyncPoller(); - } - - /** - * Update a NeonRole. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param neonRoleName The name of the NeonRole. - * @param properties The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the Neon Role resource type. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, NeonRoleInner> beginUpdate(String resourceGroupName, - String organizationName, String projectName, String branchName, String neonRoleName, NeonRoleInner properties, - Context context) { - return this - .beginUpdateAsync(resourceGroupName, organizationName, projectName, branchName, neonRoleName, properties, - context) - .getSyncPoller(); - } - - /** - * Update a NeonRole. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param neonRoleName The name of the NeonRole. - * @param properties The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 Neon Role resource type on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String organizationName, String projectName, - String branchName, String neonRoleName, NeonRoleInner properties) { - return beginUpdateAsync(resourceGroupName, organizationName, projectName, branchName, neonRoleName, properties) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Update a NeonRole. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param neonRoleName The name of the NeonRole. - * @param properties The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Neon Role resource type on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String organizationName, String projectName, - String branchName, String neonRoleName, NeonRoleInner properties, Context context) { - return beginUpdateAsync(resourceGroupName, organizationName, projectName, branchName, neonRoleName, properties, - context).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Update a NeonRole. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param neonRoleName The name of the NeonRole. - * @param properties The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 Neon Role resource type. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public NeonRoleInner update(String resourceGroupName, String organizationName, String projectName, - String branchName, String neonRoleName, NeonRoleInner properties) { - return updateAsync(resourceGroupName, organizationName, projectName, branchName, neonRoleName, properties) - .block(); - } - - /** - * Update a NeonRole. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param neonRoleName The name of the NeonRole. - * @param properties The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Neon Role resource type. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public NeonRoleInner update(String resourceGroupName, String organizationName, String projectName, - String branchName, String neonRoleName, NeonRoleInner properties, Context context) { - return updateAsync(resourceGroupName, organizationName, projectName, branchName, neonRoleName, properties, - context).block(); - } - - /** - * Delete a NeonRole. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param neonRoleName The name of the NeonRole. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String organizationName, - String projectName, String branchName, String neonRoleName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (organizationName == null) { - return Mono - .error(new IllegalArgumentException("Parameter organizationName is required and cannot be null.")); - } - if (projectName == null) { - return Mono.error(new IllegalArgumentException("Parameter projectName is required and cannot be null.")); - } - if (branchName == null) { - return Mono.error(new IllegalArgumentException("Parameter branchName is required and cannot be null.")); - } - if (neonRoleName == null) { - return Mono.error(new IllegalArgumentException("Parameter neonRoleName 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, organizationName, projectName, branchName, - neonRoleName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete a NeonRole. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param neonRoleName The name of the NeonRole. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String organizationName, - String projectName, String branchName, String neonRoleName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (organizationName == null) { - return Mono - .error(new IllegalArgumentException("Parameter organizationName is required and cannot be null.")); - } - if (projectName == null) { - return Mono.error(new IllegalArgumentException("Parameter projectName is required and cannot be null.")); - } - if (branchName == null) { - return Mono.error(new IllegalArgumentException("Parameter branchName is required and cannot be null.")); - } - if (neonRoleName == null) { - return Mono.error(new IllegalArgumentException("Parameter neonRoleName 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, organizationName, projectName, branchName, neonRoleName, accept, context); - } - - /** - * Delete a NeonRole. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param neonRoleName The name of the NeonRole. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String organizationName, String projectName, - String branchName, String neonRoleName) { - return deleteWithResponseAsync(resourceGroupName, organizationName, projectName, branchName, neonRoleName) - .flatMap(ignored -> Mono.empty()); - } - - /** - * Delete a NeonRole. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param neonRoleName The name of the NeonRole. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse(String resourceGroupName, String organizationName, String projectName, - String branchName, String neonRoleName, Context context) { - return deleteWithResponseAsync(resourceGroupName, organizationName, projectName, branchName, neonRoleName, - context).block(); - } - - /** - * Delete a NeonRole. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param neonRoleName The name of the NeonRole. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String organizationName, String projectName, String branchName, - String neonRoleName) { - deleteWithResponse(resourceGroupName, organizationName, projectName, branchName, neonRoleName, Context.NONE); - } - /** * List NeonRole resources by Branch. * diff --git a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/implementation/NeonRolesImpl.java b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/implementation/NeonRolesImpl.java index adb797afc8a4..f3ab6c5d1bba 100644 --- a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/implementation/NeonRolesImpl.java +++ b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/implementation/NeonRolesImpl.java @@ -5,8 +5,6 @@ package com.azure.resourcemanager.neonpostgres.implementation; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.neonpostgres.fluent.NeonRolesClient; @@ -27,40 +25,6 @@ public NeonRolesImpl(NeonRolesClient innerClient, this.serviceManager = serviceManager; } - public Response getWithResponse(String resourceGroupName, String organizationName, String projectName, - String branchName, String neonRoleName, Context context) { - Response inner = this.serviceClient() - .getWithResponse(resourceGroupName, organizationName, projectName, branchName, neonRoleName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new NeonRoleImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public NeonRole get(String resourceGroupName, String organizationName, String projectName, String branchName, - String neonRoleName) { - NeonRoleInner inner - = this.serviceClient().get(resourceGroupName, organizationName, projectName, branchName, neonRoleName); - if (inner != null) { - return new NeonRoleImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response deleteWithResponse(String resourceGroupName, String organizationName, String projectName, - String branchName, String neonRoleName, Context context) { - return this.serviceClient() - .deleteWithResponse(resourceGroupName, organizationName, projectName, branchName, neonRoleName, context); - } - - public void delete(String resourceGroupName, String organizationName, String projectName, String branchName, - String neonRoleName) { - this.serviceClient().delete(resourceGroupName, organizationName, projectName, branchName, neonRoleName); - } - public PagedIterable list(String resourceGroupName, String organizationName, String projectName, String branchName) { PagedIterable inner @@ -75,127 +39,6 @@ public PagedIterable list(String resourceGroupName, String organizatio return ResourceManagerUtils.mapPage(inner, inner1 -> new NeonRoleImpl(inner1, this.manager())); } - public NeonRole getById(String id) { - 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))); - } - String organizationName = ResourceManagerUtils.getValueFromIdByName(id, "organizations"); - if (organizationName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'organizations'.", id))); - } - String projectName = ResourceManagerUtils.getValueFromIdByName(id, "projects"); - if (projectName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'projects'.", id))); - } - String branchName = ResourceManagerUtils.getValueFromIdByName(id, "branches"); - if (branchName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'branches'.", id))); - } - String neonRoleName = ResourceManagerUtils.getValueFromIdByName(id, "neonRoles"); - if (neonRoleName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'neonRoles'.", id))); - } - return this - .getWithResponse(resourceGroupName, organizationName, projectName, branchName, neonRoleName, Context.NONE) - .getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - 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))); - } - String organizationName = ResourceManagerUtils.getValueFromIdByName(id, "organizations"); - if (organizationName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'organizations'.", id))); - } - String projectName = ResourceManagerUtils.getValueFromIdByName(id, "projects"); - if (projectName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'projects'.", id))); - } - String branchName = ResourceManagerUtils.getValueFromIdByName(id, "branches"); - if (branchName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'branches'.", id))); - } - String neonRoleName = ResourceManagerUtils.getValueFromIdByName(id, "neonRoles"); - if (neonRoleName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'neonRoles'.", id))); - } - return this.getWithResponse(resourceGroupName, organizationName, projectName, branchName, neonRoleName, - context); - } - - public void deleteById(String id) { - 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))); - } - String organizationName = ResourceManagerUtils.getValueFromIdByName(id, "organizations"); - if (organizationName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'organizations'.", id))); - } - String projectName = ResourceManagerUtils.getValueFromIdByName(id, "projects"); - if (projectName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'projects'.", id))); - } - String branchName = ResourceManagerUtils.getValueFromIdByName(id, "branches"); - if (branchName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'branches'.", id))); - } - String neonRoleName = ResourceManagerUtils.getValueFromIdByName(id, "neonRoles"); - if (neonRoleName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'neonRoles'.", id))); - } - this.deleteWithResponse(resourceGroupName, organizationName, projectName, branchName, neonRoleName, - Context.NONE); - } - - public Response deleteByIdWithResponse(String id, Context context) { - 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))); - } - String organizationName = ResourceManagerUtils.getValueFromIdByName(id, "organizations"); - if (organizationName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'organizations'.", id))); - } - String projectName = ResourceManagerUtils.getValueFromIdByName(id, "projects"); - if (projectName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'projects'.", id))); - } - String branchName = ResourceManagerUtils.getValueFromIdByName(id, "branches"); - if (branchName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'branches'.", id))); - } - String neonRoleName = ResourceManagerUtils.getValueFromIdByName(id, "neonRoles"); - if (neonRoleName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'neonRoles'.", id))); - } - return this.deleteWithResponse(resourceGroupName, organizationName, projectName, branchName, neonRoleName, - context); - } - private NeonRolesClient serviceClient() { return this.innerClient; } @@ -203,8 +46,4 @@ private NeonRolesClient serviceClient() { private com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager() { return this.serviceManager; } - - public NeonRoleImpl define(String name) { - return new NeonRoleImpl(name, this.manager()); - } } diff --git a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/implementation/ProjectImpl.java b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/implementation/ProjectImpl.java index 9b825eb700cc..e66c3d0e215c 100644 --- a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/implementation/ProjectImpl.java +++ b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/implementation/ProjectImpl.java @@ -89,14 +89,14 @@ public ProjectImpl update() { public Project apply() { this.innerObject = serviceManager.serviceClient() .getProjects() - .update(resourceGroupName, organizationName, projectName, this.innerModel(), Context.NONE); + .createOrUpdate(resourceGroupName, organizationName, projectName, this.innerModel(), Context.NONE); return this; } public Project apply(Context context) { this.innerObject = serviceManager.serviceClient() .getProjects() - .update(resourceGroupName, organizationName, projectName, this.innerModel(), context); + .createOrUpdate(resourceGroupName, organizationName, projectName, this.innerModel(), context); return this; } diff --git a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/implementation/ProjectsClientImpl.java b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/implementation/ProjectsClientImpl.java index 74ae6ebe2f25..58aebb9b0e90 100644 --- a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/implementation/ProjectsClientImpl.java +++ b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/implementation/ProjectsClientImpl.java @@ -12,7 +12,6 @@ import com.azure.core.annotation.Headers; import com.azure.core.annotation.Host; import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.Patch; import com.azure.core.annotation.PathParam; import com.azure.core.annotation.Post; import com.azure.core.annotation.Put; @@ -92,16 +91,6 @@ Mono>> createOrUpdate(@HostParam("endpoint") String en @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, @BodyParam("application/json") ProjectInner resource, Context context); - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("organizationName") String organizationName, @PathParam("projectName") String projectName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") ProjectInner properties, Context context); - @Headers({ "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}") @ExpectedResponses({ 200, 204 }) @@ -526,259 +515,6 @@ public ProjectInner createOrUpdate(String resourceGroupName, String organization return createOrUpdateAsync(resourceGroupName, organizationName, projectName, resource, context).block(); } - /** - * Update a Project. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param properties The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 Project resource type along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String organizationName, - String projectName, ProjectInner properties) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (organizationName == null) { - return Mono - .error(new IllegalArgumentException("Parameter organizationName is required and cannot be null.")); - } - if (projectName == null) { - return Mono.error(new IllegalArgumentException("Parameter projectName is required and cannot be null.")); - } - if (properties == null) { - return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); - } else { - properties.validate(); - } - final String contentType = "application/json"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, organizationName, projectName, contentType, accept, - properties, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Update a Project. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param properties The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Project resource type along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String organizationName, - String projectName, ProjectInner properties, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (organizationName == null) { - return Mono - .error(new IllegalArgumentException("Parameter organizationName is required and cannot be null.")); - } - if (projectName == null) { - return Mono.error(new IllegalArgumentException("Parameter projectName is required and cannot be null.")); - } - if (properties == null) { - return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); - } else { - properties.validate(); - } - final String contentType = "application/json"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, organizationName, projectName, contentType, accept, properties, context); - } - - /** - * Update a Project. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param properties The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the Project resource type. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ProjectInner> beginUpdateAsync(String resourceGroupName, - String organizationName, String projectName, ProjectInner properties) { - Mono>> mono - = updateWithResponseAsync(resourceGroupName, organizationName, projectName, properties); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ProjectInner.class, ProjectInner.class, this.client.getContext()); - } - - /** - * Update a Project. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param properties The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the Project resource type. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ProjectInner> beginUpdateAsync(String resourceGroupName, - String organizationName, String projectName, ProjectInner properties, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = updateWithResponseAsync(resourceGroupName, organizationName, projectName, properties, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ProjectInner.class, ProjectInner.class, context); - } - - /** - * Update a Project. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param properties The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the Project resource type. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ProjectInner> beginUpdate(String resourceGroupName, - String organizationName, String projectName, ProjectInner properties) { - return this.beginUpdateAsync(resourceGroupName, organizationName, projectName, properties).getSyncPoller(); - } - - /** - * Update a Project. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param properties The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the Project resource type. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ProjectInner> beginUpdate(String resourceGroupName, - String organizationName, String projectName, ProjectInner properties, Context context) { - return this.beginUpdateAsync(resourceGroupName, organizationName, projectName, properties, context) - .getSyncPoller(); - } - - /** - * Update a Project. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param properties The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 Project resource type on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String organizationName, String projectName, - ProjectInner properties) { - return beginUpdateAsync(resourceGroupName, organizationName, projectName, properties).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Update a Project. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param properties The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Project resource type on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String organizationName, String projectName, - ProjectInner properties, Context context) { - return beginUpdateAsync(resourceGroupName, organizationName, projectName, properties, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Update a Project. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param properties The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 Project resource type. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ProjectInner update(String resourceGroupName, String organizationName, String projectName, - ProjectInner properties) { - return updateAsync(resourceGroupName, organizationName, projectName, properties).block(); - } - - /** - * Update a Project. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param properties The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Project resource type. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ProjectInner update(String resourceGroupName, String organizationName, String projectName, - ProjectInner properties, Context context) { - return updateAsync(resourceGroupName, organizationName, projectName, properties, context).block(); - } - /** * Delete a Project. * diff --git a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/models/Compute.java b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/models/Compute.java index a75b592b2caf..fbcc6bb3322c 100644 --- a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/models/Compute.java +++ b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/models/Compute.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.neonpostgres.models; import com.azure.core.management.SystemData; -import com.azure.core.util.Context; import com.azure.resourcemanager.neonpostgres.fluent.models.ComputeInner; /** @@ -47,146 +46,10 @@ public interface Compute { */ SystemData systemData(); - /** - * Gets the name of the resource group. - * - * @return the name of the resource group. - */ - String resourceGroupName(); - /** * Gets the inner com.azure.resourcemanager.neonpostgres.fluent.models.ComputeInner object. * * @return the inner object. */ ComputeInner innerModel(); - - /** - * The entirety of the Compute definition. - */ - interface Definition - extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { - } - - /** - * The Compute definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the Compute definition. - */ - interface Blank extends WithParentResource { - } - - /** - * The stage of the Compute definition allowing to specify parent resource. - */ - interface WithParentResource { - /** - * Specifies resourceGroupName, organizationName, projectName, branchName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @return the next definition stage. - */ - WithCreate withExistingBranche(String resourceGroupName, String organizationName, String projectName, - String branchName); - } - - /** - * The stage of the Compute 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.WithProperties { - /** - * Executes the create request. - * - * @return the created resource. - */ - Compute create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - Compute create(Context context); - } - - /** - * The stage of the Compute definition allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: The resource-specific properties for this resource.. - * - * @param properties The resource-specific properties for this resource. - * @return the next definition stage. - */ - WithCreate withProperties(ComputeProperties properties); - } - } - - /** - * Begins update for the Compute resource. - * - * @return the stage of resource update. - */ - Compute.Update update(); - - /** - * The template for Compute update. - */ - interface Update extends UpdateStages.WithProperties { - /** - * Executes the update request. - * - * @return the updated resource. - */ - Compute apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - Compute apply(Context context); - } - - /** - * The Compute update stages. - */ - interface UpdateStages { - /** - * The stage of the Compute update allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: The resource-specific properties for this resource.. - * - * @param properties The resource-specific properties for this resource. - * @return the next definition stage. - */ - Update withProperties(ComputeProperties properties); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - Compute refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - Compute refresh(Context context); } diff --git a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/models/ComputeProperties.java b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/models/ComputeProperties.java index a13846dcefb8..76c03693d59f 100644 --- a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/models/ComputeProperties.java +++ b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/models/ComputeProperties.java @@ -4,7 +4,7 @@ package com.azure.resourcemanager.neonpostgres.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,7 +15,7 @@ /** * Properties specific to Compute. */ -@Fluent +@Immutable public final class ComputeProperties implements JsonSerializable { /* * Unique identifier for the entity @@ -65,7 +65,7 @@ public final class ComputeProperties implements JsonSerializable attributes() { return this.attributes; } - /** - * Set the attributes property: Additional attributes for the entity. - * - * @param attributes the attributes value to set. - * @return the ComputeProperties object itself. - */ - public ComputeProperties withAttributes(List attributes) { - this.attributes = attributes; - return this; - } - /** * Get the region property: Region where the compute instance is located. * @@ -144,17 +122,6 @@ public String region() { return this.region; } - /** - * Set the region property: Region where the compute instance is located. - * - * @param region the region value to set. - * @return the ComputeProperties object itself. - */ - public ComputeProperties withRegion(String region) { - this.region = region; - return this; - } - /** * Get the cpuCores property: Number of allocated CPU cores. * @@ -164,17 +131,6 @@ public Integer cpuCores() { return this.cpuCores; } - /** - * Set the cpuCores property: Number of allocated CPU cores. - * - * @param cpuCores the cpuCores value to set. - * @return the ComputeProperties object itself. - */ - public ComputeProperties withCpuCores(Integer cpuCores) { - this.cpuCores = cpuCores; - return this; - } - /** * Get the memory property: Memory allocated in GB. * @@ -184,17 +140,6 @@ public Integer memory() { return this.memory; } - /** - * Set the memory property: Memory allocated in GB. - * - * @param memory the memory value to set. - * @return the ComputeProperties object itself. - */ - public ComputeProperties withMemory(Integer memory) { - this.memory = memory; - return this; - } - /** * Get the status property: Current status of the compute instance. * @@ -204,17 +149,6 @@ public String status() { return this.status; } - /** - * Set the status property: Current status of the compute instance. - * - * @param status the status value to set. - * @return the ComputeProperties object itself. - */ - public ComputeProperties withStatus(String status) { - this.status = status; - return this; - } - /** * Validates the instance. * diff --git a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/models/Computes.java b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/models/Computes.java index e66126b5dd00..91ab4758b28d 100644 --- a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/models/Computes.java +++ b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/models/Computes.java @@ -5,78 +5,12 @@ package com.azure.resourcemanager.neonpostgres.models; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; import com.azure.core.util.Context; /** * Resource collection API of Computes. */ public interface Computes { - /** - * Get a Compute. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param computeName The name of the Compute. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Compute along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String organizationName, String projectName, - String branchName, String computeName, Context context); - - /** - * Get a Compute. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param computeName The name of the Compute. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 Compute. - */ - Compute get(String resourceGroupName, String organizationName, String projectName, String branchName, - String computeName); - - /** - * Delete a Compute. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param computeName The name of the Compute. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - Response deleteWithResponse(String resourceGroupName, String organizationName, String projectName, - String branchName, String computeName, Context context); - - /** - * Delete a Compute. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param computeName The name of the Compute. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String organizationName, String projectName, String branchName, - String computeName); - /** * List Compute resources by Branch. * @@ -107,57 +41,4 @@ PagedIterable list(String resourceGroupName, String organizationName, S */ PagedIterable list(String resourceGroupName, String organizationName, String projectName, String branchName, Context context); - - /** - * Get a Compute. - * - * @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 a Compute along with {@link Response}. - */ - Compute getById(String id); - - /** - * Get a Compute. - * - * @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 a Compute along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete a Compute. - * - * @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. - */ - void deleteById(String id); - - /** - * Delete a Compute. - * - * @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 the {@link Response}. - */ - Response deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new Compute resource. - * - * @param name resource name. - * @return the first stage of the new Compute definition. - */ - Compute.DefinitionStages.Blank define(String name); } diff --git a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/models/Endpoint.java b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/models/Endpoint.java index db3c03c73298..11284e4510cf 100644 --- a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/models/Endpoint.java +++ b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/models/Endpoint.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.neonpostgres.models; import com.azure.core.management.SystemData; -import com.azure.core.util.Context; import com.azure.resourcemanager.neonpostgres.fluent.models.EndpointInner; /** @@ -47,146 +46,10 @@ public interface Endpoint { */ SystemData systemData(); - /** - * Gets the name of the resource group. - * - * @return the name of the resource group. - */ - String resourceGroupName(); - /** * Gets the inner com.azure.resourcemanager.neonpostgres.fluent.models.EndpointInner object. * * @return the inner object. */ EndpointInner innerModel(); - - /** - * The entirety of the Endpoint definition. - */ - interface Definition - extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { - } - - /** - * The Endpoint definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the Endpoint definition. - */ - interface Blank extends WithParentResource { - } - - /** - * The stage of the Endpoint definition allowing to specify parent resource. - */ - interface WithParentResource { - /** - * Specifies resourceGroupName, organizationName, projectName, branchName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @return the next definition stage. - */ - WithCreate withExistingBranche(String resourceGroupName, String organizationName, String projectName, - String branchName); - } - - /** - * The stage of the Endpoint 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.WithProperties { - /** - * Executes the create request. - * - * @return the created resource. - */ - Endpoint create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - Endpoint create(Context context); - } - - /** - * The stage of the Endpoint definition allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: The resource-specific properties for this resource.. - * - * @param properties The resource-specific properties for this resource. - * @return the next definition stage. - */ - WithCreate withProperties(EndpointProperties properties); - } - } - - /** - * Begins update for the Endpoint resource. - * - * @return the stage of resource update. - */ - Endpoint.Update update(); - - /** - * The template for Endpoint update. - */ - interface Update extends UpdateStages.WithProperties { - /** - * Executes the update request. - * - * @return the updated resource. - */ - Endpoint apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - Endpoint apply(Context context); - } - - /** - * The Endpoint update stages. - */ - interface UpdateStages { - /** - * The stage of the Endpoint update allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: The resource-specific properties for this resource.. - * - * @param properties The resource-specific properties for this resource. - * @return the next definition stage. - */ - Update withProperties(EndpointProperties properties); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - Endpoint refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - Endpoint refresh(Context context); } diff --git a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/models/Endpoints.java b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/models/Endpoints.java index a4920028164b..a339cf13ba01 100644 --- a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/models/Endpoints.java +++ b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/models/Endpoints.java @@ -5,78 +5,12 @@ package com.azure.resourcemanager.neonpostgres.models; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; import com.azure.core.util.Context; /** * Resource collection API of Endpoints. */ public interface Endpoints { - /** - * Get a Endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param endpointName The name of the Endpoint. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Endpoint along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String organizationName, String projectName, - String branchName, String endpointName, Context context); - - /** - * Get a Endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param endpointName The name of the Endpoint. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 Endpoint. - */ - Endpoint get(String resourceGroupName, String organizationName, String projectName, String branchName, - String endpointName); - - /** - * Delete a Endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param endpointName The name of the Endpoint. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - Response deleteWithResponse(String resourceGroupName, String organizationName, String projectName, - String branchName, String endpointName, Context context); - - /** - * Delete a Endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param endpointName The name of the Endpoint. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String organizationName, String projectName, String branchName, - String endpointName); - /** * List Endpoint resources by Branch. * @@ -107,57 +41,4 @@ PagedIterable list(String resourceGroupName, String organizationName, */ PagedIterable list(String resourceGroupName, String organizationName, String projectName, String branchName, Context context); - - /** - * Get a Endpoint. - * - * @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 a Endpoint along with {@link Response}. - */ - Endpoint getById(String id); - - /** - * Get a Endpoint. - * - * @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 a Endpoint along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete a Endpoint. - * - * @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. - */ - void deleteById(String id); - - /** - * Delete a Endpoint. - * - * @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 the {@link Response}. - */ - Response deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new Endpoint resource. - * - * @param name resource name. - * @return the first stage of the new Endpoint definition. - */ - Endpoint.DefinitionStages.Blank define(String name); } diff --git a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/models/NeonDatabase.java b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/models/NeonDatabase.java index 79109a1b18ff..bee795f1a52f 100644 --- a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/models/NeonDatabase.java +++ b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/models/NeonDatabase.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.neonpostgres.models; import com.azure.core.management.SystemData; -import com.azure.core.util.Context; import com.azure.resourcemanager.neonpostgres.fluent.models.NeonDatabaseInner; /** @@ -47,146 +46,10 @@ public interface NeonDatabase { */ SystemData systemData(); - /** - * Gets the name of the resource group. - * - * @return the name of the resource group. - */ - String resourceGroupName(); - /** * Gets the inner com.azure.resourcemanager.neonpostgres.fluent.models.NeonDatabaseInner object. * * @return the inner object. */ NeonDatabaseInner innerModel(); - - /** - * The entirety of the NeonDatabase definition. - */ - interface Definition - extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { - } - - /** - * The NeonDatabase definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the NeonDatabase definition. - */ - interface Blank extends WithParentResource { - } - - /** - * The stage of the NeonDatabase definition allowing to specify parent resource. - */ - interface WithParentResource { - /** - * Specifies resourceGroupName, organizationName, projectName, branchName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @return the next definition stage. - */ - WithCreate withExistingBranche(String resourceGroupName, String organizationName, String projectName, - String branchName); - } - - /** - * The stage of the NeonDatabase 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.WithProperties { - /** - * Executes the create request. - * - * @return the created resource. - */ - NeonDatabase create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - NeonDatabase create(Context context); - } - - /** - * The stage of the NeonDatabase definition allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: The resource-specific properties for this resource.. - * - * @param properties The resource-specific properties for this resource. - * @return the next definition stage. - */ - WithCreate withProperties(NeonDatabaseProperties properties); - } - } - - /** - * Begins update for the NeonDatabase resource. - * - * @return the stage of resource update. - */ - NeonDatabase.Update update(); - - /** - * The template for NeonDatabase update. - */ - interface Update extends UpdateStages.WithProperties { - /** - * Executes the update request. - * - * @return the updated resource. - */ - NeonDatabase apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - NeonDatabase apply(Context context); - } - - /** - * The NeonDatabase update stages. - */ - interface UpdateStages { - /** - * The stage of the NeonDatabase update allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: The resource-specific properties for this resource.. - * - * @param properties The resource-specific properties for this resource. - * @return the next definition stage. - */ - Update withProperties(NeonDatabaseProperties properties); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - NeonDatabase refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - NeonDatabase refresh(Context context); } diff --git a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/models/NeonDatabases.java b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/models/NeonDatabases.java index af0658023023..5ba428600477 100644 --- a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/models/NeonDatabases.java +++ b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/models/NeonDatabases.java @@ -5,78 +5,12 @@ package com.azure.resourcemanager.neonpostgres.models; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; import com.azure.core.util.Context; /** * Resource collection API of NeonDatabases. */ public interface NeonDatabases { - /** - * Get a NeonDatabase. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param neonDatabaseName The name of the NeonDatabase. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a NeonDatabase along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String organizationName, String projectName, - String branchName, String neonDatabaseName, Context context); - - /** - * Get a NeonDatabase. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param neonDatabaseName The name of the NeonDatabase. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 NeonDatabase. - */ - NeonDatabase get(String resourceGroupName, String organizationName, String projectName, String branchName, - String neonDatabaseName); - - /** - * Delete a NeonDatabase. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param neonDatabaseName The name of the NeonDatabase. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - Response deleteWithResponse(String resourceGroupName, String organizationName, String projectName, - String branchName, String neonDatabaseName, Context context); - - /** - * Delete a NeonDatabase. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param neonDatabaseName The name of the NeonDatabase. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String organizationName, String projectName, String branchName, - String neonDatabaseName); - /** * List NeonDatabase resources by Branch. * @@ -107,57 +41,4 @@ PagedIterable list(String resourceGroupName, String organizationNa */ PagedIterable list(String resourceGroupName, String organizationName, String projectName, String branchName, Context context); - - /** - * Get a NeonDatabase. - * - * @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 a NeonDatabase along with {@link Response}. - */ - NeonDatabase getById(String id); - - /** - * Get a NeonDatabase. - * - * @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 a NeonDatabase along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete a NeonDatabase. - * - * @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. - */ - void deleteById(String id); - - /** - * Delete a NeonDatabase. - * - * @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 the {@link Response}. - */ - Response deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new NeonDatabase resource. - * - * @param name resource name. - * @return the first stage of the new NeonDatabase definition. - */ - NeonDatabase.DefinitionStages.Blank define(String name); } diff --git a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/models/NeonRole.java b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/models/NeonRole.java index 82b00b3655cb..0be7d3a57180 100644 --- a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/models/NeonRole.java +++ b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/models/NeonRole.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.neonpostgres.models; import com.azure.core.management.SystemData; -import com.azure.core.util.Context; import com.azure.resourcemanager.neonpostgres.fluent.models.NeonRoleInner; /** @@ -47,146 +46,10 @@ public interface NeonRole { */ SystemData systemData(); - /** - * Gets the name of the resource group. - * - * @return the name of the resource group. - */ - String resourceGroupName(); - /** * Gets the inner com.azure.resourcemanager.neonpostgres.fluent.models.NeonRoleInner object. * * @return the inner object. */ NeonRoleInner innerModel(); - - /** - * The entirety of the NeonRole definition. - */ - interface Definition - extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { - } - - /** - * The NeonRole definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the NeonRole definition. - */ - interface Blank extends WithParentResource { - } - - /** - * The stage of the NeonRole definition allowing to specify parent resource. - */ - interface WithParentResource { - /** - * Specifies resourceGroupName, organizationName, projectName, branchName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @return the next definition stage. - */ - WithCreate withExistingBranche(String resourceGroupName, String organizationName, String projectName, - String branchName); - } - - /** - * The stage of the NeonRole 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.WithProperties { - /** - * Executes the create request. - * - * @return the created resource. - */ - NeonRole create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - NeonRole create(Context context); - } - - /** - * The stage of the NeonRole definition allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: The resource-specific properties for this resource.. - * - * @param properties The resource-specific properties for this resource. - * @return the next definition stage. - */ - WithCreate withProperties(NeonRoleProperties properties); - } - } - - /** - * Begins update for the NeonRole resource. - * - * @return the stage of resource update. - */ - NeonRole.Update update(); - - /** - * The template for NeonRole update. - */ - interface Update extends UpdateStages.WithProperties { - /** - * Executes the update request. - * - * @return the updated resource. - */ - NeonRole apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - NeonRole apply(Context context); - } - - /** - * The NeonRole update stages. - */ - interface UpdateStages { - /** - * The stage of the NeonRole update allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: The resource-specific properties for this resource.. - * - * @param properties The resource-specific properties for this resource. - * @return the next definition stage. - */ - Update withProperties(NeonRoleProperties properties); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - NeonRole refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - NeonRole refresh(Context context); } diff --git a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/models/NeonRoles.java b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/models/NeonRoles.java index 0f9a6e3ccf08..f6ccc5d16da9 100644 --- a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/models/NeonRoles.java +++ b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/main/java/com/azure/resourcemanager/neonpostgres/models/NeonRoles.java @@ -5,78 +5,12 @@ package com.azure.resourcemanager.neonpostgres.models; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; import com.azure.core.util.Context; /** * Resource collection API of NeonRoles. */ public interface NeonRoles { - /** - * Get a NeonRole. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param neonRoleName The name of the NeonRole. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a NeonRole along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String organizationName, String projectName, - String branchName, String neonRoleName, Context context); - - /** - * Get a NeonRole. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param neonRoleName The name of the NeonRole. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 NeonRole. - */ - NeonRole get(String resourceGroupName, String organizationName, String projectName, String branchName, - String neonRoleName); - - /** - * Delete a NeonRole. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param neonRoleName The name of the NeonRole. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - Response deleteWithResponse(String resourceGroupName, String organizationName, String projectName, - String branchName, String neonRoleName, Context context); - - /** - * Delete a NeonRole. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Neon Organizations resource. - * @param projectName The name of the Project. - * @param branchName The name of the Branch. - * @param neonRoleName The name of the NeonRole. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String organizationName, String projectName, String branchName, - String neonRoleName); - /** * List NeonRole resources by Branch. * @@ -107,57 +41,4 @@ PagedIterable list(String resourceGroupName, String organizationName, */ PagedIterable list(String resourceGroupName, String organizationName, String projectName, String branchName, Context context); - - /** - * Get a NeonRole. - * - * @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 a NeonRole along with {@link Response}. - */ - NeonRole getById(String id); - - /** - * Get a NeonRole. - * - * @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 a NeonRole along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete a NeonRole. - * - * @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. - */ - void deleteById(String id); - - /** - * Delete a NeonRole. - * - * @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 the {@link Response}. - */ - Response deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new NeonRole resource. - * - * @param name resource name. - * @return the first stage of the new NeonRole definition. - */ - NeonRole.DefinitionStages.Blank define(String name); } diff --git a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/BranchesCreateOrUpdateSamples.java b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/BranchesCreateOrUpdateSamples.java index 1bb16f8fb2e1..a649210ff4df 100644 --- a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/BranchesCreateOrUpdateSamples.java +++ b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/BranchesCreateOrUpdateSamples.java @@ -20,15 +20,16 @@ public final class BranchesCreateOrUpdateSamples { * x-ms-original-file: 2025-03-01/Branches_CreateOrUpdate_MaximumSet_Gen.json */ /** - * Sample code: Branches_CreateOrUpdate_MaximumSet. + * Sample code: Branches_CreateOrUpdate_MaximumSet - generated by [MaximumSet] rule - generated by [MaximumSet] + * rule. * * @param manager Entry point to NeonPostgresManager. */ - public static void - branchesCreateOrUpdateMaximumSet(com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { + public static void branchesCreateOrUpdateMaximumSetGeneratedByMaximumSetRuleGeneratedByMaximumSetRule( + com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { manager.branches() - .define("test-entity") - .withExistingProject("rgneon", "test-org", "test-entity") + .define("sample-resource") + .withExistingProject("rgneon", "contoso-org", "sample-resource") .withProperties(new BranchProperties().withEntityName("entity-name") .withAttributes(Arrays.asList(new Attributes().withName("trhvzyvaqy").withValue("evpkgsskyavybxwwssm"))) .withProjectId("oik") diff --git a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/BranchesDeleteSamples.java b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/BranchesDeleteSamples.java index b1a38e7a67c1..b47bf30a4673 100644 --- a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/BranchesDeleteSamples.java +++ b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/BranchesDeleteSamples.java @@ -12,12 +12,14 @@ public final class BranchesDeleteSamples { * x-ms-original-file: 2025-03-01/Branches_Delete_MaximumSet_Gen.json */ /** - * Sample code: Branches_Delete_MaximumSet. + * Sample code: Branches_Delete_MaximumSet - generated by [MaximumSet] rule - generated by [MaximumSet] rule. * * @param manager Entry point to NeonPostgresManager. */ - public static void branchesDeleteMaximumSet(com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { + public static void branchesDeleteMaximumSetGeneratedByMaximumSetRuleGeneratedByMaximumSetRule( + com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { manager.branches() - .deleteWithResponse("rgneon", "test-org", "entity-name", "entity-name", com.azure.core.util.Context.NONE); + .deleteWithResponse("rgneon", "contoso-org", "sample-resource", "sample-resource", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/BranchesGetSamples.java b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/BranchesGetSamples.java index 5d96f6b81de5..3f1e3e2ab9cd 100644 --- a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/BranchesGetSamples.java +++ b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/BranchesGetSamples.java @@ -12,12 +12,14 @@ public final class BranchesGetSamples { * x-ms-original-file: 2025-03-01/Branches_Get_MaximumSet_Gen.json */ /** - * Sample code: Branches_Get_MaximumSet. + * Sample code: Branches_Get_MaximumSet - generated by [MaximumSet] rule - generated by [MaximumSet] rule. * * @param manager Entry point to NeonPostgresManager. */ - public static void branchesGetMaximumSet(com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { + public static void branchesGetMaximumSetGeneratedByMaximumSetRuleGeneratedByMaximumSetRule( + com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { manager.branches() - .getWithResponse("rgneon", "test-org", "entity-name", "entity-name", com.azure.core.util.Context.NONE); + .getWithResponse("rgneon", "contoso-org", "sample-resource", "sample-resource", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/BranchesListSamples.java b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/BranchesListSamples.java index 0f45c4c34e10..d881e379b4b7 100644 --- a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/BranchesListSamples.java +++ b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/BranchesListSamples.java @@ -12,11 +12,12 @@ public final class BranchesListSamples { * x-ms-original-file: 2025-03-01/Branches_List_MaximumSet_Gen.json */ /** - * Sample code: Branches_List_MaximumSet. + * Sample code: Branches_List_MaximumSet - generated by [MaximumSet] rule - generated by [MaximumSet] rule. * * @param manager Entry point to NeonPostgresManager. */ - public static void branchesListMaximumSet(com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { - manager.branches().list("rgneon", "test-org", "entity-name", com.azure.core.util.Context.NONE); + public static void branchesListMaximumSetGeneratedByMaximumSetRuleGeneratedByMaximumSetRule( + com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { + manager.branches().list("rgneon", "contoso-org", "sample-resource", com.azure.core.util.Context.NONE); } } diff --git a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/BranchesUpdateSamples.java b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/BranchesUpdateSamples.java deleted file mode 100644 index c0526eea68e8..000000000000 --- a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/BranchesUpdateSamples.java +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.neonpostgres.generated; - -import com.azure.resourcemanager.neonpostgres.models.Attributes; -import com.azure.resourcemanager.neonpostgres.models.Branch; -import com.azure.resourcemanager.neonpostgres.models.BranchProperties; -import com.azure.resourcemanager.neonpostgres.models.EndpointProperties; -import com.azure.resourcemanager.neonpostgres.models.EndpointType; -import com.azure.resourcemanager.neonpostgres.models.NeonDatabaseProperties; -import com.azure.resourcemanager.neonpostgres.models.NeonRoleProperties; -import java.util.Arrays; - -/** - * Samples for Branches Update. - */ -public final class BranchesUpdateSamples { - /* - * x-ms-original-file: 2025-03-01/Branches_Update_MaximumSet_Gen.json - */ - /** - * Sample code: Branches_Update_MaximumSet. - * - * @param manager Entry point to NeonPostgresManager. - */ - public static void branchesUpdateMaximumSet(com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { - Branch resource = manager.branches() - .getWithResponse("rgneon", "test-org", "entity-name", "entity-name", com.azure.core.util.Context.NONE) - .getValue(); - resource.update() - .withProperties(new BranchProperties().withEntityName("entity-name") - .withAttributes(Arrays.asList(new Attributes().withName("trhvzyvaqy").withValue("evpkgsskyavybxwwssm"))) - .withProjectId("oik") - .withParentId("entity-id") - .withRoleName("qrrairsupyosxnqotdwhbpc") - .withDatabaseName("duhxebzhd") - .withRoles(Arrays.asList(new NeonRoleProperties().withEntityName("entity-name") - .withAttributes( - Arrays.asList(new Attributes().withName("trhvzyvaqy").withValue("evpkgsskyavybxwwssm"))) - .withBranchId("wxbojkmdgaggkfiwqfakdkbyztm") - .withPermissions(Arrays.asList("myucqecpjriewzohxvadgkhiudnyx")) - .withIsSuperUser(true))) - .withDatabases(Arrays.asList(new NeonDatabaseProperties().withEntityName("entity-name") - .withAttributes( - Arrays.asList(new Attributes().withName("trhvzyvaqy").withValue("evpkgsskyavybxwwssm"))) - .withBranchId("orfdwdmzvfvlnrgussvcvoek") - .withOwnerName("odmbeg"))) - .withEndpoints(Arrays.asList(new EndpointProperties().withEntityName("entity-name") - .withAttributes( - Arrays.asList(new Attributes().withName("trhvzyvaqy").withValue("evpkgsskyavybxwwssm"))) - .withProjectId("rtvdeeflqzlrpfzhjqhcsfbldw") - .withBranchId("rzsyrhpfbydxtfkpaa") - .withEndpointType(EndpointType.READ_ONLY)))) - .apply(); - } -} diff --git a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/ComputesCreateOrUpdateSamples.java b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/ComputesCreateOrUpdateSamples.java deleted file mode 100644 index 95bcf2315f0a..000000000000 --- a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/ComputesCreateOrUpdateSamples.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.neonpostgres.generated; - -import com.azure.resourcemanager.neonpostgres.models.Attributes; -import com.azure.resourcemanager.neonpostgres.models.ComputeProperties; -import java.util.Arrays; - -/** - * Samples for Computes CreateOrUpdate. - */ -public final class ComputesCreateOrUpdateSamples { - /* - * x-ms-original-file: 2025-03-01/Computes_CreateOrUpdate_MaximumSet_Gen.json - */ - /** - * Sample code: Computes_CreateOrUpdate_MaximumSet. - * - * @param manager Entry point to NeonPostgresManager. - */ - public static void - computesCreateOrUpdateMaximumSet(com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { - manager.computes() - .define("entity-name") - .withExistingBranche("rgneon", "test-org", "entity-name", "entity-name") - .withProperties(new ComputeProperties().withEntityName("entity-name") - .withAttributes(Arrays.asList(new Attributes().withName("trhvzyvaqy").withValue("evpkgsskyavybxwwssm"))) - .withRegion("mcfyojzptdliawyuxyxzqxif") - .withCpuCores(29) - .withMemory(2) - .withStatus("upwdpznysuwt")) - .create(); - } -} diff --git a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/ComputesDeleteSamples.java b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/ComputesDeleteSamples.java deleted file mode 100644 index 4d78371635fb..000000000000 --- a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/ComputesDeleteSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.neonpostgres.generated; - -/** - * Samples for Computes Delete. - */ -public final class ComputesDeleteSamples { - /* - * x-ms-original-file: 2025-03-01/Computes_Delete_MaximumSet_Gen.json - */ - /** - * Sample code: Computes_Delete_MaximumSet. - * - * @param manager Entry point to NeonPostgresManager. - */ - public static void computesDeleteMaximumSet(com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { - manager.computes() - .deleteWithResponse("rgneon", "test-org", "entity-name", "entity-name", "entity-name", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/ComputesGetSamples.java b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/ComputesGetSamples.java deleted file mode 100644 index 68f93798226d..000000000000 --- a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/ComputesGetSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.neonpostgres.generated; - -/** - * Samples for Computes Get. - */ -public final class ComputesGetSamples { - /* - * x-ms-original-file: 2025-03-01/Computes_Get_MaximumSet_Gen.json - */ - /** - * Sample code: Computes_Get_MaximumSet. - * - * @param manager Entry point to NeonPostgresManager. - */ - public static void computesGetMaximumSet(com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { - manager.computes() - .getWithResponse("rgneon", "test-org", "entity-name", "entity-name", "entity-name", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/ComputesListSamples.java b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/ComputesListSamples.java index 2145ad7b38e1..d484487f9935 100644 --- a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/ComputesListSamples.java +++ b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/ComputesListSamples.java @@ -12,11 +12,13 @@ public final class ComputesListSamples { * x-ms-original-file: 2025-03-01/Computes_List_MaximumSet_Gen.json */ /** - * Sample code: Computes_List_MaximumSet. + * Sample code: Computes_List_MaximumSet - generated by [MaximumSet] rule - generated by [MaximumSet] rule. * * @param manager Entry point to NeonPostgresManager. */ - public static void computesListMaximumSet(com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { - manager.computes().list("rgneon", "test-org", "entity-name", "entity-name", com.azure.core.util.Context.NONE); + public static void computesListMaximumSetGeneratedByMaximumSetRuleGeneratedByMaximumSetRule( + com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { + manager.computes() + .list("rgneon", "contoso-org", "sample-resource", "sample-resource", com.azure.core.util.Context.NONE); } } diff --git a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/ComputesUpdateSamples.java b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/ComputesUpdateSamples.java deleted file mode 100644 index bc740de45f78..000000000000 --- a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/ComputesUpdateSamples.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.neonpostgres.generated; - -import com.azure.resourcemanager.neonpostgres.models.Attributes; -import com.azure.resourcemanager.neonpostgres.models.Compute; -import com.azure.resourcemanager.neonpostgres.models.ComputeProperties; -import java.util.Arrays; - -/** - * Samples for Computes Update. - */ -public final class ComputesUpdateSamples { - /* - * x-ms-original-file: 2025-03-01/Computes_Update_MaximumSet_Gen.json - */ - /** - * Sample code: Computes_Update_MaximumSet. - * - * @param manager Entry point to NeonPostgresManager. - */ - public static void computesUpdateMaximumSet(com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { - Compute resource = manager.computes() - .getWithResponse("rgneon", "test-org", "entity-name", "entity-name", "entity-name", - com.azure.core.util.Context.NONE) - .getValue(); - resource.update() - .withProperties(new ComputeProperties().withEntityName("entity-name") - .withAttributes(Arrays.asList(new Attributes().withName("trhvzyvaqy").withValue("evpkgsskyavybxwwssm"))) - .withRegion("mcfyojzptdliawyuxyxzqxif") - .withCpuCores(29) - .withMemory(2) - .withStatus("upwdpznysuwt")) - .apply(); - } -} diff --git a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/EndpointsCreateOrUpdateSamples.java b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/EndpointsCreateOrUpdateSamples.java deleted file mode 100644 index 0903a59c6681..000000000000 --- a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/EndpointsCreateOrUpdateSamples.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.neonpostgres.generated; - -import com.azure.resourcemanager.neonpostgres.models.Attributes; -import com.azure.resourcemanager.neonpostgres.models.EndpointProperties; -import com.azure.resourcemanager.neonpostgres.models.EndpointType; -import java.util.Arrays; - -/** - * Samples for Endpoints CreateOrUpdate. - */ -public final class EndpointsCreateOrUpdateSamples { - /* - * x-ms-original-file: 2025-03-01/Endpoints_CreateOrUpdate_MaximumSet_Gen.json - */ - /** - * Sample code: Endpoints_CreateOrUpdate_MaximumSet. - * - * @param manager Entry point to NeonPostgresManager. - */ - public static void - endpointsCreateOrUpdateMaximumSet(com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { - manager.endpoints() - .define("entity-name") - .withExistingBranche("rgneon", "test-org", "entity-name", "entity-name") - .withProperties(new EndpointProperties().withEntityName("entity-name") - .withAttributes(Arrays.asList(new Attributes().withName("trhvzyvaqy").withValue("evpkgsskyavybxwwssm"))) - .withProjectId("rtvdeeflqzlrpfzhjqhcsfbldw") - .withBranchId("rzsyrhpfbydxtfkpaa") - .withEndpointType(EndpointType.READ_ONLY)) - .create(); - } -} diff --git a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/EndpointsDeleteSamples.java b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/EndpointsDeleteSamples.java deleted file mode 100644 index 5545707ddf43..000000000000 --- a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/EndpointsDeleteSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.neonpostgres.generated; - -/** - * Samples for Endpoints Delete. - */ -public final class EndpointsDeleteSamples { - /* - * x-ms-original-file: 2025-03-01/Endpoints_Delete_MaximumSet_Gen.json - */ - /** - * Sample code: Endpoints_Delete_MaximumSet. - * - * @param manager Entry point to NeonPostgresManager. - */ - public static void endpointsDeleteMaximumSet(com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { - manager.endpoints() - .deleteWithResponse("rgneon", "test-org", "entity-name", "entity-name", "entity-name", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/EndpointsGetSamples.java b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/EndpointsGetSamples.java deleted file mode 100644 index 007693085a48..000000000000 --- a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/EndpointsGetSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.neonpostgres.generated; - -/** - * Samples for Endpoints Get. - */ -public final class EndpointsGetSamples { - /* - * x-ms-original-file: 2025-03-01/Endpoints_Get_MaximumSet_Gen.json - */ - /** - * Sample code: Endpoints_Get_MaximumSet. - * - * @param manager Entry point to NeonPostgresManager. - */ - public static void endpointsGetMaximumSet(com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { - manager.endpoints() - .getWithResponse("rgneon", "test-org", "entity-name", "entity-name", "entity-name", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/EndpointsListSamples.java b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/EndpointsListSamples.java index 329099b7d9b3..17b5c7794c08 100644 --- a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/EndpointsListSamples.java +++ b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/EndpointsListSamples.java @@ -12,11 +12,13 @@ public final class EndpointsListSamples { * x-ms-original-file: 2025-03-01/Endpoints_List_MaximumSet_Gen.json */ /** - * Sample code: Endpoints_List_MaximumSet. + * Sample code: Endpoints_List_MaximumSet - generated by [MaximumSet] rule - generated by [MaximumSet] rule. * * @param manager Entry point to NeonPostgresManager. */ - public static void endpointsListMaximumSet(com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { - manager.endpoints().list("rgneon", "test-org", "entity-name", "entity-name", com.azure.core.util.Context.NONE); + public static void endpointsListMaximumSetGeneratedByMaximumSetRuleGeneratedByMaximumSetRule( + com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { + manager.endpoints() + .list("rgneon", "contoso-org", "sample-resource", "sample-resource", com.azure.core.util.Context.NONE); } } diff --git a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/EndpointsUpdateSamples.java b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/EndpointsUpdateSamples.java deleted file mode 100644 index 4dcc22568023..000000000000 --- a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/EndpointsUpdateSamples.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.neonpostgres.generated; - -import com.azure.resourcemanager.neonpostgres.models.Attributes; -import com.azure.resourcemanager.neonpostgres.models.Endpoint; -import com.azure.resourcemanager.neonpostgres.models.EndpointProperties; -import com.azure.resourcemanager.neonpostgres.models.EndpointType; -import java.util.Arrays; - -/** - * Samples for Endpoints Update. - */ -public final class EndpointsUpdateSamples { - /* - * x-ms-original-file: 2025-03-01/Endpoints_Update_MaximumSet_Gen.json - */ - /** - * Sample code: Endpoints_Update_MaximumSet. - * - * @param manager Entry point to NeonPostgresManager. - */ - public static void endpointsUpdateMaximumSet(com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { - Endpoint resource = manager.endpoints() - .getWithResponse("rgneon", "test-org", "entity-name", "entity-name", "entity-name", - com.azure.core.util.Context.NONE) - .getValue(); - resource.update() - .withProperties(new EndpointProperties().withEntityName("entity-name") - .withAttributes(Arrays.asList(new Attributes().withName("trhvzyvaqy").withValue("evpkgsskyavybxwwssm"))) - .withProjectId("rtvdeeflqzlrpfzhjqhcsfbldw") - .withBranchId("rzsyrhpfbydxtfkpaa") - .withEndpointType(EndpointType.READ_ONLY)) - .apply(); - } -} diff --git a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/NeonDatabasesCreateOrUpdateSamples.java b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/NeonDatabasesCreateOrUpdateSamples.java deleted file mode 100644 index 5fcf5b17f603..000000000000 --- a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/NeonDatabasesCreateOrUpdateSamples.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.neonpostgres.generated; - -import com.azure.resourcemanager.neonpostgres.models.Attributes; -import com.azure.resourcemanager.neonpostgres.models.NeonDatabaseProperties; -import java.util.Arrays; - -/** - * Samples for NeonDatabases CreateOrUpdate. - */ -public final class NeonDatabasesCreateOrUpdateSamples { - /* - * x-ms-original-file: 2025-03-01/NeonDatabases_CreateOrUpdate_MaximumSet_Gen.json - */ - /** - * Sample code: NeonDatabases_CreateOrUpdate_MaximumSet. - * - * @param manager Entry point to NeonPostgresManager. - */ - public static void - neonDatabasesCreateOrUpdateMaximumSet(com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { - manager.neonDatabases() - .define("entity-name") - .withExistingBranche("rgneon", "test-org", "entity-name", "entity-name") - .withProperties(new NeonDatabaseProperties().withEntityName("entity-name") - .withAttributes(Arrays.asList(new Attributes().withName("trhvzyvaqy").withValue("evpkgsskyavybxwwssm"))) - .withBranchId("orfdwdmzvfvlnrgussvcvoek") - .withOwnerName("odmbeg")) - .create(); - } -} diff --git a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/NeonDatabasesDeleteSamples.java b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/NeonDatabasesDeleteSamples.java deleted file mode 100644 index 1368d611a117..000000000000 --- a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/NeonDatabasesDeleteSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.neonpostgres.generated; - -/** - * Samples for NeonDatabases Delete. - */ -public final class NeonDatabasesDeleteSamples { - /* - * x-ms-original-file: 2025-03-01/NeonDatabases_Delete_MaximumSet_Gen.json - */ - /** - * Sample code: NeonDatabases_Delete_MaximumSet. - * - * @param manager Entry point to NeonPostgresManager. - */ - public static void - neonDatabasesDeleteMaximumSet(com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { - manager.neonDatabases() - .deleteWithResponse("rgneon", "test-org", "entity-name", "entity-name", "entity-name", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/NeonDatabasesGetSamples.java b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/NeonDatabasesGetSamples.java deleted file mode 100644 index fe42a13f50ed..000000000000 --- a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/NeonDatabasesGetSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.neonpostgres.generated; - -/** - * Samples for NeonDatabases Get. - */ -public final class NeonDatabasesGetSamples { - /* - * x-ms-original-file: 2025-03-01/NeonDatabases_Get_MaximumSet_Gen.json - */ - /** - * Sample code: NeonDatabases_Get_MaximumSet. - * - * @param manager Entry point to NeonPostgresManager. - */ - public static void neonDatabasesGetMaximumSet(com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { - manager.neonDatabases() - .getWithResponse("rgneon", "test-org", "entity-name", "entity-name", "entity-name", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/NeonDatabasesListSamples.java b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/NeonDatabasesListSamples.java index 8a95b8b8b9c5..f2097d4a4214 100644 --- a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/NeonDatabasesListSamples.java +++ b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/NeonDatabasesListSamples.java @@ -12,12 +12,13 @@ public final class NeonDatabasesListSamples { * x-ms-original-file: 2025-03-01/NeonDatabases_List_MaximumSet_Gen.json */ /** - * Sample code: NeonDatabases_List_MaximumSet. + * Sample code: NeonDatabases_List_MaximumSet - generated by [MaximumSet] rule - generated by [MaximumSet] rule. * * @param manager Entry point to NeonPostgresManager. */ - public static void neonDatabasesListMaximumSet(com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { + public static void neonDatabasesListMaximumSetGeneratedByMaximumSetRuleGeneratedByMaximumSetRule( + com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { manager.neonDatabases() - .list("rgneon", "test-org", "entity-name", "entity-name", com.azure.core.util.Context.NONE); + .list("rgneon", "contoso-org", "sample-resource", "sample-resource", com.azure.core.util.Context.NONE); } } diff --git a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/NeonDatabasesUpdateSamples.java b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/NeonDatabasesUpdateSamples.java deleted file mode 100644 index a3ea19a1a145..000000000000 --- a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/NeonDatabasesUpdateSamples.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.neonpostgres.generated; - -import com.azure.resourcemanager.neonpostgres.models.Attributes; -import com.azure.resourcemanager.neonpostgres.models.NeonDatabase; -import com.azure.resourcemanager.neonpostgres.models.NeonDatabaseProperties; -import java.util.Arrays; - -/** - * Samples for NeonDatabases Update. - */ -public final class NeonDatabasesUpdateSamples { - /* - * x-ms-original-file: 2025-03-01/NeonDatabases_Update_MaximumSet_Gen.json - */ - /** - * Sample code: NeonDatabases_Update_MaximumSet. - * - * @param manager Entry point to NeonPostgresManager. - */ - public static void - neonDatabasesUpdateMaximumSet(com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { - NeonDatabase resource = manager.neonDatabases() - .getWithResponse("rgneon", "test-org", "entity-name", "entity-name", "entity-name", - com.azure.core.util.Context.NONE) - .getValue(); - resource.update() - .withProperties(new NeonDatabaseProperties().withEntityName("entity-name") - .withAttributes(Arrays.asList(new Attributes().withName("trhvzyvaqy").withValue("evpkgsskyavybxwwssm"))) - .withBranchId("orfdwdmzvfvlnrgussvcvoek") - .withOwnerName("odmbeg")) - .apply(); - } -} diff --git a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/NeonRolesCreateOrUpdateSamples.java b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/NeonRolesCreateOrUpdateSamples.java deleted file mode 100644 index a3d99da837a2..000000000000 --- a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/NeonRolesCreateOrUpdateSamples.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.neonpostgres.generated; - -import com.azure.resourcemanager.neonpostgres.models.Attributes; -import com.azure.resourcemanager.neonpostgres.models.NeonRoleProperties; -import java.util.Arrays; - -/** - * Samples for NeonRoles CreateOrUpdate. - */ -public final class NeonRolesCreateOrUpdateSamples { - /* - * x-ms-original-file: 2025-03-01/NeonRoles_CreateOrUpdate_MaximumSet_Gen.json - */ - /** - * Sample code: NeonRoles_CreateOrUpdate_MaximumSet. - * - * @param manager Entry point to NeonPostgresManager. - */ - public static void - neonRolesCreateOrUpdateMaximumSet(com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { - manager.neonRoles() - .define("entity-name") - .withExistingBranche("rgneon", "test-org", "entity-name", "entity-name") - .withProperties(new NeonRoleProperties().withEntityName("entity-name") - .withAttributes(Arrays.asList(new Attributes().withName("trhvzyvaqy").withValue("evpkgsskyavybxwwssm"))) - .withBranchId("wxbojkmdgaggkfiwqfakdkbyztm") - .withPermissions(Arrays.asList("myucqecpjriewzohxvadgkhiudnyx")) - .withIsSuperUser(true)) - .create(); - } -} diff --git a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/NeonRolesDeleteSamples.java b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/NeonRolesDeleteSamples.java deleted file mode 100644 index 7abfc83062b4..000000000000 --- a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/NeonRolesDeleteSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.neonpostgres.generated; - -/** - * Samples for NeonRoles Delete. - */ -public final class NeonRolesDeleteSamples { - /* - * x-ms-original-file: 2025-03-01/NeonRoles_Delete_MaximumSet_Gen.json - */ - /** - * Sample code: NeonRoles_Delete_MaximumSet. - * - * @param manager Entry point to NeonPostgresManager. - */ - public static void neonRolesDeleteMaximumSet(com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { - manager.neonRoles() - .deleteWithResponse("rgneon", "test-org", "entity-name", "entity-name", "entity-name", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/NeonRolesGetSamples.java b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/NeonRolesGetSamples.java deleted file mode 100644 index 2a5abd36695e..000000000000 --- a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/NeonRolesGetSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.neonpostgres.generated; - -/** - * Samples for NeonRoles Get. - */ -public final class NeonRolesGetSamples { - /* - * x-ms-original-file: 2025-03-01/NeonRoles_Get_MaximumSet_Gen.json - */ - /** - * Sample code: NeonRoles_Get_MaximumSet. - * - * @param manager Entry point to NeonPostgresManager. - */ - public static void neonRolesGetMaximumSet(com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { - manager.neonRoles() - .getWithResponse("rgneon", "test-org", "entity-name", "entity-name", "entity-name", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/NeonRolesListSamples.java b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/NeonRolesListSamples.java index bc717659205b..041caf94efa2 100644 --- a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/NeonRolesListSamples.java +++ b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/NeonRolesListSamples.java @@ -12,11 +12,13 @@ public final class NeonRolesListSamples { * x-ms-original-file: 2025-03-01/NeonRoles_List_MaximumSet_Gen.json */ /** - * Sample code: NeonRoles_List_MaximumSet. + * Sample code: NeonRoles_List_MaximumSet - generated by [MaximumSet] rule - generated by [MaximumSet] rule. * * @param manager Entry point to NeonPostgresManager. */ - public static void neonRolesListMaximumSet(com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { - manager.neonRoles().list("rgneon", "test-org", "entity-name", "entity-name", com.azure.core.util.Context.NONE); + public static void neonRolesListMaximumSetGeneratedByMaximumSetRuleGeneratedByMaximumSetRule( + com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { + manager.neonRoles() + .list("rgneon", "contoso-org", "sample-resource", "sample-resource", com.azure.core.util.Context.NONE); } } diff --git a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/NeonRolesUpdateSamples.java b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/NeonRolesUpdateSamples.java deleted file mode 100644 index 447bbc2c4f8c..000000000000 --- a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/NeonRolesUpdateSamples.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.neonpostgres.generated; - -import com.azure.resourcemanager.neonpostgres.models.Attributes; -import com.azure.resourcemanager.neonpostgres.models.NeonRole; -import com.azure.resourcemanager.neonpostgres.models.NeonRoleProperties; -import java.util.Arrays; - -/** - * Samples for NeonRoles Update. - */ -public final class NeonRolesUpdateSamples { - /* - * x-ms-original-file: 2025-03-01/NeonRoles_Update_MaximumSet_Gen.json - */ - /** - * Sample code: NeonRoles_Update_MaximumSet. - * - * @param manager Entry point to NeonPostgresManager. - */ - public static void neonRolesUpdateMaximumSet(com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { - NeonRole resource = manager.neonRoles() - .getWithResponse("rgneon", "test-org", "entity-name", "entity-name", "entity-name", - com.azure.core.util.Context.NONE) - .getValue(); - resource.update() - .withProperties(new NeonRoleProperties().withEntityName("entity-name") - .withAttributes(Arrays.asList(new Attributes().withName("trhvzyvaqy").withValue("evpkgsskyavybxwwssm"))) - .withBranchId("wxbojkmdgaggkfiwqfakdkbyztm") - .withPermissions(Arrays.asList("myucqecpjriewzohxvadgkhiudnyx")) - .withIsSuperUser(true)) - .apply(); - } -} diff --git a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/OperationsListSamples.java b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/OperationsListSamples.java index 07f1088191b0..0dd7308ba98a 100644 --- a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/OperationsListSamples.java +++ b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/OperationsListSamples.java @@ -12,11 +12,12 @@ public final class OperationsListSamples { * x-ms-original-file: 2025-03-01/Operations_List_MinimumSet_Gen.json */ /** - * Sample code: Operations_List_MinimumSet. + * Sample code: Operations_List_MaximumSet - generated by [MaximumSet] rule - generated by [MinimumSet] rule. * * @param manager Entry point to NeonPostgresManager. */ - public static void operationsListMinimumSet(com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { + public static void operationsListMaximumSetGeneratedByMaximumSetRuleGeneratedByMinimumSetRule( + com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { manager.operations().list(com.azure.core.util.Context.NONE); } @@ -24,11 +25,12 @@ public static void operationsListMinimumSet(com.azure.resourcemanager.neonpostgr * x-ms-original-file: 2025-03-01/Operations_List_MaximumSet_Gen.json */ /** - * Sample code: Operations_List_MaximumSet. + * Sample code: Operations_List_MaximumSet - generated by [MaximumSet] rule - generated by [MaximumSet] rule. * * @param manager Entry point to NeonPostgresManager. */ - public static void operationsListMaximumSet(com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { + public static void operationsListMaximumSetGeneratedByMaximumSetRuleGeneratedByMaximumSetRule( + com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { manager.operations().list(com.azure.core.util.Context.NONE); } } diff --git a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/OrganizationsCreateOrUpdateSamples.java b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/OrganizationsCreateOrUpdateSamples.java index dc353f15d280..7f335be1e0fa 100644 --- a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/OrganizationsCreateOrUpdateSamples.java +++ b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/OrganizationsCreateOrUpdateSamples.java @@ -33,17 +33,18 @@ public final class OrganizationsCreateOrUpdateSamples { * x-ms-original-file: 2025-03-01/Organizations_CreateOrUpdate_MaximumSet_Gen.json */ /** - * Sample code: Organizations_CreateOrUpdate_MaximumSet. + * Sample code: Organizations_CreateOrUpdate_MaximumSet - generated by [MaximumSet] rule - generated by [MaximumSet] + * rule. * * @param manager Entry point to NeonPostgresManager. */ - public static void - organizationsCreateOrUpdateMaximumSet(com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { + public static void organizationsCreateOrUpdateMaximumSetGeneratedByMaximumSetRuleGeneratedByMaximumSetRule( + com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { manager.organizations() - .define("test-org") + .define("contoso-org") .withRegion("kcdph") .withExistingResourceGroup("rgneon") - .withTags(mapOf("key8832", "fakeTokenPlaceholder")) + .withTags(mapOf()) .withProperties(new OrganizationProperties() .withMarketplaceDetails(new MarketplaceDetails().withSubscriptionId("xfahbbbzwlcwhhjbxarnwfcy") .withSubscriptionStatus(MarketplaceSubscriptionStatus.PENDING_FULFILLMENT_START) diff --git a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/OrganizationsDeleteSamples.java b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/OrganizationsDeleteSamples.java index 7ed469dc9887..c6aa81652f22 100644 --- a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/OrganizationsDeleteSamples.java +++ b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/OrganizationsDeleteSamples.java @@ -12,12 +12,12 @@ public final class OrganizationsDeleteSamples { * x-ms-original-file: 2025-03-01/Organizations_Delete_MaximumSet_Gen.json */ /** - * Sample code: Organizations_Delete_MaximumSet. + * Sample code: Organizations_Delete_MaximumSet - generated by [MaximumSet] rule - generated by [MaximumSet] rule. * * @param manager Entry point to NeonPostgresManager. */ - public static void - organizationsDeleteMaximumSet(com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { - manager.organizations().delete("rgneon", "test-org", com.azure.core.util.Context.NONE); + public static void organizationsDeleteMaximumSetGeneratedByMaximumSetRuleGeneratedByMaximumSetRule( + com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { + manager.organizations().delete("rgneon", "contoso-org", com.azure.core.util.Context.NONE); } } diff --git a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/OrganizationsGetByResourceGroupSamples.java b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/OrganizationsGetByResourceGroupSamples.java index 0566d0b9d9db..d6d7523883b3 100644 --- a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/OrganizationsGetByResourceGroupSamples.java +++ b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/OrganizationsGetByResourceGroupSamples.java @@ -12,11 +12,13 @@ public final class OrganizationsGetByResourceGroupSamples { * x-ms-original-file: 2025-03-01/Organizations_Get_MaximumSet_Gen.json */ /** - * Sample code: Organizations_Get_MaximumSet. + * Sample code: Organizations_Get_MaximumSet - generated by [MaximumSet] rule - generated by [MaximumSet] rule. * * @param manager Entry point to NeonPostgresManager. */ - public static void organizationsGetMaximumSet(com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { - manager.organizations().getByResourceGroupWithResponse("rgneon", "test-org", com.azure.core.util.Context.NONE); + public static void organizationsGetMaximumSetGeneratedByMaximumSetRuleGeneratedByMaximumSetRule( + com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { + manager.organizations() + .getByResourceGroupWithResponse("rgneon", "contoso-org", com.azure.core.util.Context.NONE); } } diff --git a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/OrganizationsGetPostgresVersionsSamples.java b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/OrganizationsGetPostgresVersionsSamples.java index 6ffdf198a4c0..bdc7f5230562 100644 --- a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/OrganizationsGetPostgresVersionsSamples.java +++ b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/OrganizationsGetPostgresVersionsSamples.java @@ -14,12 +14,13 @@ public final class OrganizationsGetPostgresVersionsSamples { * x-ms-original-file: 2025-03-01/Organizations_GetPostgresVersions_MaximumSet_Gen.json */ /** - * Sample code: Organizations_GetPostgresVersions_MaximumSet. + * Sample code: Organizations_GetPostgresVersions_MaximumSet - generated by [MaximumSet] rule - generated by + * [MaximumSet] rule. * * @param manager Entry point to NeonPostgresManager. */ - public static void - organizationsGetPostgresVersionsMaximumSet(com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { + public static void organizationsGetPostgresVersionsMaximumSetGeneratedByMaximumSetRuleGeneratedByMaximumSetRule( + com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { manager.organizations() .getPostgresVersionsWithResponse("rgneon", new PgVersion().withVersion(7), com.azure.core.util.Context.NONE); @@ -29,12 +30,13 @@ public final class OrganizationsGetPostgresVersionsSamples { * x-ms-original-file: 2025-03-01/Organizations_GetPostgresVersions_MinimumSet_Gen.json */ /** - * Sample code: Organizations_GetPostgresVersions_MinimumSet. + * Sample code: Organizations_GetPostgresVersions_MaximumSet - generated by [MaximumSet] rule - generated by + * [MinimumSet] rule. * * @param manager Entry point to NeonPostgresManager. */ - public static void - organizationsGetPostgresVersionsMinimumSet(com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { + public static void organizationsGetPostgresVersionsMaximumSetGeneratedByMaximumSetRuleGeneratedByMinimumSetRule( + com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { manager.organizations().getPostgresVersionsWithResponse("rgneon", null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/OrganizationsListByResourceGroupSamples.java b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/OrganizationsListByResourceGroupSamples.java index 8cc7fca5977b..d16d22802167 100644 --- a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/OrganizationsListByResourceGroupSamples.java +++ b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/OrganizationsListByResourceGroupSamples.java @@ -8,16 +8,31 @@ * Samples for Organizations ListByResourceGroup. */ public final class OrganizationsListByResourceGroupSamples { + /* + * x-ms-original-file: 2025-03-01/Organizations_ListByResourceGroup_MinimumSet_Gen.json + */ + /** + * Sample code: Organizations_ListByResourceGroup_MaximumSet - generated by [MaximumSet] rule - generated by + * [MinimumSet] rule. + * + * @param manager Entry point to NeonPostgresManager. + */ + public static void organizationsListByResourceGroupMaximumSetGeneratedByMaximumSetRuleGeneratedByMinimumSetRule( + com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { + manager.organizations().listByResourceGroup("rgneon", com.azure.core.util.Context.NONE); + } + /* * x-ms-original-file: 2025-03-01/Organizations_ListByResourceGroup_MaximumSet_Gen.json */ /** - * Sample code: Organizations_ListByResourceGroup_MaximumSet. + * Sample code: Organizations_ListByResourceGroup_MaximumSet - generated by [MaximumSet] rule - generated by + * [MaximumSet] rule. * * @param manager Entry point to NeonPostgresManager. */ - public static void - organizationsListByResourceGroupMaximumSet(com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { + public static void organizationsListByResourceGroupMaximumSetGeneratedByMaximumSetRuleGeneratedByMaximumSetRule( + com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { manager.organizations().listByResourceGroup("rgneon", com.azure.core.util.Context.NONE); } } diff --git a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/OrganizationsListSamples.java b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/OrganizationsListSamples.java index b922df4af873..f97f14925bbd 100644 --- a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/OrganizationsListSamples.java +++ b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/OrganizationsListSamples.java @@ -12,12 +12,27 @@ public final class OrganizationsListSamples { * x-ms-original-file: 2025-03-01/Organizations_ListBySubscription_MaximumSet_Gen.json */ /** - * Sample code: Organizations_ListBySubscription_MaximumSet. + * Sample code: Organizations_ListBySubscription_MaximumSet - generated by [MaximumSet] rule - generated by + * [MaximumSet] rule. * * @param manager Entry point to NeonPostgresManager. */ - public static void - organizationsListBySubscriptionMaximumSet(com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { + public static void organizationsListBySubscriptionMaximumSetGeneratedByMaximumSetRuleGeneratedByMaximumSetRule( + com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { + manager.organizations().list(com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-03-01/Organizations_ListBySubscription_MinimumSet_Gen.json + */ + /** + * Sample code: Organizations_ListBySubscription_MaximumSet - generated by [MaximumSet] rule - generated by + * [MinimumSet] rule. + * + * @param manager Entry point to NeonPostgresManager. + */ + public static void organizationsListBySubscriptionMaximumSetGeneratedByMaximumSetRuleGeneratedByMinimumSetRule( + com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { manager.organizations().list(com.azure.core.util.Context.NONE); } } diff --git a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/OrganizationsUpdateSamples.java b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/OrganizationsUpdateSamples.java index 00301c1430eb..b5dea8aa88e1 100644 --- a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/OrganizationsUpdateSamples.java +++ b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/OrganizationsUpdateSamples.java @@ -34,17 +34,17 @@ public final class OrganizationsUpdateSamples { * x-ms-original-file: 2025-03-01/Organizations_Update_MaximumSet_Gen.json */ /** - * Sample code: Organizations_Update_MaximumSet. + * Sample code: Organizations_Update_MaximumSet - generated by [MaximumSet] rule - generated by [MaximumSet] rule. * * @param manager Entry point to NeonPostgresManager. */ - public static void - organizationsUpdateMaximumSet(com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { + public static void organizationsUpdateMaximumSetGeneratedByMaximumSetRuleGeneratedByMaximumSetRule( + com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { OrganizationResource resource = manager.organizations() - .getByResourceGroupWithResponse("rgneon", "test-org", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("rgneon", "contoso-org", com.azure.core.util.Context.NONE) .getValue(); resource.update() - .withTags(mapOf("key609", "fakeTokenPlaceholder")) + .withTags(mapOf()) .withProperties(new OrganizationProperties() .withMarketplaceDetails(new MarketplaceDetails().withSubscriptionId("yxmkfivp") .withSubscriptionStatus(MarketplaceSubscriptionStatus.PENDING_FULFILLMENT_START) diff --git a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/ProjectsCreateOrUpdateSamples.java b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/ProjectsCreateOrUpdateSamples.java index 7fe7309841df..6743dfdb1088 100644 --- a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/ProjectsCreateOrUpdateSamples.java +++ b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/ProjectsCreateOrUpdateSamples.java @@ -22,15 +22,16 @@ public final class ProjectsCreateOrUpdateSamples { * x-ms-original-file: 2025-03-01/Projects_CreateOrUpdate_MaximumSet_Gen.json */ /** - * Sample code: Projects_CreateOrUpdate_MaximumSet. + * Sample code: Projects_CreateOrUpdate_MaximumSet - generated by [MaximumSet] rule - generated by [MaximumSet] + * rule. * * @param manager Entry point to NeonPostgresManager. */ - public static void - projectsCreateOrUpdateMaximumSet(com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { + public static void projectsCreateOrUpdateMaximumSetGeneratedByMaximumSetRuleGeneratedByMaximumSetRule( + com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { manager.projects() - .define("entity-name") - .withExistingOrganization("rgneon", "test-org") + .define("sample-resource") + .withExistingOrganization("rgneon", "contoso-org") .withProperties(new ProjectProperties().withEntityName("entity-name") .withAttributes(Arrays.asList(new Attributes().withName("trhvzyvaqy").withValue("evpkgsskyavybxwwssm"))) .withRegionId("tlcltldfrnxh") diff --git a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/ProjectsDeleteSamples.java b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/ProjectsDeleteSamples.java index bf0e2950fa68..34a7e977e7c4 100644 --- a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/ProjectsDeleteSamples.java +++ b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/ProjectsDeleteSamples.java @@ -12,11 +12,13 @@ public final class ProjectsDeleteSamples { * x-ms-original-file: 2025-03-01/Projects_Delete_MaximumSet_Gen.json */ /** - * Sample code: Projects_Delete_MaximumSet. + * Sample code: Projects_Delete_MaximumSet - generated by [MaximumSet] rule - generated by [MaximumSet] rule. * * @param manager Entry point to NeonPostgresManager. */ - public static void projectsDeleteMaximumSet(com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { - manager.projects().deleteWithResponse("rgneon", "test-org", "entity-name", com.azure.core.util.Context.NONE); + public static void projectsDeleteMaximumSetGeneratedByMaximumSetRuleGeneratedByMaximumSetRule( + com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { + manager.projects() + .deleteWithResponse("rgneon", "contoso-org", "sample-resource", com.azure.core.util.Context.NONE); } } diff --git a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/ProjectsGetConnectionUriSamples.java b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/ProjectsGetConnectionUriSamples.java index 98b662cc9e97..074bf6dea93c 100644 --- a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/ProjectsGetConnectionUriSamples.java +++ b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/ProjectsGetConnectionUriSamples.java @@ -14,14 +14,15 @@ public final class ProjectsGetConnectionUriSamples { * x-ms-original-file: 2025-03-01/Projects_GetConnectionUri_MaximumSet_Gen.json */ /** - * Sample code: Projects_GetConnectionUri_MaximumSet. + * Sample code: Projects_GetConnectionUri_MaximumSet - generated by [MaximumSet] rule - generated by [MaximumSet] + * rule. * * @param manager Entry point to NeonPostgresManager. */ - public static void - projectsGetConnectionUriMaximumSet(com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { + public static void projectsGetConnectionUriMaximumSetGeneratedByMaximumSetRuleGeneratedByMaximumSetRule( + com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { manager.projects() - .getConnectionUriWithResponse("rgneon", "test-org", "entity-name", + .getConnectionUriWithResponse("rgneon", "contoso-org", "sample-resource", new ConnectionUriPropertiesInner().withProjectId("riuifmoqtorrcffgksvfcobia") .withBranchId("iimmlbqv") .withDatabaseName("xc") diff --git a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/ProjectsGetSamples.java b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/ProjectsGetSamples.java index f7fdde946e6c..301a13bd8bc5 100644 --- a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/ProjectsGetSamples.java +++ b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/ProjectsGetSamples.java @@ -12,11 +12,13 @@ public final class ProjectsGetSamples { * x-ms-original-file: 2025-03-01/Projects_Get_MaximumSet_Gen.json */ /** - * Sample code: Projects_Get_MaximumSet. + * Sample code: Projects_Get_MaximumSet - generated by [MaximumSet] rule - generated by [MaximumSet] rule. * * @param manager Entry point to NeonPostgresManager. */ - public static void projectsGetMaximumSet(com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { - manager.projects().getWithResponse("rgneon", "test-org", "entity-name", com.azure.core.util.Context.NONE); + public static void projectsGetMaximumSetGeneratedByMaximumSetRuleGeneratedByMaximumSetRule( + com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { + manager.projects() + .getWithResponse("rgneon", "contoso-org", "sample-resource", com.azure.core.util.Context.NONE); } } diff --git a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/ProjectsListSamples.java b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/ProjectsListSamples.java index 6aef06e841dd..7983ba6fe69f 100644 --- a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/ProjectsListSamples.java +++ b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/ProjectsListSamples.java @@ -12,11 +12,12 @@ public final class ProjectsListSamples { * x-ms-original-file: 2025-03-01/Projects_List_MaximumSet_Gen.json */ /** - * Sample code: Projects_List_MaximumSet. + * Sample code: Projects_List_MaximumSet - generated by [MaximumSet] rule - generated by [MaximumSet] rule. * * @param manager Entry point to NeonPostgresManager. */ - public static void projectsListMaximumSet(com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { - manager.projects().list("rgneon", "test-org", com.azure.core.util.Context.NONE); + public static void projectsListMaximumSetGeneratedByMaximumSetRuleGeneratedByMaximumSetRule( + com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { + manager.projects().list("rgneon", "contoso-org", com.azure.core.util.Context.NONE); } } diff --git a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/ProjectsUpdateSamples.java b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/ProjectsUpdateSamples.java deleted file mode 100644 index 06fa9b0fd4e0..000000000000 --- a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/samples/java/com/azure/resourcemanager/neonpostgres/generated/ProjectsUpdateSamples.java +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.neonpostgres.generated; - -import com.azure.resourcemanager.neonpostgres.models.Attributes; -import com.azure.resourcemanager.neonpostgres.models.BranchProperties; -import com.azure.resourcemanager.neonpostgres.models.DefaultEndpointSettings; -import com.azure.resourcemanager.neonpostgres.models.EndpointProperties; -import com.azure.resourcemanager.neonpostgres.models.EndpointType; -import com.azure.resourcemanager.neonpostgres.models.NeonDatabaseProperties; -import com.azure.resourcemanager.neonpostgres.models.NeonRoleProperties; -import com.azure.resourcemanager.neonpostgres.models.Project; -import com.azure.resourcemanager.neonpostgres.models.ProjectProperties; -import java.util.Arrays; - -/** - * Samples for Projects Update. - */ -public final class ProjectsUpdateSamples { - /* - * x-ms-original-file: 2025-03-01/Projects_Update_MaximumSet_Gen.json - */ - /** - * Sample code: Projects_Update_MaximumSet. - * - * @param manager Entry point to NeonPostgresManager. - */ - public static void projectsUpdateMaximumSet(com.azure.resourcemanager.neonpostgres.NeonPostgresManager manager) { - Project resource = manager.projects() - .getWithResponse("rgneon", "test-org", "test-project", com.azure.core.util.Context.NONE) - .getValue(); - resource.update() - .withProperties(new ProjectProperties().withEntityName("entity-name") - .withAttributes(Arrays.asList(new Attributes().withName("trhvzyvaqy").withValue("evpkgsskyavybxwwssm"))) - .withRegionId("vxvmjwuttpiakirzdf") - .withStorage(23L) - .withPgVersion(16) - .withHistoryRetention(16) - .withDefaultEndpointSettings( - new DefaultEndpointSettings().withAutoscalingLimitMinCu(8.0).withAutoscalingLimitMaxCu(4.0)) - .withBranch(new BranchProperties().withEntityName("entity-name") - .withAttributes( - Arrays.asList(new Attributes().withName("trhvzyvaqy").withValue("evpkgsskyavybxwwssm"))) - .withProjectId("oik") - .withParentId("entity-id") - .withRoleName("qrrairsupyosxnqotdwhbpc") - .withDatabaseName("duhxebzhd") - .withRoles(Arrays.asList(new NeonRoleProperties().withEntityName("entity-name") - .withAttributes( - Arrays.asList(new Attributes().withName("trhvzyvaqy").withValue("evpkgsskyavybxwwssm"))) - .withBranchId("wxbojkmdgaggkfiwqfakdkbyztm") - .withPermissions(Arrays.asList("myucqecpjriewzohxvadgkhiudnyx")) - .withIsSuperUser(true))) - .withDatabases(Arrays.asList(new NeonDatabaseProperties().withEntityName("entity-name") - .withAttributes( - Arrays.asList(new Attributes().withName("trhvzyvaqy").withValue("evpkgsskyavybxwwssm"))) - .withBranchId("orfdwdmzvfvlnrgussvcvoek") - .withOwnerName("odmbeg"))) - .withEndpoints(Arrays.asList(new EndpointProperties().withEntityName("entity-name") - .withAttributes( - Arrays.asList(new Attributes().withName("trhvzyvaqy").withValue("evpkgsskyavybxwwssm"))) - .withProjectId("rtvdeeflqzlrpfzhjqhcsfbldw") - .withBranchId("rzsyrhpfbydxtfkpaa") - .withEndpointType(EndpointType.READ_ONLY)))) - .withRoles(Arrays.asList(new NeonRoleProperties().withEntityName("entity-name") - .withAttributes( - Arrays.asList(new Attributes().withName("trhvzyvaqy").withValue("evpkgsskyavybxwwssm"))) - .withBranchId("wxbojkmdgaggkfiwqfakdkbyztm") - .withPermissions(Arrays.asList("myucqecpjriewzohxvadgkhiudnyx")) - .withIsSuperUser(true))) - .withDatabases(Arrays.asList(new NeonDatabaseProperties().withEntityName("entity-name") - .withAttributes( - Arrays.asList(new Attributes().withName("trhvzyvaqy").withValue("evpkgsskyavybxwwssm"))) - .withBranchId("orfdwdmzvfvlnrgussvcvoek") - .withOwnerName("odmbeg"))) - .withEndpoints(Arrays.asList(new EndpointProperties().withEntityName("entity-name") - .withAttributes( - Arrays.asList(new Attributes().withName("trhvzyvaqy").withValue("evpkgsskyavybxwwssm"))) - .withProjectId("rtvdeeflqzlrpfzhjqhcsfbldw") - .withBranchId("rzsyrhpfbydxtfkpaa") - .withEndpointType(EndpointType.READ_ONLY)))) - .apply(); - } -} diff --git a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/BranchesCreateOrUpdateMockTests.java b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/BranchesCreateOrUpdateMockTests.java index 7b3e52f96ef1..f23bcd0a1f2f 100644 --- a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/BranchesCreateOrUpdateMockTests.java +++ b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/BranchesCreateOrUpdateMockTests.java @@ -28,7 +28,7 @@ public final class BranchesCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"properties\":{\"entityId\":\"xvzfffhtjnwos\",\"entityName\":\"fjxtvlxxzqfc\",\"createdAt\":\"riomxeezwyhj\",\"provisioningState\":\"Succeeded\",\"attributes\":[{\"name\":\"egmxdbsohc\",\"value\":\"hpyvdkgdet\"}],\"projectId\":\"wcanzbjekwuyckyv\",\"parentId\":\"nsm\",\"roleName\":\"fiwjbctvbp\",\"databaseName\":\"jqjtotd\",\"roles\":[{\"entityId\":\"cslhwuusi\",\"entityName\":\"ktybh\",\"createdAt\":\"xidhhxomil\",\"provisioningState\":\"Failed\",\"attributes\":[{\"name\":\"d\",\"value\":\"gxwjwil\"}],\"branchId\":\"rslaatep\",\"permissions\":[\"jjzgxqgqw\",\"xr\"],\"isSuperUser\":false}],\"databases\":[{\"entityId\":\"tqqykbkkteozejog\",\"entityName\":\"orvvmvmcofnqh\",\"createdAt\":\"snosnqliwkmzojf\",\"provisioningState\":\"Succeeded\",\"attributes\":[{\"name\":\"htgmknazgbj\",\"value\":\"hrp\"},{\"name\":\"iqstt\",\"value\":\"ucrcmmai\"}],\"branchId\":\"qjiwifhbksldttoh\",\"ownerName\":\"lna\"},{\"entityId\":\"tgs\",\"entityName\":\"ikvllrhtpmgl\",\"createdAt\":\"oi\",\"provisioningState\":\"Failed\",\"attributes\":[{\"name\":\"wrqkza\",\"value\":\"bun\"}],\"branchId\":\"aklwzlwee\",\"ownerName\":\"nejzltkaszfjsxs\"},{\"entityId\":\"dux\",\"entityName\":\"grcqebmvrdj\",\"createdAt\":\"lnwsbvvdlsf\",\"provisioningState\":\"Canceled\",\"attributes\":[{\"name\":\"sdfedsbgzancoin\",\"value\":\"phymc\"},{\"name\":\"i\",\"value\":\"kltvdhqnufbx\"}],\"branchId\":\"iibntojo\",\"ownerName\":\"nybydhuihaouwud\"}],\"endpoints\":[{\"entityId\":\"rhjkehw\",\"entityName\":\"mosqircamqprlob\",\"createdAt\":\"gejcvjkjyczc\",\"provisioningState\":\"Failed\",\"attributes\":[{\"name\":\"lajdyoljeqyxq\",\"value\":\"mzsizzhravrcjk\"},{\"name\":\"ymgqbgcx\",\"value\":\"nqxgz\"}],\"projectId\":\"er\",\"branchId\":\"merghski\",\"endpointType\":\"read_write\"},{\"entityId\":\"upkcbkfukdljqnvt\",\"entityName\":\"ydsh\",\"createdAt\":\"afyalo\",\"provisioningState\":\"Succeeded\",\"attributes\":[{\"name\":\"zznyufpqzstifg\",\"value\":\"fyjfd\"}],\"projectId\":\"iyvndjokgwes\",\"branchId\":\"zqhrqpfzlpejtznx\",\"endpointType\":\"read_only\"},{\"entityId\":\"ujqbbgsimwejl\",\"entityName\":\"kbpjzobdwbcpra\",\"createdAt\":\"kuhydtnaczkfwfat\",\"provisioningState\":\"Canceled\",\"attributes\":[{\"name\":\"nskivdwgt\",\"value\":\"cumecsaaqg\"},{\"name\":\"qbdiuycsbskowkr\",\"value\":\"hzhrbkhtm\"},{\"name\":\"owiuasfgq\",\"value\":\"ucyhfaimq\"},{\"name\":\"druozk\",\"value\":\"yfpeoehgfmqmsk\"}],\"projectId\":\"xvlzjxplhpevasyn\",\"branchId\":\"zjyielbqrvv\",\"endpointType\":\"read_write\"},{\"entityId\":\"nmpecqxgiqasifub\",\"entityName\":\"nstlpwqpjn\",\"createdAt\":\"khtupsvyou\",\"provisioningState\":\"Failed\",\"attributes\":[{\"name\":\"xfwkz\",\"value\":\"smsfbevyllznf\"},{\"name\":\"kqytkztadopgfzdg\",\"value\":\"fcycrsvlo\"},{\"name\":\"yhigqkzjuqwqaj\",\"value\":\"uzxp\"}],\"projectId\":\"hyoipnfdbgso\",\"branchId\":\"ienezf\",\"endpointType\":\"read_only\"}]},\"id\":\"n\",\"name\":\"fkbpjn\",\"type\":\"tekwwnthropm\"}"; + = "{\"properties\":{\"entityId\":\"dejkluxxrwzobuz\",\"entityName\":\"xga\",\"createdAt\":\"dtkwppth\",\"provisioningState\":\"Succeeded\",\"attributes\":[{\"name\":\"mimrljdpoqfxyemh\",\"value\":\"ftb\"},{\"name\":\"ewhtec\",\"value\":\"oamfmxtllfltymqc\"},{\"name\":\"rrfijhgg\",\"value\":\"bqbgamklilirwdv\"},{\"name\":\"fhsdpzouhkt\",\"value\":\"rxqwqnjxrd\"}],\"projectId\":\"dtullygtavczcxdf\",\"parentId\":\"a\",\"roleName\":\"fmlxrljphr\",\"databaseName\":\"pifleimixl\",\"roles\":[{\"entityId\":\"icehfgsmdrjuqb\",\"entityName\":\"tokljmtznpaxw\",\"createdAt\":\"tyyqiprcltungb\",\"provisioningState\":\"Failed\",\"attributes\":[{\"name\":\"kmii\",\"value\":\"zbkuckgkdsksw\"},{\"name\":\"iiqqcqikclsmalns\",\"value\":\"woykdnonaaxwm\"}],\"branchId\":\"ru\",\"permissions\":[\"cwnynlleiq\",\"cbgvsbt\"],\"isSuperUser\":true}],\"databases\":[{\"entityId\":\"adhx\",\"entityName\":\"jhxmnrqst\",\"createdAt\":\"metwml\",\"provisioningState\":\"Failed\",\"attributes\":[{\"name\":\"pvv\",\"value\":\"hgjnaq\"},{\"name\":\"qipslz\",\"value\":\"vcdsvm\"},{\"name\":\"bit\",\"value\":\"kdtfo\"}],\"branchId\":\"fiybxqich\",\"ownerName\":\"bfzdqekiv\"}],\"endpoints\":[{\"entityId\":\"cv\",\"entityName\":\"zulrqt\",\"createdAt\":\"trezpzlpryfmxmdu\",\"provisioningState\":\"Canceled\",\"attributes\":[{\"name\":\"il\",\"value\":\"oudccgndjg\"}],\"projectId\":\"r\",\"branchId\":\"gqqyeqfcbuulpyuf\",\"endpointType\":\"read_write\"}]},\"id\":\"shtujcyoh\",\"name\":\"gimwdcsklkqnqv\",\"type\":\"ixnmbz\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -38,94 +38,63 @@ public void testCreateOrUpdate() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); Branch response = manager.branches() - .define("pajtfeyvkbd") - .withExistingProject("pryjfzih", "io", "eo") - .withProperties(new BranchProperties().withEntityName("xbeuuqu") - .withAttributes(Arrays.asList(new Attributes().withName("deg").withValue("dydhqkkkb"), - new Attributes().withName("uckcatuqbhpow").withValue("n"), - new Attributes().withName("tpzdlyseidto").withValue("katprytgrhzbq"), - new Attributes().withName("d").withValue("fa"))) - .withProjectId("ptvcs") - .withParentId("kutzct") - .withRoleName("qgdirda") - .withDatabaseName("tzjgcfjfxtbwj") - .withRoles(Arrays.asList( - new NeonRoleProperties().withEntityName("uoft") - .withAttributes(Arrays.asList(new Attributes().withName("zenlrstgfcz").withValue("j"), - new Attributes().withName("n").withValue("idt"), - new Attributes().withName("vamyyznmrgcdo").withValue("cvucgytoxu"))) - .withBranchId("ttnzqsaq") - .withPermissions(Arrays.asList("gszplus", "ekpdzzmssg", "gvo")) - .withIsSuperUser(true), - new NeonRoleProperties().withEntityName("nycwz") - .withAttributes(Arrays.asList(new Attributes().withName("kyjtrepw").withValue("wfkcauxuvavcpf"), - new Attributes().withName("dofuckclb").withValue("xlu"))) - .withBranchId("solzwilfngo") - .withPermissions(Arrays.asList("qebuuxjxhfxfjwp")) - .withIsSuperUser(false), - new NeonRoleProperties().withEntityName("mxbmbrwgzzxljbkh") - .withAttributes(Arrays.asList(new Attributes().withName("weqjfyxydgto").withValue("vq"), - new Attributes().withName("vwglgwzpv").withValue("akglhpsesrfga"), - new Attributes().withName("qiy").withValue("vxcgdhyhgoqgs"), - new Attributes().withName("yqyxyjrcbqpbis").withValue("glqjoxtdahneaoov"))) - .withBranchId("jztivfwjlofzek") - .withPermissions(Arrays.asList("mauk", "ajvcfoczhapej")) - .withIsSuperUser(true), - new NeonRoleProperties().withEntityName("hhnoyrzaaoee") - .withAttributes( - Arrays.asList(new Attributes().withName("oxdjxldnaryy").withValue("nzkdolrndwdbvxvz"), - new Attributes().withName("ledoyqxlunkft").withValue("mcxqqxmyzklao"), - new Attributes().withName("n").withValue("ohrvmz"), - new Attributes().withName("qr").withValue("zadi"))) - .withBranchId("nllaslkskh") - .withPermissions(Arrays.asList("pvbaih")) - .withIsSuperUser(false))) - .withDatabases( - Arrays - .asList( - new NeonDatabaseProperties().withEntityName("qgroigbsfsgsaen") - .withAttributes(Arrays - .asList(new Attributes().withName("tryldsxebuhsxr").withValue("nmgsdaluyckhef"))) - .withBranchId("hs") - .withOwnerName("erbgpxeb"), - new NeonDatabaseProperties().withEntityName("pryj") - .withAttributes(Arrays - .asList(new Attributes().withName("vvyljurkepose").withValue("qqylmpctwjwds"))) - .withBranchId("zmk") - .withOwnerName("rxxxoteehkhowgom"))) - .withEndpoints(Arrays.asList(new EndpointProperties().withEntityName("spfeylqlocvvuje") - .withAttributes(Arrays.asList(new Attributes().withName("avxjfiuofpiei").withValue("zlvssq"), - new Attributes().withName("wjopackyhydvik").withValue("fngp"), - new Attributes().withName("illxg").withValue("scizwgsoriobijei"), - new Attributes().withName("dye").withValue("ynhbokayrg"))) - .withProjectId("b") - .withBranchId("opdweoft") + .define("xrk") + .withExistingProject("srgekzyqxadyfhb", "wkhojqttbspvkhg", "aqjsgyzstujr") + .withProperties(new BranchProperties().withEntityName("duyehiiitt") + .withAttributes(Arrays.asList(new Attributes().withName("xdzciggbnvtxofwa").withValue("zyxwhoe"), + new Attributes().withName("moeobdoe").withValue("sfpnimt"), + new Attributes().withName("uuhaue").withValue("nkwmnfeub"), + new Attributes().withName("zjy").withValue("kwfugiphrrkuu"))) + .withProjectId("qdurhzzfopue") + .withParentId("usvwluj") + .withRoleName("wnibittoz") + .withDatabaseName("dqumqvfm") + .withRoles(Arrays.asList(new NeonRoleProperties().withEntityName("vgwy") + .withAttributes(Arrays.asList(new Attributes().withName("ryizwbxgde").withValue("xlayunomir"), + new Attributes().withName("p").withValue("abenqlamwmg"), + new Attributes().withName("way").withValue("f"))) + .withBranchId("bcpjstbhem") + .withPermissions(Arrays.asList("csqsnxfbx")) + .withIsSuperUser(true))) + .withDatabases(Arrays.asList(new NeonDatabaseProperties().withEntityName("axpfobkzhmhj") + .withAttributes(Arrays.asList(new Attributes().withName("rojadhfz").withValue("lraysrkgzky"), + new Attributes().withName("udbkuwpzq").withValue("lcwe"), + new Attributes().withName("kfecjvxf").withValue("qufqizj"), + new Attributes().withName("ppwooaj").withValue("yyjmjjxiz"))) + .withBranchId("xhnzlslekcttgzkj") + .withOwnerName("qpdwad"))) + .withEndpoints(Arrays.asList(new EndpointProperties().withEntityName("jzucwwm") + .withAttributes(Arrays.asList(new Attributes().withName("kbnzxbypfq").withValue("gaixwrgrkkd"), + new Attributes().withName("rfrswqikwep").withValue("ogggicwnxhtfm"), + new Attributes().withName("qbsudzpgchzpg").withValue("qumjdjxhzghgod"))) + .withProjectId("nrceqavfdbdfmmx") + .withBranchId("naj") .withEndpointType(EndpointType.READ_WRITE)))) .create(); - Assertions.assertEquals("fjxtvlxxzqfc", response.properties().entityName()); - Assertions.assertEquals("egmxdbsohc", response.properties().attributes().get(0).name()); - Assertions.assertEquals("hpyvdkgdet", response.properties().attributes().get(0).value()); - Assertions.assertEquals("wcanzbjekwuyckyv", response.properties().projectId()); - Assertions.assertEquals("nsm", response.properties().parentId()); - Assertions.assertEquals("fiwjbctvbp", response.properties().roleName()); - Assertions.assertEquals("jqjtotd", response.properties().databaseName()); - Assertions.assertEquals("ktybh", response.properties().roles().get(0).entityName()); - Assertions.assertEquals("d", response.properties().roles().get(0).attributes().get(0).name()); - Assertions.assertEquals("gxwjwil", response.properties().roles().get(0).attributes().get(0).value()); - Assertions.assertEquals("rslaatep", response.properties().roles().get(0).branchId()); - Assertions.assertEquals("jjzgxqgqw", response.properties().roles().get(0).permissions().get(0)); - Assertions.assertFalse(response.properties().roles().get(0).isSuperUser()); - Assertions.assertEquals("orvvmvmcofnqh", response.properties().databases().get(0).entityName()); - Assertions.assertEquals("htgmknazgbj", response.properties().databases().get(0).attributes().get(0).name()); - Assertions.assertEquals("hrp", response.properties().databases().get(0).attributes().get(0).value()); - Assertions.assertEquals("qjiwifhbksldttoh", response.properties().databases().get(0).branchId()); - Assertions.assertEquals("lna", response.properties().databases().get(0).ownerName()); - Assertions.assertEquals("mosqircamqprlob", response.properties().endpoints().get(0).entityName()); - Assertions.assertEquals("lajdyoljeqyxq", response.properties().endpoints().get(0).attributes().get(0).name()); - Assertions.assertEquals("mzsizzhravrcjk", response.properties().endpoints().get(0).attributes().get(0).value()); - Assertions.assertEquals("er", response.properties().endpoints().get(0).projectId()); - Assertions.assertEquals("merghski", response.properties().endpoints().get(0).branchId()); + Assertions.assertEquals("xga", response.properties().entityName()); + Assertions.assertEquals("mimrljdpoqfxyemh", response.properties().attributes().get(0).name()); + Assertions.assertEquals("ftb", response.properties().attributes().get(0).value()); + Assertions.assertEquals("dtullygtavczcxdf", response.properties().projectId()); + Assertions.assertEquals("a", response.properties().parentId()); + Assertions.assertEquals("fmlxrljphr", response.properties().roleName()); + Assertions.assertEquals("pifleimixl", response.properties().databaseName()); + Assertions.assertEquals("tokljmtznpaxw", response.properties().roles().get(0).entityName()); + Assertions.assertEquals("kmii", response.properties().roles().get(0).attributes().get(0).name()); + Assertions.assertEquals("zbkuckgkdsksw", response.properties().roles().get(0).attributes().get(0).value()); + Assertions.assertEquals("ru", response.properties().roles().get(0).branchId()); + Assertions.assertEquals("cwnynlleiq", response.properties().roles().get(0).permissions().get(0)); + Assertions.assertTrue(response.properties().roles().get(0).isSuperUser()); + Assertions.assertEquals("jhxmnrqst", response.properties().databases().get(0).entityName()); + Assertions.assertEquals("pvv", response.properties().databases().get(0).attributes().get(0).name()); + Assertions.assertEquals("hgjnaq", response.properties().databases().get(0).attributes().get(0).value()); + Assertions.assertEquals("fiybxqich", response.properties().databases().get(0).branchId()); + Assertions.assertEquals("bfzdqekiv", response.properties().databases().get(0).ownerName()); + Assertions.assertEquals("zulrqt", response.properties().endpoints().get(0).entityName()); + Assertions.assertEquals("il", response.properties().endpoints().get(0).attributes().get(0).name()); + Assertions.assertEquals("oudccgndjg", response.properties().endpoints().get(0).attributes().get(0).value()); + Assertions.assertEquals("r", response.properties().endpoints().get(0).projectId()); + Assertions.assertEquals("gqqyeqfcbuulpyuf", response.properties().endpoints().get(0).branchId()); Assertions.assertEquals(EndpointType.READ_WRITE, response.properties().endpoints().get(0).endpointType()); } } diff --git a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/BranchesDeleteWithResponseMockTests.java b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/BranchesDeleteWithResponseMockTests.java index 97a9feea2f6a..2ccbea755b42 100644 --- a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/BranchesDeleteWithResponseMockTests.java +++ b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/BranchesDeleteWithResponseMockTests.java @@ -28,8 +28,7 @@ public void testDeleteWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.branches() - .deleteWithResponse("adeghztldsvc", "djiah", "qymjzucwwmejjqhd", "wvmqxi", - com.azure.core.util.Context.NONE); + .deleteWithResponse("glhphzwx", "tej", "iilhvtozyagj", "nxkbylhyyxgf", com.azure.core.util.Context.NONE); } } diff --git a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/BranchesGetWithResponseMockTests.java b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/BranchesGetWithResponseMockTests.java index fec20baa68a7..6d78360d6c83 100644 --- a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/BranchesGetWithResponseMockTests.java +++ b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/BranchesGetWithResponseMockTests.java @@ -22,7 +22,7 @@ public final class BranchesGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"entityId\":\"gzjxxlf\",\"entityName\":\"lzuqloiwyayyzivr\",\"createdAt\":\"tcdqlh\",\"provisioningState\":\"Failed\",\"attributes\":[{\"name\":\"ktj\",\"value\":\"eifibfiplhx\"}],\"projectId\":\"smyc\",\"parentId\":\"wlyeyz\",\"roleName\":\"dsqcmhnxl\",\"databaseName\":\"uwod\",\"roles\":[{\"entityId\":\"bkvnrpbjrmvg\",\"entityName\":\"plehmumk\",\"createdAt\":\"llcz\",\"provisioningState\":\"Canceled\",\"attributes\":[{\"name\":\"hkgqggoxsst\",\"value\":\"ivrakfrryn\"},{\"name\":\"cwmhlymgnukxrk\",\"value\":\"mjpequlr\"}],\"branchId\":\"audgjtfbclakkucd\",\"permissions\":[\"hczbuto\",\"cgjtirjwayhicqq\",\"wvgwkslvli\",\"edvbiabvnsrge\"],\"isSuperUser\":true}],\"databases\":[{\"entityId\":\"dyfhb\",\"entityName\":\"khojqttbspvk\",\"createdAt\":\"laqjsgyzstujrzx\",\"provisioningState\":\"Succeeded\",\"attributes\":[{\"name\":\"d\",\"value\":\"lduyehiiittugyuq\"},{\"name\":\"rldaxurfqa\",\"value\":\"csozjv\"}],\"branchId\":\"zciggbnvtxofwa\",\"ownerName\":\"yxwhoeamo\"},{\"entityId\":\"bdoeysf\",\"entityName\":\"imtwuuhau\",\"createdAt\":\"nkwmnfeub\",\"provisioningState\":\"Failed\",\"attributes\":[{\"name\":\"kwfugiphrrkuu\",\"value\":\"nqd\"}],\"branchId\":\"hz\",\"ownerName\":\"opueo\"}],\"endpoints\":[{\"entityId\":\"wlujopwnibit\",\"entityName\":\"zt\",\"createdAt\":\"qumqvfmwcaddt\",\"provisioningState\":\"Failed\",\"attributes\":[{\"name\":\"gtvgwyu\",\"value\":\"be\"},{\"name\":\"fnzzryizwbxg\",\"value\":\"ebxlayu\"},{\"name\":\"omirhp\",\"value\":\"abenqlamwmg\"}],\"projectId\":\"ayxflnbcpjstbh\",\"branchId\":\"hcucsqsnx\",\"endpointType\":\"read_only\"},{\"entityId\":\"feapdrbzyvbsuadu\",\"entityName\":\"odkaxpfobkzhm\",\"createdAt\":\"dqltdel\",\"provisioningState\":\"Canceled\",\"attributes\":[{\"name\":\"adhfztlray\",\"value\":\"rkgzkyhudbkuw\"},{\"name\":\"zqxlcwe\",\"value\":\"kfecjvxf\"}],\"projectId\":\"ufqizjvppw\",\"branchId\":\"a\",\"endpointType\":\"read_write\"}]},\"id\":\"jmjjxi\",\"name\":\"xpxhnzlslekc\",\"type\":\"tgzkjtyqpd\"}"; + = "{\"properties\":{\"entityId\":\"qvumspbfsfeqbbe\",\"entityName\":\"cuq\",\"createdAt\":\"yyxmzrmtmvwituw\",\"provisioningState\":\"Failed\",\"attributes\":[{\"name\":\"hcybwf\",\"value\":\"ppoxprcmv\"},{\"name\":\"uujxdii\",\"value\":\"moxrezsvavlrxi\"},{\"name\":\"jmoywlunpipcwybs\",\"value\":\"fncn\"}],\"projectId\":\"tpf\",\"parentId\":\"aebwfwhxorpwa\",\"roleName\":\"zwuge\",\"databaseName\":\"jfccylhtrht\",\"roles\":[{\"entityId\":\"jpwexcdrz\",\"entityName\":\"o\",\"createdAt\":\"zxezmnr\",\"provisioningState\":\"Canceled\",\"attributes\":[{\"name\":\"euxsphlokfpmijp\",\"value\":\"vzvfb\"},{\"name\":\"wbdq\",\"value\":\"fvcgnrglaqr\"},{\"name\":\"yambhb\",\"value\":\"febzxf\"}],\"branchId\":\"qutibhl\",\"permissions\":[\"trvrkpsab\",\"u\",\"vzm\"],\"isSuperUser\":true},{\"entityId\":\"ysvlpyeuukppd\",\"entityName\":\"qb\",\"createdAt\":\"xvhhyqq\",\"provisioningState\":\"Canceled\",\"attributes\":[{\"name\":\"grznmginmtsd\",\"value\":\"xch\"},{\"name\":\"kibmgjymn\",\"value\":\"jca\"}],\"branchId\":\"irwcqzoofjnqjsv\",\"permissions\":[\"bhtleberpy\",\"jeknfqnw\",\"j\"],\"isSuperUser\":false},{\"entityId\":\"kdnjrxgkrhwie\",\"entityName\":\"cpnowaw\",\"createdAt\":\"oehrguqlhfwafbj\",\"provisioningState\":\"Canceled\",\"attributes\":[{\"name\":\"guyfazbkocbygvt\",\"value\":\"rmxkbcjwwdxom\"},{\"name\":\"aw\",\"value\":\"pkeboozflyac\"}],\"branchId\":\"aeda\",\"permissions\":[\"clmgdtw\",\"abdxfkuzb\",\"jecooyvhtu\"],\"isSuperUser\":false},{\"entityId\":\"lniibncg\",\"entityName\":\"dvcdq\",\"createdAt\":\"tzbpyfao\",\"provisioningState\":\"Failed\",\"attributes\":[{\"name\":\"tncwmhjobzrfpr\",\"value\":\"zdcqhyftcvb\"},{\"name\":\"wgwhgkg\",\"value\":\"o\"},{\"name\":\"uoorssatfybipufd\",\"value\":\"xuqbdqnasttuxvz\"},{\"name\":\"q\",\"value\":\"yopbtsixhgvb\"}],\"branchId\":\"mndzt\",\"permissions\":[\"jay\"],\"isSuperUser\":true}],\"databases\":[{\"entityId\":\"eibpgbrhbjdqkn\",\"entityName\":\"nmotpuwnnoh\",\"createdAt\":\"zngocfrjuypwyiul\",\"provisioningState\":\"Failed\",\"attributes\":[{\"name\":\"ugkfhaxttpfsm\",\"value\":\"gsgh\"},{\"name\":\"ucumlddauqml\",\"value\":\"feothxu\"}],\"branchId\":\"igrjdljlkqhvkrbz\",\"ownerName\":\"astax\"}],\"endpoints\":[{\"entityId\":\"uul\",\"entityName\":\"l\",\"createdAt\":\"izwxvs\",\"provisioningState\":\"Succeeded\",\"attributes\":[{\"name\":\"yyskyekgafxczv\",\"value\":\"cckwrtwle\"}],\"projectId\":\"veszrtlhpdhw\",\"branchId\":\"ctac\",\"endpointType\":\"read_write\"},{\"entityId\":\"fmbbfnv\",\"entityName\":\"itzovnkr\",\"createdAt\":\"kls\",\"provisioningState\":\"Succeeded\",\"attributes\":[{\"name\":\"lcoqksyiib\",\"value\":\"yxwb\"},{\"name\":\"bu\",\"value\":\"avqdorbccqcd\"},{\"name\":\"thojvlirknucos\",\"value\":\"wrdtnagzlgpy\"},{\"name\":\"ixihzqj\",\"value\":\"tsmuydqftt\"}],\"projectId\":\"cybdueurgm\",\"branchId\":\"cp\",\"endpointType\":\"read_only\"}]},\"id\":\"ojermhzicsbfdjhy\",\"name\":\"a\",\"type\":\"nyukibx\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,33 +32,32 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); Branch response = manager.branches() - .getWithResponse("lwk", "fowzkroyr", "urxf", "zqjim", com.azure.core.util.Context.NONE) + .getWithResponse("moxfablq", "pwbmwhria", "iwrycgnwplrrb", "hctsbbibti", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("lzuqloiwyayyzivr", response.properties().entityName()); - Assertions.assertEquals("ktj", response.properties().attributes().get(0).name()); - Assertions.assertEquals("eifibfiplhx", response.properties().attributes().get(0).value()); - Assertions.assertEquals("smyc", response.properties().projectId()); - Assertions.assertEquals("wlyeyz", response.properties().parentId()); - Assertions.assertEquals("dsqcmhnxl", response.properties().roleName()); - Assertions.assertEquals("uwod", response.properties().databaseName()); - Assertions.assertEquals("plehmumk", response.properties().roles().get(0).entityName()); - Assertions.assertEquals("hkgqggoxsst", response.properties().roles().get(0).attributes().get(0).name()); - Assertions.assertEquals("ivrakfrryn", response.properties().roles().get(0).attributes().get(0).value()); - Assertions.assertEquals("audgjtfbclakkucd", response.properties().roles().get(0).branchId()); - Assertions.assertEquals("hczbuto", response.properties().roles().get(0).permissions().get(0)); + Assertions.assertEquals("cuq", response.properties().entityName()); + Assertions.assertEquals("hcybwf", response.properties().attributes().get(0).name()); + Assertions.assertEquals("ppoxprcmv", response.properties().attributes().get(0).value()); + Assertions.assertEquals("tpf", response.properties().projectId()); + Assertions.assertEquals("aebwfwhxorpwa", response.properties().parentId()); + Assertions.assertEquals("zwuge", response.properties().roleName()); + Assertions.assertEquals("jfccylhtrht", response.properties().databaseName()); + Assertions.assertEquals("o", response.properties().roles().get(0).entityName()); + Assertions.assertEquals("euxsphlokfpmijp", response.properties().roles().get(0).attributes().get(0).name()); + Assertions.assertEquals("vzvfb", response.properties().roles().get(0).attributes().get(0).value()); + Assertions.assertEquals("qutibhl", response.properties().roles().get(0).branchId()); + Assertions.assertEquals("trvrkpsab", response.properties().roles().get(0).permissions().get(0)); Assertions.assertTrue(response.properties().roles().get(0).isSuperUser()); - Assertions.assertEquals("khojqttbspvk", response.properties().databases().get(0).entityName()); - Assertions.assertEquals("d", response.properties().databases().get(0).attributes().get(0).name()); - Assertions.assertEquals("lduyehiiittugyuq", - response.properties().databases().get(0).attributes().get(0).value()); - Assertions.assertEquals("zciggbnvtxofwa", response.properties().databases().get(0).branchId()); - Assertions.assertEquals("yxwhoeamo", response.properties().databases().get(0).ownerName()); - Assertions.assertEquals("zt", response.properties().endpoints().get(0).entityName()); - Assertions.assertEquals("gtvgwyu", response.properties().endpoints().get(0).attributes().get(0).name()); - Assertions.assertEquals("be", response.properties().endpoints().get(0).attributes().get(0).value()); - Assertions.assertEquals("ayxflnbcpjstbh", response.properties().endpoints().get(0).projectId()); - Assertions.assertEquals("hcucsqsnx", response.properties().endpoints().get(0).branchId()); - Assertions.assertEquals(EndpointType.READ_ONLY, response.properties().endpoints().get(0).endpointType()); + Assertions.assertEquals("nmotpuwnnoh", response.properties().databases().get(0).entityName()); + Assertions.assertEquals("ugkfhaxttpfsm", response.properties().databases().get(0).attributes().get(0).name()); + Assertions.assertEquals("gsgh", response.properties().databases().get(0).attributes().get(0).value()); + Assertions.assertEquals("igrjdljlkqhvkrbz", response.properties().databases().get(0).branchId()); + Assertions.assertEquals("astax", response.properties().databases().get(0).ownerName()); + Assertions.assertEquals("l", response.properties().endpoints().get(0).entityName()); + Assertions.assertEquals("yyskyekgafxczv", response.properties().endpoints().get(0).attributes().get(0).name()); + Assertions.assertEquals("cckwrtwle", response.properties().endpoints().get(0).attributes().get(0).value()); + Assertions.assertEquals("veszrtlhpdhw", response.properties().endpoints().get(0).projectId()); + Assertions.assertEquals("ctac", response.properties().endpoints().get(0).branchId()); + Assertions.assertEquals(EndpointType.READ_WRITE, response.properties().endpoints().get(0).endpointType()); } } diff --git a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/BranchesListMockTests.java b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/BranchesListMockTests.java index d5849efc4fd3..e05afa13a80f 100644 --- a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/BranchesListMockTests.java +++ b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/BranchesListMockTests.java @@ -23,7 +23,7 @@ public final class BranchesListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"entityId\":\"fqpgaixwrgr\",\"entityName\":\"derfrswqikwepwog\",\"createdAt\":\"icwn\",\"provisioningState\":\"Failed\",\"attributes\":[{\"name\":\"cqbsudzpgchzpg\",\"value\":\"qumjdjxhzghgod\"},{\"name\":\"ynrceqavfdbdf\",\"value\":\"mxjdnaju\"},{\"name\":\"pjyyqmkwlhvc\",\"value\":\"loqd\"},{\"name\":\"jk\",\"value\":\"uxxrwzobuzms\"}],\"projectId\":\"amt\",\"parentId\":\"kwppthuzdprmimr\",\"roleName\":\"dpoqfxyem\",\"databaseName\":\"ftb\",\"roles\":[{\"entityId\":\"tecloamfmxtll\",\"entityName\":\"tymqcnrrfijhggab\",\"createdAt\":\"gamk\",\"provisioningState\":\"Failed\",\"attributes\":[{\"name\":\"wdvffhsdpzouh\",\"value\":\"tqrxqwqnjxrdf\"},{\"name\":\"dtullygtavczcxdf\",\"value\":\"eapyfmlxrlj\"},{\"name\":\"h\",\"value\":\"aspiflei\"},{\"name\":\"ixlmdbgic\",\"value\":\"hfgsmd\"}],\"branchId\":\"uq\",\"permissions\":[\"tokljmtznpaxw\",\"qtyyqiprcltungb\",\"olj\"],\"isSuperUser\":false},{\"entityId\":\"i\",\"entityName\":\"b\",\"createdAt\":\"ckgk\",\"provisioningState\":\"Failed\",\"attributes\":[{\"name\":\"tiiqqcqikclsmaln\",\"value\":\"swoykdn\"}],\"branchId\":\"aaxwmgzr\",\"permissions\":[\"qcwnynl\",\"eiqbcbgvsbts\",\"rtoxadhxuvjhxm\"],\"isSuperUser\":false},{\"entityId\":\"tjc\",\"entityName\":\"twmlg\",\"createdAt\":\"vnpvvd\",\"provisioningState\":\"Failed\",\"attributes\":[{\"name\":\"q\",\"value\":\"qipslz\"},{\"name\":\"vcdsvm\",\"value\":\"bit\"}],\"branchId\":\"dtfobvfi\",\"permissions\":[\"qich\"],\"isSuperUser\":true},{\"entityId\":\"zdqekivycpzcvd\",\"entityName\":\"ulrqtbht\",\"createdAt\":\"zpzlpryf\",\"provisioningState\":\"Failed\",\"attributes\":[{\"name\":\"t\",\"value\":\"fkgilnoudccgnd\"},{\"name\":\"gdpri\",\"value\":\"gqqyeqfcbuulpyuf\"},{\"name\":\"qjfshtujcyo\",\"value\":\"igi\"},{\"name\":\"wdcsk\",\"value\":\"kqnqvkixnmbzme\"}],\"branchId\":\"yrzwim\",\"permissions\":[\"yspzvrie\",\"vfph\",\"dzxplgtp\"],\"isSuperUser\":true}],\"databases\":[{\"entityId\":\"zmgschnzrsbkkzov\",\"entityName\":\"dmnfmfws\",\"createdAt\":\"fo\",\"provisioningState\":\"Succeeded\",\"attributes\":[{\"name\":\"immovzwd\",\"value\":\"hkkmvhzfovan\"}],\"branchId\":\"vaprtgelgw\",\"ownerName\":\"ikfyaqandm\"},{\"entityId\":\"n\",\"entityName\":\"qjumovs\",\"createdAt\":\"pbvzopaxmfmvsmcw\",\"provisioningState\":\"Canceled\",\"attributes\":[{\"name\":\"dtnqifbsa\",\"value\":\"roiauesugmo\"},{\"name\":\"pcjycb\",\"value\":\"elrgttwfldsiuo\"},{\"name\":\"ini\",\"value\":\"cedpksriwmmtmqrx\"}],\"branchId\":\"qvvyczyay\",\"ownerName\":\"tg\"}],\"endpoints\":[{\"entityId\":\"qahragpxmibplnu\",\"entityName\":\"yryefqm\",\"createdAt\":\"vyztxlno\",\"provisioningState\":\"Succeeded\",\"attributes\":[{\"name\":\"ceeg\",\"value\":\"yieztkutnjil\"},{\"name\":\"ukkrehyh\",\"value\":\"mjodu\"},{\"name\":\"fvulxfaryr\",\"value\":\"jlgdez\"}],\"projectId\":\"qwahoy\",\"branchId\":\"axqvjweiwtczkddn\",\"endpointType\":\"read_write\"},{\"entityId\":\"ooq\",\"entityName\":\"dqrxygla\",\"createdAt\":\"scflwtjdtlri\",\"provisioningState\":\"Failed\",\"attributes\":[{\"name\":\"ycuxdtzcqip\",\"value\":\"dudgcozzomeh\"}],\"projectId\":\"antolamlbijuxkq\",\"branchId\":\"czipvwdtgck\",\"endpointType\":\"read_write\"}]},\"id\":\"qdlratrkw\",\"name\":\"oauwxsuyk\",\"type\":\"nhrfgslgl\"}]}"; + = "{\"value\":[{\"properties\":{\"entityId\":\"wxlwme\",\"entityName\":\"ohxp\",\"createdAt\":\"ceopvk\",\"provisioningState\":\"Succeeded\",\"attributes\":[{\"name\":\"esobpbokhmm\",\"value\":\"cdyarnggcjfwblqh\"},{\"name\":\"kasmcolmugpyva\",\"value\":\"s\"}],\"projectId\":\"l\",\"parentId\":\"zxeygzvtye\",\"roleName\":\"hubnobgu\",\"databaseName\":\"sqsqkpdmioyjpnml\",\"roles\":[{\"entityId\":\"pszpmcvqdvr\",\"entityName\":\"vxyrxd\",\"createdAt\":\"vqojbxaotcgbz\",\"provisioningState\":\"Succeeded\",\"attributes\":[{\"name\":\"lef\",\"value\":\"ioyidoxznvg\"},{\"name\":\"dtmuuvd\",\"value\":\"wsxmrszb\"}],\"branchId\":\"imxlpnerxrzuty\",\"permissions\":[\"rzaqmnbx\",\"aehtd\"],\"isSuperUser\":true},{\"entityId\":\"nvynfaooeactedc\",\"entityName\":\"sk\",\"createdAt\":\"ddida\",\"provisioningState\":\"Canceled\",\"attributes\":[{\"name\":\"qmtlpbyxroi\",\"value\":\"uyqyp\"}],\"branchId\":\"mnoiicsudy\",\"permissions\":[\"jjtalxrdsj\",\"h\",\"luqwgusxxhd\",\"dp\"],\"isSuperUser\":true}],\"databases\":[{\"entityId\":\"tbdmvsbyidae\",\"entityName\":\"pvek\",\"createdAt\":\"wjfbotloggdusx\",\"provisioningState\":\"Succeeded\",\"attributes\":[{\"name\":\"v\",\"value\":\"xcjkcoqwczsy\"},{\"name\":\"qrizfwihvaan\",\"value\":\"qtnhjrfd\"},{\"name\":\"fdvbbaexxjfwtg\",\"value\":\"fkkauigvmua\"},{\"name\":\"mczfedyuepsvplt\",\"value\":\"dajjvywe\"}],\"branchId\":\"fkumcfjxoky\",\"ownerName\":\"syasvfnkwmygjjek\"},{\"entityId\":\"nfdrugjqyck\",\"entityName\":\"xkrdtul\",\"createdAt\":\"cjdk\",\"provisioningState\":\"Failed\",\"attributes\":[{\"name\":\"ubmzoon\",\"value\":\"vo\"}],\"branchId\":\"hkxfpwhdyslbklgl\",\"ownerName\":\"nkkw\"},{\"entityId\":\"qshwyqxridt\",\"entityName\":\"saqjmkgx\",\"createdAt\":\"queu\",\"provisioningState\":\"Failed\",\"attributes\":[{\"name\":\"pziiz\",\"value\":\"vjykofveze\"},{\"name\":\"k\",\"value\":\"kqtwqlepjjzkcasf\"},{\"name\":\"zcntogffjwajnrtw\",\"value\":\"vaqkifmxawost\"}],\"branchId\":\"knhrkmjqncf\",\"ownerName\":\"sc\"},{\"entityId\":\"emvwf\",\"entityName\":\"qwypvndrwb\",\"createdAt\":\"dtggrssg\",\"provisioningState\":\"Canceled\",\"attributes\":[{\"name\":\"injmuymve\",\"value\":\"vztscbgmusaic\"}],\"branchId\":\"scnkzzohnrd\",\"ownerName\":\"lze\"}],\"endpoints\":[{\"entityId\":\"ehlbzqixbnjrqvzy\",\"entityName\":\"xozony\",\"createdAt\":\"ameudpabcreu\",\"provisioningState\":\"Failed\",\"attributes\":[{\"name\":\"yjxvc\",\"value\":\"asormrexzvdube\"},{\"name\":\"gzygbaduveco\",\"value\":\"sdqhzr\"}],\"projectId\":\"bakrli\",\"branchId\":\"fvppkeqsifj\",\"endpointType\":\"read_only\"},{\"entityId\":\"gygnhrkombc\",\"entityName\":\"ajdopggor\",\"createdAt\":\"oqtrotpvclpo\",\"provisioningState\":\"Canceled\",\"attributes\":[{\"name\":\"wkpts\",\"value\":\"wxjgvhxccbmkak\"}],\"projectId\":\"ookbpu\",\"branchId\":\"g\",\"endpointType\":\"read_only\"},{\"entityId\":\"akmlwktfowzkroyr\",\"entityName\":\"r\",\"createdAt\":\"lzqjimejtgzjxx\",\"provisioningState\":\"Failed\",\"attributes\":[{\"name\":\"zuqloiwyayyzivr\",\"value\":\"itcdqlhchwhrk\"},{\"name\":\"jlei\",\"value\":\"ibfiplhxfnsm\"},{\"name\":\"cjowlyeyzmu\",\"value\":\"sqc\"},{\"name\":\"hnxlzbuwodmachb\",\"value\":\"vnrpbjrmvg\"}],\"projectId\":\"plehmumk\",\"branchId\":\"llcz\",\"endpointType\":\"read_write\"},{\"entityId\":\"nhkgq\",\"entityName\":\"oxsstc\",\"createdAt\":\"rak\",\"provisioningState\":\"Failed\",\"attributes\":[{\"name\":\"j\",\"value\":\"wmhlymgnukx\"},{\"name\":\"kemjpequlrlz\",\"value\":\"udgjtfb\"}],\"projectId\":\"akkuc\",\"branchId\":\"wnhczbutou\",\"endpointType\":\"read_write\"}]},\"id\":\"irjwayhicqqwwvgw\",\"name\":\"slvlizedvb\",\"type\":\"abv\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,41 +33,41 @@ public void testList() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.branches().list("ookyfoz", "bn", "x", com.azure.core.util.Context.NONE); + = manager.branches().list("klvqzrwtrdgscn", "q", "on", com.azure.core.util.Context.NONE); - Assertions.assertEquals("derfrswqikwepwog", response.iterator().next().properties().entityName()); - Assertions.assertEquals("cqbsudzpgchzpg", response.iterator().next().properties().attributes().get(0).name()); - Assertions.assertEquals("qumjdjxhzghgod", response.iterator().next().properties().attributes().get(0).value()); - Assertions.assertEquals("amt", response.iterator().next().properties().projectId()); - Assertions.assertEquals("kwppthuzdprmimr", response.iterator().next().properties().parentId()); - Assertions.assertEquals("dpoqfxyem", response.iterator().next().properties().roleName()); - Assertions.assertEquals("ftb", response.iterator().next().properties().databaseName()); - Assertions.assertEquals("tymqcnrrfijhggab", - response.iterator().next().properties().roles().get(0).entityName()); - Assertions.assertEquals("wdvffhsdpzouh", + Assertions.assertEquals("ohxp", response.iterator().next().properties().entityName()); + Assertions.assertEquals("esobpbokhmm", response.iterator().next().properties().attributes().get(0).name()); + Assertions.assertEquals("cdyarnggcjfwblqh", + response.iterator().next().properties().attributes().get(0).value()); + Assertions.assertEquals("l", response.iterator().next().properties().projectId()); + Assertions.assertEquals("zxeygzvtye", response.iterator().next().properties().parentId()); + Assertions.assertEquals("hubnobgu", response.iterator().next().properties().roleName()); + Assertions.assertEquals("sqsqkpdmioyjpnml", response.iterator().next().properties().databaseName()); + Assertions.assertEquals("vxyrxd", response.iterator().next().properties().roles().get(0).entityName()); + Assertions.assertEquals("lef", response.iterator().next().properties().roles().get(0).attributes().get(0).name()); - Assertions.assertEquals("tqrxqwqnjxrdf", + Assertions.assertEquals("ioyidoxznvg", response.iterator().next().properties().roles().get(0).attributes().get(0).value()); - Assertions.assertEquals("uq", response.iterator().next().properties().roles().get(0).branchId()); - Assertions.assertEquals("tokljmtznpaxw", + Assertions.assertEquals("imxlpnerxrzuty", response.iterator().next().properties().roles().get(0).branchId()); + Assertions.assertEquals("rzaqmnbx", response.iterator().next().properties().roles().get(0).permissions().get(0)); - Assertions.assertFalse(response.iterator().next().properties().roles().get(0).isSuperUser()); - Assertions.assertEquals("dmnfmfws", response.iterator().next().properties().databases().get(0).entityName()); - Assertions.assertEquals("immovzwd", + Assertions.assertTrue(response.iterator().next().properties().roles().get(0).isSuperUser()); + Assertions.assertEquals("pvek", response.iterator().next().properties().databases().get(0).entityName()); + Assertions.assertEquals("v", response.iterator().next().properties().databases().get(0).attributes().get(0).name()); - Assertions.assertEquals("hkkmvhzfovan", + Assertions.assertEquals("xcjkcoqwczsy", response.iterator().next().properties().databases().get(0).attributes().get(0).value()); - Assertions.assertEquals("vaprtgelgw", response.iterator().next().properties().databases().get(0).branchId()); - Assertions.assertEquals("ikfyaqandm", response.iterator().next().properties().databases().get(0).ownerName()); - Assertions.assertEquals("yryefqm", response.iterator().next().properties().endpoints().get(0).entityName()); - Assertions.assertEquals("ceeg", + Assertions.assertEquals("fkumcfjxoky", response.iterator().next().properties().databases().get(0).branchId()); + Assertions.assertEquals("syasvfnkwmygjjek", + response.iterator().next().properties().databases().get(0).ownerName()); + Assertions.assertEquals("xozony", response.iterator().next().properties().endpoints().get(0).entityName()); + Assertions.assertEquals("yjxvc", response.iterator().next().properties().endpoints().get(0).attributes().get(0).name()); - Assertions.assertEquals("yieztkutnjil", + Assertions.assertEquals("asormrexzvdube", response.iterator().next().properties().endpoints().get(0).attributes().get(0).value()); - Assertions.assertEquals("qwahoy", response.iterator().next().properties().endpoints().get(0).projectId()); - Assertions.assertEquals("axqvjweiwtczkddn", - response.iterator().next().properties().endpoints().get(0).branchId()); - Assertions.assertEquals(EndpointType.READ_WRITE, + Assertions.assertEquals("bakrli", response.iterator().next().properties().endpoints().get(0).projectId()); + Assertions.assertEquals("fvppkeqsifj", response.iterator().next().properties().endpoints().get(0).branchId()); + Assertions.assertEquals(EndpointType.READ_ONLY, response.iterator().next().properties().endpoints().get(0).endpointType()); } } diff --git a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/ComputeInnerTests.java b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/ComputeInnerTests.java index d3a19effa264..e30664654046 100644 --- a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/ComputeInnerTests.java +++ b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/ComputeInnerTests.java @@ -6,42 +6,20 @@ import com.azure.core.util.BinaryData; import com.azure.resourcemanager.neonpostgres.fluent.models.ComputeInner; -import com.azure.resourcemanager.neonpostgres.models.Attributes; -import com.azure.resourcemanager.neonpostgres.models.ComputeProperties; -import java.util.Arrays; import org.junit.jupiter.api.Assertions; public final class ComputeInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ComputeInner model = BinaryData.fromString( - "{\"properties\":{\"entityId\":\"abzoghktdpyczhco\",\"entityName\":\"cnhz\",\"createdAt\":\"ot\",\"provisioningState\":\"Succeeded\",\"attributes\":[{\"name\":\"yjzp\",\"value\":\"wrlohapqinfszpyg\"},{\"name\":\"qdhmrjzralcxpjby\",\"value\":\"psjoqcjenk\"}],\"region\":\"fq\",\"cpuCores\":1155088550,\"memory\":1234749108,\"status\":\"xj\"},\"id\":\"gcm\",\"name\":\"zqjhhhqxuwyvca\",\"type\":\"oyvivbsiz\"}") + "{\"properties\":{\"entityId\":\"acoyvivbsizusjs\",\"entityName\":\"bscm\",\"createdAt\":\"zijiufehgmv\",\"provisioningState\":\"Canceled\",\"attributes\":[{\"name\":\"v\",\"value\":\"kxrerlniylylyfwx\"},{\"name\":\"utgqztwh\",\"value\":\"hmupgxyjtcdxabbu\"}],\"region\":\"tabenbbk\",\"cpuCores\":1355647832,\"memory\":414385579,\"status\":\"cafeddw\"},\"id\":\"lzafwxu\",\"name\":\"gnhgook\",\"type\":\"talvnbwgp\"}") .toObject(ComputeInner.class); - Assertions.assertEquals("cnhz", model.properties().entityName()); - Assertions.assertEquals("yjzp", model.properties().attributes().get(0).name()); - Assertions.assertEquals("wrlohapqinfszpyg", model.properties().attributes().get(0).value()); - Assertions.assertEquals("fq", model.properties().region()); - Assertions.assertEquals(1155088550, model.properties().cpuCores()); - Assertions.assertEquals(1234749108, model.properties().memory()); - Assertions.assertEquals("xj", model.properties().status()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ComputeInner model = new ComputeInner().withProperties(new ComputeProperties().withEntityName("cnhz") - .withAttributes(Arrays.asList(new Attributes().withName("yjzp").withValue("wrlohapqinfszpyg"), - new Attributes().withName("qdhmrjzralcxpjby").withValue("psjoqcjenk"))) - .withRegion("fq") - .withCpuCores(1155088550) - .withMemory(1234749108) - .withStatus("xj")); - model = BinaryData.fromObject(model).toObject(ComputeInner.class); - Assertions.assertEquals("cnhz", model.properties().entityName()); - Assertions.assertEquals("yjzp", model.properties().attributes().get(0).name()); - Assertions.assertEquals("wrlohapqinfszpyg", model.properties().attributes().get(0).value()); - Assertions.assertEquals("fq", model.properties().region()); - Assertions.assertEquals(1155088550, model.properties().cpuCores()); - Assertions.assertEquals(1234749108, model.properties().memory()); - Assertions.assertEquals("xj", model.properties().status()); + Assertions.assertEquals("bscm", model.properties().entityName()); + Assertions.assertEquals("v", model.properties().attributes().get(0).name()); + Assertions.assertEquals("kxrerlniylylyfwx", model.properties().attributes().get(0).value()); + Assertions.assertEquals("tabenbbk", model.properties().region()); + Assertions.assertEquals(1355647832, model.properties().cpuCores()); + Assertions.assertEquals(414385579, model.properties().memory()); + Assertions.assertEquals("cafeddw", model.properties().status()); } } diff --git a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/ComputeListResultTests.java b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/ComputeListResultTests.java index 06405b1dc438..fe8339a549ed 100644 --- a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/ComputeListResultTests.java +++ b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/ComputeListResultTests.java @@ -12,15 +12,15 @@ public final class ComputeListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ComputeListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"entityId\":\"xud\",\"entityName\":\"hgookrtalvnbwgpb\",\"createdAt\":\"eluclvdjj\",\"provisioningState\":\"Canceled\",\"attributes\":[{\"name\":\"nqodxahhxhq\",\"value\":\"aqnvzoqgyipemchg\"},{\"name\":\"v\",\"value\":\"czuejdtxptl\"}],\"region\":\"wzhomewjjstl\",\"cpuCores\":1540602117,\"memory\":887233496,\"status\":\"moaiancz\"},\"id\":\"odrrslblxyd\",\"name\":\"xrx\",\"type\":\"vbxiwkgfbqlj\"}],\"nextLink\":\"khychocokulehur\"}") + "{\"value\":[{\"properties\":{\"entityId\":\"bzog\",\"entityName\":\"t\",\"createdAt\":\"yczhco\",\"provisioningState\":\"Succeeded\",\"attributes\":[{\"name\":\"zqro\",\"value\":\"tjzcfyjzpt\"},{\"name\":\"rl\",\"value\":\"h\"}],\"region\":\"qinfszpyglqd\",\"cpuCores\":1992477161,\"memory\":1244042275,\"status\":\"alcxpjbyy\"},\"id\":\"joqcjenkyhfqzvsq\",\"name\":\"fxjelg\",\"type\":\"mpzqjhhhq\"}],\"nextLink\":\"w\"}") .toObject(ComputeListResult.class); - Assertions.assertEquals("hgookrtalvnbwgpb", model.value().get(0).properties().entityName()); - Assertions.assertEquals("nqodxahhxhq", model.value().get(0).properties().attributes().get(0).name()); - Assertions.assertEquals("aqnvzoqgyipemchg", model.value().get(0).properties().attributes().get(0).value()); - Assertions.assertEquals("wzhomewjjstl", model.value().get(0).properties().region()); - Assertions.assertEquals(1540602117, model.value().get(0).properties().cpuCores()); - Assertions.assertEquals(887233496, model.value().get(0).properties().memory()); - Assertions.assertEquals("moaiancz", model.value().get(0).properties().status()); - Assertions.assertEquals("khychocokulehur", model.nextLink()); + Assertions.assertEquals("t", model.value().get(0).properties().entityName()); + Assertions.assertEquals("zqro", model.value().get(0).properties().attributes().get(0).name()); + Assertions.assertEquals("tjzcfyjzpt", model.value().get(0).properties().attributes().get(0).value()); + Assertions.assertEquals("qinfszpyglqd", model.value().get(0).properties().region()); + Assertions.assertEquals(1992477161, model.value().get(0).properties().cpuCores()); + Assertions.assertEquals(1244042275, model.value().get(0).properties().memory()); + Assertions.assertEquals("alcxpjbyy", model.value().get(0).properties().status()); + Assertions.assertEquals("w", model.nextLink()); } } diff --git a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/ComputePropertiesTests.java b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/ComputePropertiesTests.java index 55d491836ad9..f97b774f099b 100644 --- a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/ComputePropertiesTests.java +++ b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/ComputePropertiesTests.java @@ -5,42 +5,21 @@ package com.azure.resourcemanager.neonpostgres.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.neonpostgres.models.Attributes; import com.azure.resourcemanager.neonpostgres.models.ComputeProperties; -import java.util.Arrays; import org.junit.jupiter.api.Assertions; public final class ComputePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ComputeProperties model = BinaryData.fromString( - "{\"entityId\":\"jszlb\",\"entityName\":\"mnlzijiufehgmvf\",\"createdAt\":\"wyvq\",\"provisioningState\":\"Succeeded\",\"attributes\":[{\"name\":\"lniylylyfwxz\",\"value\":\"tgqztwhghmup\"},{\"name\":\"xyjtcdxabbujf\",\"value\":\"abe\"}],\"region\":\"bklqpxz\",\"cpuCores\":650123324,\"memory\":161273746,\"status\":\"dwwnl\"}") + "{\"entityId\":\"meluclvdjj\",\"entityName\":\"yrdnqod\",\"createdAt\":\"hhxhq\",\"provisioningState\":\"Succeeded\",\"attributes\":[{\"name\":\"zoqgyipemchga\",\"value\":\"sczuejdtxptlghwz\"},{\"name\":\"omew\",\"value\":\"j\"},{\"name\":\"tl\",\"value\":\"uhqawmoaianc\"},{\"name\":\"nvodrrs\",\"value\":\"blxydkxr\"}],\"region\":\"vbxiwkgfbqlj\",\"cpuCores\":1613642169,\"memory\":1041753015,\"status\":\"h\"}") .toObject(ComputeProperties.class); - Assertions.assertEquals("mnlzijiufehgmvf", model.entityName()); - Assertions.assertEquals("lniylylyfwxz", model.attributes().get(0).name()); - Assertions.assertEquals("tgqztwhghmup", model.attributes().get(0).value()); - Assertions.assertEquals("bklqpxz", model.region()); - Assertions.assertEquals(650123324, model.cpuCores()); - Assertions.assertEquals(161273746, model.memory()); - Assertions.assertEquals("dwwnl", model.status()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ComputeProperties model = new ComputeProperties().withEntityName("mnlzijiufehgmvf") - .withAttributes(Arrays.asList(new Attributes().withName("lniylylyfwxz").withValue("tgqztwhghmup"), - new Attributes().withName("xyjtcdxabbujf").withValue("abe"))) - .withRegion("bklqpxz") - .withCpuCores(650123324) - .withMemory(161273746) - .withStatus("dwwnl"); - model = BinaryData.fromObject(model).toObject(ComputeProperties.class); - Assertions.assertEquals("mnlzijiufehgmvf", model.entityName()); - Assertions.assertEquals("lniylylyfwxz", model.attributes().get(0).name()); - Assertions.assertEquals("tgqztwhghmup", model.attributes().get(0).value()); - Assertions.assertEquals("bklqpxz", model.region()); - Assertions.assertEquals(650123324, model.cpuCores()); - Assertions.assertEquals(161273746, model.memory()); - Assertions.assertEquals("dwwnl", model.status()); + Assertions.assertEquals("yrdnqod", model.entityName()); + Assertions.assertEquals("zoqgyipemchga", model.attributes().get(0).name()); + Assertions.assertEquals("sczuejdtxptlghwz", model.attributes().get(0).value()); + Assertions.assertEquals("vbxiwkgfbqlj", model.region()); + Assertions.assertEquals(1613642169, model.cpuCores()); + Assertions.assertEquals(1041753015, model.memory()); + Assertions.assertEquals("h", model.status()); } } diff --git a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/ComputesCreateOrUpdateMockTests.java b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/ComputesCreateOrUpdateMockTests.java deleted file mode 100644 index 5b35b4f36a64..000000000000 --- a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/ComputesCreateOrUpdateMockTests.java +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.neonpostgres.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.neonpostgres.NeonPostgresManager; -import com.azure.resourcemanager.neonpostgres.models.Attributes; -import com.azure.resourcemanager.neonpostgres.models.Compute; -import com.azure.resourcemanager.neonpostgres.models.ComputeProperties; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ComputesCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - String responseStr - = "{\"properties\":{\"entityId\":\"xicwgpthdcfmfzc\",\"entityName\":\"sfodropalvng\",\"createdAt\":\"yuskwgqrntaumdr\",\"provisioningState\":\"Succeeded\",\"attributes\":[{\"name\":\"rkegtyczu\",\"value\":\"piyxlzmiydd\"},{\"name\":\"eqzqvabmhvs\",\"value\":\"xduetbapfc\"},{\"name\":\"ewxtrl\",\"value\":\"bpxya\"},{\"name\":\"kjpirgzxvbczw\",\"value\":\"yegbthms\"}],\"region\":\"tjbuiggruno\",\"cpuCores\":1056020483,\"memory\":1230067348,\"status\":\"jthoivsdwsngkr\"},\"id\":\"hscj\",\"name\":\"akmhz\",\"type\":\"hwahfbw\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - NeonPostgresManager manager = NeonPostgresManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - Compute response = manager.computes() - .define("kvavucgj") - .withExistingBranche("xjoegcjojlleuidp", "tonvhgnhtmeplhb", "jba", "mumm") - .withProperties(new ComputeProperties().withEntityName("chxwwuzdmh") - .withAttributes(Arrays.asList(new Attributes().withName("tqd").withValue("jipdviscotyx"))) - .withRegion("iifef") - .withCpuCores(249505627) - .withMemory(173143566) - .withStatus("qoemwsi")) - .create(); - - Assertions.assertEquals("sfodropalvng", response.properties().entityName()); - Assertions.assertEquals("rkegtyczu", response.properties().attributes().get(0).name()); - Assertions.assertEquals("piyxlzmiydd", response.properties().attributes().get(0).value()); - Assertions.assertEquals("tjbuiggruno", response.properties().region()); - Assertions.assertEquals(1056020483, response.properties().cpuCores()); - Assertions.assertEquals(1230067348, response.properties().memory()); - Assertions.assertEquals("jthoivsdwsngkr", response.properties().status()); - } -} diff --git a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/ComputesDeleteWithResponseMockTests.java b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/ComputesDeleteWithResponseMockTests.java deleted file mode 100644 index 4893fd97a859..000000000000 --- a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/ComputesDeleteWithResponseMockTests.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.neonpostgres.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.neonpostgres.NeonPostgresManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ComputesDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - NeonPostgresManager manager = NeonPostgresManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - manager.computes() - .deleteWithResponse("xyji", "skobqoclflioewy", "xessmvrk", "p", "qeq", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/ComputesGetWithResponseMockTests.java b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/ComputesGetWithResponseMockTests.java deleted file mode 100644 index 02c704eaeef3..000000000000 --- a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/ComputesGetWithResponseMockTests.java +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.neonpostgres.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.neonpostgres.NeonPostgresManager; -import com.azure.resourcemanager.neonpostgres.models.Compute; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ComputesGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"entityId\":\"zqiyuqhtder\",\"entityName\":\"n\",\"createdAt\":\"a\",\"provisioningState\":\"Failed\",\"attributes\":[{\"name\":\"jlwyxedzn\",\"value\":\"xrfomcke\"},{\"name\":\"vmyifopxf\",\"value\":\"jt\"}],\"region\":\"yzoutxfptofh\",\"cpuCores\":792380942,\"memory\":1254181889,\"status\":\"zygvadgaaqwvkgjp\"},\"id\":\"pmpv\",\"name\":\"nogehlufbort\",\"type\":\"nukkfaxzsvb\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - NeonPostgresManager manager = NeonPostgresManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - Compute response = manager.computes() - .getWithResponse("ud", "yiurztvktjh", "fecqkoqyouerga", "hpuzxkpye", "hfdyldhgye", - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("n", response.properties().entityName()); - Assertions.assertEquals("jlwyxedzn", response.properties().attributes().get(0).name()); - Assertions.assertEquals("xrfomcke", response.properties().attributes().get(0).value()); - Assertions.assertEquals("yzoutxfptofh", response.properties().region()); - Assertions.assertEquals(792380942, response.properties().cpuCores()); - Assertions.assertEquals(1254181889, response.properties().memory()); - Assertions.assertEquals("zygvadgaaqwvkgjp", response.properties().status()); - } -} diff --git a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/ComputesListMockTests.java b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/ComputesListMockTests.java index d8d2dbec5953..4bd34ba8dafc 100644 --- a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/ComputesListMockTests.java +++ b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/ComputesListMockTests.java @@ -22,7 +22,7 @@ public final class ComputesListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"entityId\":\"rnminzqplgtkih\",\"entityName\":\"ikzsrzfffji\",\"createdAt\":\"fbpntogke\",\"provisioningState\":\"Succeeded\",\"attributes\":[{\"name\":\"bmcarmo\",\"value\":\"fxxkwykuqdndxl\"},{\"name\":\"kh\",\"value\":\"gga\"},{\"name\":\"vdgtfpeer\",\"value\":\"cd\"},{\"name\":\"rnrnjrcufmbgacnr\",\"value\":\"fdtncmspsanma\"}],\"region\":\"ubkqiq\",\"cpuCores\":294672999,\"memory\":694637518,\"status\":\"qcs\"},\"id\":\"qjmxpt\",\"name\":\"eipuugkwdrqmrpa\",\"type\":\"uuonjkkxukguehvv\"}]}"; + = "{\"value\":[{\"properties\":{\"entityId\":\"atlzmg\",\"entityName\":\"hnzrsbkkzovlzdm\",\"createdAt\":\"mfwsxafofu\",\"provisioningState\":\"Succeeded\",\"attributes\":[{\"name\":\"movzwde\",\"value\":\"kkmvhzfovanyrva\"},{\"name\":\"rtgelg\",\"value\":\"ewikfyaqandmym\"}],\"region\":\"oqjum\",\"cpuCores\":238006618,\"memory\":544073075,\"status\":\"bvzo\"},\"id\":\"x\",\"name\":\"fmvsmcwoxfaxdt\",\"type\":\"qi\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,14 +32,14 @@ public void testList() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.computes().list("bdxmd", "esbrujbjpppktl", "dibfmthi", "at", com.azure.core.util.Context.NONE); + = manager.computes().list("ecuyr", "wimbzayspzvr", "etv", "phmdzxplgtp", com.azure.core.util.Context.NONE); - Assertions.assertEquals("ikzsrzfffji", response.iterator().next().properties().entityName()); - Assertions.assertEquals("bmcarmo", response.iterator().next().properties().attributes().get(0).name()); - Assertions.assertEquals("fxxkwykuqdndxl", response.iterator().next().properties().attributes().get(0).value()); - Assertions.assertEquals("ubkqiq", response.iterator().next().properties().region()); - Assertions.assertEquals(294672999, response.iterator().next().properties().cpuCores()); - Assertions.assertEquals(694637518, response.iterator().next().properties().memory()); - Assertions.assertEquals("qcs", response.iterator().next().properties().status()); + Assertions.assertEquals("hnzrsbkkzovlzdm", response.iterator().next().properties().entityName()); + Assertions.assertEquals("movzwde", response.iterator().next().properties().attributes().get(0).name()); + Assertions.assertEquals("kkmvhzfovanyrva", response.iterator().next().properties().attributes().get(0).value()); + Assertions.assertEquals("oqjum", response.iterator().next().properties().region()); + Assertions.assertEquals(238006618, response.iterator().next().properties().cpuCores()); + Assertions.assertEquals(544073075, response.iterator().next().properties().memory()); + Assertions.assertEquals("bvzo", response.iterator().next().properties().status()); } } diff --git a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/EndpointInnerTests.java b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/EndpointInnerTests.java index 5f427e21a053..49785007abbb 100644 --- a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/EndpointInnerTests.java +++ b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/EndpointInnerTests.java @@ -6,17 +6,14 @@ import com.azure.core.util.BinaryData; import com.azure.resourcemanager.neonpostgres.fluent.models.EndpointInner; -import com.azure.resourcemanager.neonpostgres.models.Attributes; -import com.azure.resourcemanager.neonpostgres.models.EndpointProperties; import com.azure.resourcemanager.neonpostgres.models.EndpointType; -import java.util.Arrays; import org.junit.jupiter.api.Assertions; public final class EndpointInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { EndpointInner model = BinaryData.fromString( - "{\"properties\":{\"entityId\":\"vovjufycsjmlbe\",\"entityName\":\"ej\",\"createdAt\":\"iuxegth\",\"provisioningState\":\"Failed\",\"attributes\":[{\"name\":\"awlpjfelqerpp\",\"value\":\"cbgqnzmnhiil\"},{\"name\":\"alwcjgckbb\",\"value\":\"ccgzpraoxnyu\"},{\"name\":\"fa\",\"value\":\"sgftipwc\"},{\"name\":\"byubhiqdxyurnpn\",\"value\":\"hza\"}],\"projectId\":\"cnuhiigbylbuigv\",\"branchId\":\"atvcrkdlbnbq\",\"endpointType\":\"read_only\"},\"id\":\"syhzlwx\",\"name\":\"eaovurexdnds\",\"type\":\"dwead\"}") + "{\"properties\":{\"entityId\":\"e\",\"entityName\":\"ej\",\"createdAt\":\"iuxegth\",\"provisioningState\":\"Failed\",\"attributes\":[{\"name\":\"awlpjfelqerpp\",\"value\":\"cbgqnzmnhiil\"},{\"name\":\"alwcjgckbb\",\"value\":\"ccgzpraoxnyu\"},{\"name\":\"fa\",\"value\":\"sgftipwc\"},{\"name\":\"byubhiqdxyurnpn\",\"value\":\"hza\"}],\"projectId\":\"cnuhiigbylbuigv\",\"branchId\":\"atvcrkdlbnbq\",\"endpointType\":\"read_only\"},\"id\":\"syhzlwx\",\"name\":\"eaovurexdnds\",\"type\":\"dwead\"}") .toObject(EndpointInner.class); Assertions.assertEquals("ej", model.properties().entityName()); Assertions.assertEquals("awlpjfelqerpp", model.properties().attributes().get(0).name()); @@ -25,23 +22,4 @@ public void testDeserialize() throws Exception { Assertions.assertEquals("atvcrkdlbnbq", model.properties().branchId()); Assertions.assertEquals(EndpointType.READ_ONLY, model.properties().endpointType()); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EndpointInner model = new EndpointInner().withProperties(new EndpointProperties().withEntityName("ej") - .withAttributes(Arrays.asList(new Attributes().withName("awlpjfelqerpp").withValue("cbgqnzmnhiil"), - new Attributes().withName("alwcjgckbb").withValue("ccgzpraoxnyu"), - new Attributes().withName("fa").withValue("sgftipwc"), - new Attributes().withName("byubhiqdxyurnpn").withValue("hza"))) - .withProjectId("cnuhiigbylbuigv") - .withBranchId("atvcrkdlbnbq") - .withEndpointType(EndpointType.READ_ONLY)); - model = BinaryData.fromObject(model).toObject(EndpointInner.class); - Assertions.assertEquals("ej", model.properties().entityName()); - Assertions.assertEquals("awlpjfelqerpp", model.properties().attributes().get(0).name()); - Assertions.assertEquals("cbgqnzmnhiil", model.properties().attributes().get(0).value()); - Assertions.assertEquals("cnuhiigbylbuigv", model.properties().projectId()); - Assertions.assertEquals("atvcrkdlbnbq", model.properties().branchId()); - Assertions.assertEquals(EndpointType.READ_ONLY, model.properties().endpointType()); - } } diff --git a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/EndpointListResultTests.java b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/EndpointListResultTests.java index 387cd08f29b6..b937f8ef9024 100644 --- a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/EndpointListResultTests.java +++ b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/EndpointListResultTests.java @@ -13,14 +13,14 @@ public final class EndpointListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { EndpointListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"entityId\":\"wntopag\",\"entityName\":\"mvmmagoaqylkjz\",\"createdAt\":\"iua\",\"provisioningState\":\"Succeeded\",\"attributes\":[{\"name\":\"xitp\",\"value\":\"inzcpdltkrlgj\"},{\"name\":\"tbdrvcqgue\",\"value\":\"zhomp\"},{\"name\":\"eqdurelyujlfyoum\",\"value\":\"ckyeclcdigpta\"}],\"projectId\":\"rzmq\",\"branchId\":\"cycijoclxiut\",\"endpointType\":\"read_write\"},\"id\":\"z\",\"name\":\"zjd\",\"type\":\"r\"},{\"properties\":{\"entityId\":\"txjeaoqaqbzgy\",\"entityName\":\"w\",\"createdAt\":\"uatbwbqamteuliy\",\"provisioningState\":\"Canceled\",\"attributes\":[{\"name\":\"vmwfauxxep\",\"value\":\"ywbo\"},{\"name\":\"mcqmiciijqp\",\"value\":\"zfboj\"},{\"name\":\"jmcsmyqwixvcpwn\",\"value\":\"wy\"},{\"name\":\"zwofalick\",\"value\":\"uoiqt\"}],\"projectId\":\"t\",\"branchId\":\"sknxrwzawnvsbcf\",\"endpointType\":\"read_write\"},\"id\":\"xn\",\"name\":\"hycvdimwrzre\",\"type\":\"zgyufutrwp\"}],\"nextLink\":\"ryekzkd\"}") + "{\"value\":[{\"properties\":{\"entityId\":\"zvoaikna\",\"entityName\":\"nuwiguyxlykwph\",\"createdAt\":\"zc\",\"provisioningState\":\"Canceled\",\"attributes\":[{\"name\":\"ejtlk\",\"value\":\"xaonwivkcqh\"},{\"name\":\"xhxknlc\",\"value\":\"rmmkyupiju\"}],\"projectId\":\"qjfkakfqfrkemyi\",\"branchId\":\"udxjascowv\",\"endpointType\":\"read_write\"},\"id\":\"pdxphlkksnmgzvyf\",\"name\":\"jd\",\"type\":\"zuqnwsithuqo\"},{\"properties\":{\"entityId\":\"hluqwquls\",\"entityName\":\"rjb\",\"createdAt\":\"ykfhyqezvqqugdrf\",\"provisioningState\":\"Canceled\",\"attributes\":[{\"name\":\"xreuquowtlj\",\"value\":\"fwhreagkhyxv\"},{\"name\":\"qtvbczsu\",\"value\":\"mdgglmepjpfs\"}],\"projectId\":\"kgsangpszng\",\"branchId\":\"p\",\"endpointType\":\"read_only\"},\"id\":\"vecjujcn\",\"name\":\"oady\",\"type\":\"dm\"},{\"properties\":{\"entityId\":\"jfoknubnoitpkp\",\"entityName\":\"rgdg\",\"createdAt\":\"coqra\",\"provisioningState\":\"Succeeded\",\"attributes\":[{\"name\":\"xpqitweialwvs\",\"value\":\"buhzacaq\"}],\"projectId\":\"ltcoqc\",\"branchId\":\"pdsxzakuejkm\",\"endpointType\":\"read_only\"},\"id\":\"tjo\",\"name\":\"qcvov\",\"type\":\"uf\"}],\"nextLink\":\"sj\"}") .toObject(EndpointListResult.class); - Assertions.assertEquals("mvmmagoaqylkjz", model.value().get(0).properties().entityName()); - Assertions.assertEquals("xitp", model.value().get(0).properties().attributes().get(0).name()); - Assertions.assertEquals("inzcpdltkrlgj", model.value().get(0).properties().attributes().get(0).value()); - Assertions.assertEquals("rzmq", model.value().get(0).properties().projectId()); - Assertions.assertEquals("cycijoclxiut", model.value().get(0).properties().branchId()); + Assertions.assertEquals("nuwiguyxlykwph", model.value().get(0).properties().entityName()); + Assertions.assertEquals("ejtlk", model.value().get(0).properties().attributes().get(0).name()); + Assertions.assertEquals("xaonwivkcqh", model.value().get(0).properties().attributes().get(0).value()); + Assertions.assertEquals("qjfkakfqfrkemyi", model.value().get(0).properties().projectId()); + Assertions.assertEquals("udxjascowv", model.value().get(0).properties().branchId()); Assertions.assertEquals(EndpointType.READ_WRITE, model.value().get(0).properties().endpointType()); - Assertions.assertEquals("ryekzkd", model.nextLink()); + Assertions.assertEquals("sj", model.nextLink()); } } diff --git a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/EndpointsCreateOrUpdateMockTests.java b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/EndpointsCreateOrUpdateMockTests.java deleted file mode 100644 index ed55839c975a..000000000000 --- a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/EndpointsCreateOrUpdateMockTests.java +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.neonpostgres.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.neonpostgres.NeonPostgresManager; -import com.azure.resourcemanager.neonpostgres.models.Attributes; -import com.azure.resourcemanager.neonpostgres.models.Endpoint; -import com.azure.resourcemanager.neonpostgres.models.EndpointProperties; -import com.azure.resourcemanager.neonpostgres.models.EndpointType; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class EndpointsCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - String responseStr - = "{\"properties\":{\"entityId\":\"yioqe\",\"entityName\":\"w\",\"createdAt\":\"szzgyk\",\"provisioningState\":\"Succeeded\",\"attributes\":[{\"name\":\"anvmwdv\",\"value\":\"jqcrbk\"},{\"name\":\"mpnbnfgyweoj\",\"value\":\"epgcmahiwf\"},{\"name\":\"yawkch\",\"value\":\"apitskshfyftt\"},{\"name\":\"bjepzwhj\",\"value\":\"nfd\"}],\"projectId\":\"ggcj\",\"branchId\":\"hblivwehsudym\",\"endpointType\":\"read_write\"},\"id\":\"dosmbn\",\"name\":\"kqlgxzduv\",\"type\":\"dmxexatmdmnrsenx\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - NeonPostgresManager manager = NeonPostgresManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - Endpoint response = manager.endpoints() - .define("ecwzvcmbpwdluda") - .withExistingBranche("ccpumddhgajkr", "yddt", "fcudvafnbfbqv", "nqnxhgkordwzej") - .withProperties(new EndpointProperties().withEntityName("zldzchubagwnl") - .withAttributes(Arrays.asList(new Attributes().withName("rbzakpjtcqr").withValue("qpojpsucmximc"), - new Attributes().withName("qxynqj").withValue("satkyvscb"))) - .withProjectId("gcru") - .withBranchId("hirc") - .withEndpointType(EndpointType.READ_ONLY)) - .create(); - - Assertions.assertEquals("w", response.properties().entityName()); - Assertions.assertEquals("anvmwdv", response.properties().attributes().get(0).name()); - Assertions.assertEquals("jqcrbk", response.properties().attributes().get(0).value()); - Assertions.assertEquals("ggcj", response.properties().projectId()); - Assertions.assertEquals("hblivwehsudym", response.properties().branchId()); - Assertions.assertEquals(EndpointType.READ_WRITE, response.properties().endpointType()); - } -} diff --git a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/EndpointsDeleteWithResponseMockTests.java b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/EndpointsDeleteWithResponseMockTests.java deleted file mode 100644 index f5942f0fc877..000000000000 --- a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/EndpointsDeleteWithResponseMockTests.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.neonpostgres.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.neonpostgres.NeonPostgresManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class EndpointsDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - NeonPostgresManager manager = NeonPostgresManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - manager.endpoints() - .deleteWithResponse("l", "n", "detawevxehue", "dxljzvdovbrble", "lprdaqccddcbnygd", - com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/EndpointsGetWithResponseMockTests.java b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/EndpointsGetWithResponseMockTests.java deleted file mode 100644 index 530f8d708e70..000000000000 --- a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/EndpointsGetWithResponseMockTests.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.neonpostgres.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.neonpostgres.NeonPostgresManager; -import com.azure.resourcemanager.neonpostgres.models.Endpoint; -import com.azure.resourcemanager.neonpostgres.models.EndpointType; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class EndpointsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"entityId\":\"peswyhhmifjuajx\",\"entityName\":\"vcmmpeglyuq\",\"createdAt\":\"m\",\"provisioningState\":\"Failed\",\"attributes\":[{\"name\":\"zbqufpnezsj\",\"value\":\"aymldrorhyogzms\"},{\"name\":\"m\",\"value\":\"htcuuwdhtqqhyhn\"},{\"name\":\"m\",\"value\":\"tnsugisno\"},{\"name\":\"wnwngh\",\"value\":\"jovkeyym\"}],\"projectId\":\"jixxfsfpcrtn\",\"branchId\":\"uefxxijtebdveywe\",\"endpointType\":\"read_write\"},\"id\":\"lolmcnwepfgsv\",\"name\":\"bv\",\"type\":\"qdljnpe\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - NeonPostgresManager manager = NeonPostgresManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - Endpoint response = manager.endpoints() - .getWithResponse("eitwhlbecgi", "z", "pemnrrabo", "rwwxywpj", "spboxhifp", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("vcmmpeglyuq", response.properties().entityName()); - Assertions.assertEquals("zbqufpnezsj", response.properties().attributes().get(0).name()); - Assertions.assertEquals("aymldrorhyogzms", response.properties().attributes().get(0).value()); - Assertions.assertEquals("jixxfsfpcrtn", response.properties().projectId()); - Assertions.assertEquals("uefxxijtebdveywe", response.properties().branchId()); - Assertions.assertEquals(EndpointType.READ_WRITE, response.properties().endpointType()); - } -} diff --git a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/EndpointsListMockTests.java b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/EndpointsListMockTests.java index 2f1f83ca2303..a7023b5457c3 100644 --- a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/EndpointsListMockTests.java +++ b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/EndpointsListMockTests.java @@ -23,7 +23,7 @@ public final class EndpointsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"entityId\":\"q\",\"entityName\":\"ytgkiql\",\"createdAt\":\"hqtwv\",\"provisioningState\":\"Failed\",\"attributes\":[{\"name\":\"d\",\"value\":\"dzffzjwztsmpchg\"},{\"name\":\"ryelgfyatigfg\",\"value\":\"rrkdknczgor\"},{\"name\":\"wnvojtvmdev\",\"value\":\"lhqvbk\"}],\"projectId\":\"bpyhssrlvkpkp\",\"branchId\":\"cmaccebx\",\"endpointType\":\"read_only\"},\"id\":\"icyvspeslh\",\"name\":\"y\",\"type\":\"kgv\"}]}"; + = "{\"value\":[{\"properties\":{\"entityId\":\"cpajtfe\",\"entityName\":\"kbdgddkrh\",\"createdAt\":\"cxbeuuqutkzwtjww\",\"provisioningState\":\"Failed\",\"attributes\":[{\"name\":\"ijcxfno\",\"value\":\"deg\"},{\"name\":\"dydhqkkkb\",\"value\":\"uckcatuqbhpow\"},{\"name\":\"n\",\"value\":\"tpzdlyseidto\"},{\"name\":\"katprytgrhzbq\",\"value\":\"d\"}],\"projectId\":\"aw\",\"branchId\":\"tvcshtkutzcttb\",\"endpointType\":\"read_write\"},\"id\":\"rdammtzj\",\"name\":\"cfjfxtbwjj\",\"type\":\"rmuydgfttmdofg\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,14 +32,14 @@ public void testList() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - PagedIterable response - = manager.endpoints().list("c", "xwbpwyykdig", "zlrz", "dasdni", com.azure.core.util.Context.NONE); + PagedIterable response = manager.endpoints() + .list("zdqiqdlrat", "kwx", "auwxsuykznhrfgsl", "lhpryjfzihuio", com.azure.core.util.Context.NONE); - Assertions.assertEquals("ytgkiql", response.iterator().next().properties().entityName()); - Assertions.assertEquals("d", response.iterator().next().properties().attributes().get(0).name()); - Assertions.assertEquals("dzffzjwztsmpchg", response.iterator().next().properties().attributes().get(0).value()); - Assertions.assertEquals("bpyhssrlvkpkp", response.iterator().next().properties().projectId()); - Assertions.assertEquals("cmaccebx", response.iterator().next().properties().branchId()); - Assertions.assertEquals(EndpointType.READ_ONLY, response.iterator().next().properties().endpointType()); + Assertions.assertEquals("kbdgddkrh", response.iterator().next().properties().entityName()); + Assertions.assertEquals("ijcxfno", response.iterator().next().properties().attributes().get(0).name()); + Assertions.assertEquals("deg", response.iterator().next().properties().attributes().get(0).value()); + Assertions.assertEquals("aw", response.iterator().next().properties().projectId()); + Assertions.assertEquals("tvcshtkutzcttb", response.iterator().next().properties().branchId()); + Assertions.assertEquals(EndpointType.READ_WRITE, response.iterator().next().properties().endpointType()); } } diff --git a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/NeonDatabaseInnerTests.java b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/NeonDatabaseInnerTests.java index c1b8de639bc7..c11189c9ae4b 100644 --- a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/NeonDatabaseInnerTests.java +++ b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/NeonDatabaseInnerTests.java @@ -6,36 +6,18 @@ import com.azure.core.util.BinaryData; import com.azure.resourcemanager.neonpostgres.fluent.models.NeonDatabaseInner; -import com.azure.resourcemanager.neonpostgres.models.Attributes; -import com.azure.resourcemanager.neonpostgres.models.NeonDatabaseProperties; -import java.util.Arrays; import org.junit.jupiter.api.Assertions; public final class NeonDatabaseInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NeonDatabaseInner model = BinaryData.fromString( - "{\"properties\":{\"entityId\":\"qffawey\",\"entityName\":\"kphyjdxrav\",\"createdAt\":\"qdbrxmrgc\",\"provisioningState\":\"Failed\",\"attributes\":[{\"name\":\"kiyfjjkbajbusc\",\"value\":\"duusioycblevpmcl\"}],\"branchId\":\"yxkyxlz\",\"ownerName\":\"jgkz\"},\"id\":\"taf\",\"name\":\"bzf\",\"type\":\"ovwmbjlzqsczpgvd\"}") + "{\"properties\":{\"entityId\":\"seyqrhvyeldotjv\",\"entityName\":\"wiswskukjtasbvw\",\"createdAt\":\"pkxkdtxfk\",\"provisioningState\":\"Succeeded\",\"attributes\":[{\"name\":\"twknvgm\",\"value\":\"bugtywatmqa\"},{\"name\":\"kueatgroeshoy\",\"value\":\"zcbyfq\"},{\"name\":\"kfaoytehq\",\"value\":\"uvjmv\"},{\"name\":\"mtdwcky\",\"value\":\"roejnndl\"}],\"branchId\":\"juskbrreqyn\",\"ownerName\":\"eysfaqegplw\"},\"id\":\"shwddkvbxgk\",\"name\":\"usybwptdaca\",\"type\":\"vvlfntymtp\"}") .toObject(NeonDatabaseInner.class); - Assertions.assertEquals("kphyjdxrav", model.properties().entityName()); - Assertions.assertEquals("kiyfjjkbajbusc", model.properties().attributes().get(0).name()); - Assertions.assertEquals("duusioycblevpmcl", model.properties().attributes().get(0).value()); - Assertions.assertEquals("yxkyxlz", model.properties().branchId()); - Assertions.assertEquals("jgkz", model.properties().ownerName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NeonDatabaseInner model = new NeonDatabaseInner().withProperties(new NeonDatabaseProperties() - .withEntityName("kphyjdxrav") - .withAttributes(Arrays.asList(new Attributes().withName("kiyfjjkbajbusc").withValue("duusioycblevpmcl"))) - .withBranchId("yxkyxlz") - .withOwnerName("jgkz")); - model = BinaryData.fromObject(model).toObject(NeonDatabaseInner.class); - Assertions.assertEquals("kphyjdxrav", model.properties().entityName()); - Assertions.assertEquals("kiyfjjkbajbusc", model.properties().attributes().get(0).name()); - Assertions.assertEquals("duusioycblevpmcl", model.properties().attributes().get(0).value()); - Assertions.assertEquals("yxkyxlz", model.properties().branchId()); - Assertions.assertEquals("jgkz", model.properties().ownerName()); + Assertions.assertEquals("wiswskukjtasbvw", model.properties().entityName()); + Assertions.assertEquals("twknvgm", model.properties().attributes().get(0).name()); + Assertions.assertEquals("bugtywatmqa", model.properties().attributes().get(0).value()); + Assertions.assertEquals("juskbrreqyn", model.properties().branchId()); + Assertions.assertEquals("eysfaqegplw", model.properties().ownerName()); } } diff --git a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/NeonDatabaseListResultTests.java b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/NeonDatabaseListResultTests.java index 0808780a1ba2..3b2ee894f35e 100644 --- a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/NeonDatabaseListResultTests.java +++ b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/NeonDatabaseListResultTests.java @@ -12,13 +12,13 @@ public final class NeonDatabaseListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NeonDatabaseListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"entityId\":\"fdqwowftpt\",\"entityName\":\"wjtkschgcgqyhl\",\"createdAt\":\"eyqrhv\",\"provisioningState\":\"Succeeded\",\"attributes\":[{\"name\":\"tj\",\"value\":\"dkwisw\"},{\"name\":\"kukjtasb\",\"value\":\"wispkxk\"},{\"name\":\"txfkndlqvt\",\"value\":\"knvgmmbugtywat\"},{\"name\":\"qaqkuea\",\"value\":\"groeshoyg\"}],\"branchId\":\"byfqxkfaoy\",\"ownerName\":\"h\"},\"id\":\"uvjmv\",\"name\":\"mtdwcky\",\"type\":\"roejnndl\"},{\"properties\":{\"entityId\":\"uskbrreq\",\"entityName\":\"kceysfaqegplw\",\"createdAt\":\"shwddkvbxgk\",\"provisioningState\":\"Failed\",\"attributes\":[{\"name\":\"w\",\"value\":\"tdacarvvlfn\"},{\"name\":\"ymtpo\",\"value\":\"wenaz\"},{\"name\":\"r\",\"value\":\"hzr\"},{\"name\":\"qalsxkd\",\"value\":\"wqapfgsdp\"}],\"branchId\":\"essmzhhku\",\"ownerName\":\"pldqqct\"},\"id\":\"valblhtjqv\",\"name\":\"yvwehtaemxh\",\"type\":\"zysevusxi\"},{\"properties\":{\"entityId\":\"rryveimipskdy\",\"entityName\":\"tv\",\"createdAt\":\"zkaftjvvrux\",\"provisioningState\":\"Canceled\",\"attributes\":[{\"name\":\"ei\",\"value\":\"qdsmjtg\"}],\"branchId\":\"gdgkki\",\"ownerName\":\"plkcsm\"},\"id\":\"hwtbbaedorvvm\",\"name\":\"floygbdgwumg\",\"type\":\"dgdhpabgdexj\"},{\"properties\":{\"entityId\":\"jsaqwotmmwllcols\",\"entityName\":\"xaptefhexcgjok\",\"createdAt\":\"jnhvlqjbekpeeks\",\"provisioningState\":\"Failed\",\"attributes\":[{\"name\":\"qhjvyklxeslkhhu\",\"value\":\"tcpoqma\"},{\"name\":\"nwqjwgokn\",\"value\":\"ejjjkxybwfdb\"},{\"name\":\"jbzten\",\"value\":\"vkzykjtjknsxf\"},{\"name\":\"us\",\"value\":\"cdp\"}],\"branchId\":\"pn\",\"ownerName\":\"mgjfbpkuwxeoio\"},\"id\":\"izfavkjzwf\",\"name\":\"cyayk\",\"type\":\"mfzsbf\"}],\"nextLink\":\"rzx\"}") + "{\"value\":[{\"properties\":{\"entityId\":\"ulehurqlr\",\"entityName\":\"fawey\",\"createdAt\":\"kphyjdxrav\",\"provisioningState\":\"Succeeded\",\"attributes\":[{\"name\":\"rxmrgchbapx\",\"value\":\"iyfjjkbajbuscg\"},{\"name\":\"uusioycblev\",\"value\":\"mclujyxkyxlzgs\"}],\"branchId\":\"kzzltafhbzf\",\"ownerName\":\"vwmbjlzqsczpg\"},\"id\":\"wnapfdq\",\"name\":\"owftptnuwjtks\",\"type\":\"h\"}],\"nextLink\":\"gqy\"}") .toObject(NeonDatabaseListResult.class); - Assertions.assertEquals("wjtkschgcgqyhl", model.value().get(0).properties().entityName()); - Assertions.assertEquals("tj", model.value().get(0).properties().attributes().get(0).name()); - Assertions.assertEquals("dkwisw", model.value().get(0).properties().attributes().get(0).value()); - Assertions.assertEquals("byfqxkfaoy", model.value().get(0).properties().branchId()); - Assertions.assertEquals("h", model.value().get(0).properties().ownerName()); - Assertions.assertEquals("rzx", model.nextLink()); + Assertions.assertEquals("fawey", model.value().get(0).properties().entityName()); + Assertions.assertEquals("rxmrgchbapx", model.value().get(0).properties().attributes().get(0).name()); + Assertions.assertEquals("iyfjjkbajbuscg", model.value().get(0).properties().attributes().get(0).value()); + Assertions.assertEquals("kzzltafhbzf", model.value().get(0).properties().branchId()); + Assertions.assertEquals("vwmbjlzqsczpg", model.value().get(0).properties().ownerName()); + Assertions.assertEquals("gqy", model.nextLink()); } } diff --git a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/NeonDatabasesCreateOrUpdateMockTests.java b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/NeonDatabasesCreateOrUpdateMockTests.java deleted file mode 100644 index ac5c7f18385f..000000000000 --- a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/NeonDatabasesCreateOrUpdateMockTests.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.neonpostgres.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.neonpostgres.NeonPostgresManager; -import com.azure.resourcemanager.neonpostgres.models.Attributes; -import com.azure.resourcemanager.neonpostgres.models.NeonDatabase; -import com.azure.resourcemanager.neonpostgres.models.NeonDatabaseProperties; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class NeonDatabasesCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - String responseStr - = "{\"properties\":{\"entityId\":\"yuxlvrhprrv\",\"entityName\":\"onleqflvtl\",\"createdAt\":\"bs\",\"provisioningState\":\"Succeeded\",\"attributes\":[{\"name\":\"kuninttlnrjds\",\"value\":\"dbuziciqppoqvg\"},{\"name\":\"newuhwfw\",\"value\":\"nox\"}],\"branchId\":\"xtfnress\",\"ownerName\":\"pg\"},\"id\":\"ncjmgvsnvbtq\",\"name\":\"xfmj\",\"type\":\"mjnhjlu\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - NeonPostgresManager manager = NeonPostgresManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - NeonDatabase response = manager.neonDatabases() - .define("urbormvh") - .withExistingBranche("hmgw", "nivrxpfduio", "hgyqvpbfj", "oqzucfzluczdq") - .withProperties(new NeonDatabaseProperties().withEntityName("jywzcqyg") - .withAttributes(Arrays.asList(new Attributes().withName("r").withValue("pnrehkunsb"))) - .withBranchId("hhlwtpk") - .withOwnerName("geattbzkg")) - .create(); - - Assertions.assertEquals("onleqflvtl", response.properties().entityName()); - Assertions.assertEquals("kuninttlnrjds", response.properties().attributes().get(0).name()); - Assertions.assertEquals("dbuziciqppoqvg", response.properties().attributes().get(0).value()); - Assertions.assertEquals("xtfnress", response.properties().branchId()); - Assertions.assertEquals("pg", response.properties().ownerName()); - } -} diff --git a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/NeonDatabasesDeleteWithResponseMockTests.java b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/NeonDatabasesDeleteWithResponseMockTests.java deleted file mode 100644 index 7c1dda623515..000000000000 --- a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/NeonDatabasesDeleteWithResponseMockTests.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.neonpostgres.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.neonpostgres.NeonPostgresManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class NeonDatabasesDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - NeonPostgresManager manager = NeonPostgresManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - manager.neonDatabases() - .deleteWithResponse("fnisyxgu", "bmtredscnns", "jcyyuvtzrxzhcle", "wwtzqzcloy", "yup", - com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/NeonDatabasesGetWithResponseMockTests.java b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/NeonDatabasesGetWithResponseMockTests.java deleted file mode 100644 index e87383ee6ac8..000000000000 --- a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/NeonDatabasesGetWithResponseMockTests.java +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.neonpostgres.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.neonpostgres.NeonPostgresManager; -import com.azure.resourcemanager.neonpostgres.models.NeonDatabase; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class NeonDatabasesGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"entityId\":\"n\",\"entityName\":\"uypw\",\"createdAt\":\"vvsfle\",\"provisioningState\":\"Succeeded\",\"attributes\":[{\"name\":\"ayrehj\",\"value\":\"q\"},{\"name\":\"vapxrlzh\",\"value\":\"zihacen\"},{\"name\":\"qzlxn\",\"value\":\"zubfo\"}],\"branchId\":\"dbgmkfwmjcwte\",\"ownerName\":\"hxwyrkbrehzlryn\"},\"id\":\"chamkaeplraju\",\"name\":\"owuywevtjrie\",\"type\":\"kmwlaok\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - NeonPostgresManager manager = NeonPostgresManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - NeonDatabase response = manager.neonDatabases() - .getWithResponse("hbnnxemv", "nuqqkotauratnicp", "fzs", "le", "yrletndqlmf", - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("uypw", response.properties().entityName()); - Assertions.assertEquals("ayrehj", response.properties().attributes().get(0).name()); - Assertions.assertEquals("q", response.properties().attributes().get(0).value()); - Assertions.assertEquals("dbgmkfwmjcwte", response.properties().branchId()); - Assertions.assertEquals("hxwyrkbrehzlryn", response.properties().ownerName()); - } -} diff --git a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/NeonDatabasesListMockTests.java b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/NeonDatabasesListMockTests.java index a230dfd45e8b..3287608c65d2 100644 --- a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/NeonDatabasesListMockTests.java +++ b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/NeonDatabasesListMockTests.java @@ -22,7 +22,7 @@ public final class NeonDatabasesListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"entityId\":\"jsiuepmax\",\"entityName\":\"zlpqmpftxefvulb\",\"createdAt\":\"rtux\",\"provisioningState\":\"Canceled\",\"attributes\":[{\"name\":\"caeo\",\"value\":\"ifq\"},{\"name\":\"ywjflobh\",\"value\":\"hqmomfeco\"},{\"name\":\"kfrocgbmxl\",\"value\":\"j\"}],\"branchId\":\"ezb\",\"ownerName\":\"sylslurbqfygpnyh\"},\"id\":\"zu\",\"name\":\"sc\",\"type\":\"gqyvouprsytqzss\"}]}"; + = "{\"value\":[{\"properties\":{\"entityId\":\"siuorinikcedpk\",\"entityName\":\"iwm\",\"createdAt\":\"mqr\",\"provisioningState\":\"Succeeded\",\"attributes\":[{\"name\":\"vyczyayubt\",\"value\":\"mbxiqahra\"},{\"name\":\"pxmib\",\"value\":\"lnupoyryefqmw\"}],\"branchId\":\"yztxlno\",\"ownerName\":\"pbjceegvy\"},\"id\":\"ztkutnj\",\"name\":\"llukkreh\",\"type\":\"htmjo\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,13 +31,13 @@ public void testList() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - PagedIterable response = manager.neonDatabases() - .list("idhz", "yresgzsdtmwbyorj", "lb", "hychakvyrfbqvum", com.azure.core.util.Context.NONE); + PagedIterable response + = manager.neonDatabases().list("bsat", "oiauesugmocpcj", "cboe", "rgttw", com.azure.core.util.Context.NONE); - Assertions.assertEquals("zlpqmpftxefvulb", response.iterator().next().properties().entityName()); - Assertions.assertEquals("caeo", response.iterator().next().properties().attributes().get(0).name()); - Assertions.assertEquals("ifq", response.iterator().next().properties().attributes().get(0).value()); - Assertions.assertEquals("ezb", response.iterator().next().properties().branchId()); - Assertions.assertEquals("sylslurbqfygpnyh", response.iterator().next().properties().ownerName()); + Assertions.assertEquals("iwm", response.iterator().next().properties().entityName()); + Assertions.assertEquals("vyczyayubt", response.iterator().next().properties().attributes().get(0).name()); + Assertions.assertEquals("mbxiqahra", response.iterator().next().properties().attributes().get(0).value()); + Assertions.assertEquals("yztxlno", response.iterator().next().properties().branchId()); + Assertions.assertEquals("pbjceegvy", response.iterator().next().properties().ownerName()); } } diff --git a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/NeonRoleInnerTests.java b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/NeonRoleInnerTests.java index 3a35c419bc39..727913e784dc 100644 --- a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/NeonRoleInnerTests.java +++ b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/NeonRoleInnerTests.java @@ -6,38 +6,19 @@ import com.azure.core.util.BinaryData; import com.azure.resourcemanager.neonpostgres.fluent.models.NeonRoleInner; -import com.azure.resourcemanager.neonpostgres.models.Attributes; -import com.azure.resourcemanager.neonpostgres.models.NeonRoleProperties; -import java.util.Arrays; import org.junit.jupiter.api.Assertions; public final class NeonRoleInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NeonRoleInner model = BinaryData.fromString( - "{\"properties\":{\"entityId\":\"wsrsxkrplbja\",\"entityName\":\"jwwviy\",\"createdAt\":\"ps\",\"provisioningState\":\"Failed\",\"attributes\":[{\"name\":\"nhjx\",\"value\":\"qwjhqkbiwetpozyc\"}],\"branchId\":\"iqyhgfse\",\"permissions\":[\"e\",\"bsfledynojpziu\"],\"isSuperUser\":false},\"id\":\"kkdtnhqsy\",\"name\":\"ljselp\",\"type\":\"pbafvafhlbylc\"}") + "{\"properties\":{\"entityId\":\"sycljsel\",\"entityName\":\"pbafvafhlbylc\",\"createdAt\":\"evxrhyz\",\"provisioningState\":\"Succeeded\",\"attributes\":[{\"name\":\"ofpltdbm\",\"value\":\"irrhv\"},{\"name\":\"fnrac\",\"value\":\"npq\"}],\"branchId\":\"tuujwouh\",\"permissions\":[\"s\",\"grbjbxsjybvitvqk\",\"y\"],\"isSuperUser\":false},\"id\":\"mtggmu\",\"name\":\"dchozfnkfexl\",\"type\":\"xn\"}") .toObject(NeonRoleInner.class); - Assertions.assertEquals("jwwviy", model.properties().entityName()); - Assertions.assertEquals("nhjx", model.properties().attributes().get(0).name()); - Assertions.assertEquals("qwjhqkbiwetpozyc", model.properties().attributes().get(0).value()); - Assertions.assertEquals("iqyhgfse", model.properties().branchId()); - Assertions.assertEquals("e", model.properties().permissions().get(0)); - Assertions.assertFalse(model.properties().isSuperUser()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NeonRoleInner model = new NeonRoleInner().withProperties(new NeonRoleProperties().withEntityName("jwwviy") - .withAttributes(Arrays.asList(new Attributes().withName("nhjx").withValue("qwjhqkbiwetpozyc"))) - .withBranchId("iqyhgfse") - .withPermissions(Arrays.asList("e", "bsfledynojpziu")) - .withIsSuperUser(false)); - model = BinaryData.fromObject(model).toObject(NeonRoleInner.class); - Assertions.assertEquals("jwwviy", model.properties().entityName()); - Assertions.assertEquals("nhjx", model.properties().attributes().get(0).name()); - Assertions.assertEquals("qwjhqkbiwetpozyc", model.properties().attributes().get(0).value()); - Assertions.assertEquals("iqyhgfse", model.properties().branchId()); - Assertions.assertEquals("e", model.properties().permissions().get(0)); + Assertions.assertEquals("pbafvafhlbylc", model.properties().entityName()); + Assertions.assertEquals("ofpltdbm", model.properties().attributes().get(0).name()); + Assertions.assertEquals("irrhv", model.properties().attributes().get(0).value()); + Assertions.assertEquals("tuujwouh", model.properties().branchId()); + Assertions.assertEquals("s", model.properties().permissions().get(0)); Assertions.assertFalse(model.properties().isSuperUser()); } } diff --git a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/NeonRoleListResultTests.java b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/NeonRoleListResultTests.java index f112bccc3391..acc8fa55da57 100644 --- a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/NeonRoleListResultTests.java +++ b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/NeonRoleListResultTests.java @@ -12,14 +12,14 @@ public final class NeonRoleListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NeonRoleListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"entityId\":\"xrhyzdfwrsofplt\",\"entityName\":\"mairrh\",\"createdAt\":\"fnrac\",\"provisioningState\":\"Canceled\",\"attributes\":[{\"name\":\"g\",\"value\":\"uuj\"},{\"name\":\"ouhdawsigrb\",\"value\":\"bxsjybvitvqkj\"}],\"branchId\":\"znumtggmuwdchoz\",\"permissions\":[\"fexl\",\"xn\"],\"isSuperUser\":false},\"id\":\"zvoaikna\",\"name\":\"lnuwiguy\",\"type\":\"lykwphvxz\"},{\"properties\":{\"entityId\":\"hmpejtlkexaonw\",\"entityName\":\"kcq\",\"createdAt\":\"xhxknlc\",\"provisioningState\":\"Succeeded\",\"attributes\":[{\"name\":\"yupiju\",\"value\":\"yqjf\"},{\"name\":\"akfqfrkemyildud\",\"value\":\"jascowvfdjkpd\"},{\"name\":\"phlkksnm\",\"value\":\"zvyfijdkzuqnwsi\"}],\"branchId\":\"uqoly\",\"permissions\":[\"uqwqulsutrjbhxyk\"],\"isSuperUser\":false},\"id\":\"ezvqq\",\"name\":\"g\",\"type\":\"rftb\"},{\"properties\":{\"entityId\":\"xreuquowtlj\",\"entityName\":\"whreagkhyxvrq\",\"createdAt\":\"bczsulmdgglmepjp\",\"provisioningState\":\"Canceled\",\"attributes\":[{\"name\":\"g\",\"value\":\"angpszngafpgyl\"},{\"name\":\"vecjujcn\",\"value\":\"oady\"},{\"name\":\"dm\",\"value\":\"rgjfoknubnoi\"}],\"branchId\":\"kpztrgd\",\"permissions\":[\"coqra\",\"wugyx\",\"qi\",\"we\"],\"isSuperUser\":false},\"id\":\"vskbuhzacaq\",\"name\":\"yltcoqcuj\",\"type\":\"dsxzakuejkmvb\"}],\"nextLink\":\"tjo\"}") + "{\"value\":[{\"properties\":{\"entityId\":\"naz\",\"entityName\":\"ohzrsqalsx\",\"createdAt\":\"nwqapfgsdpcvess\",\"provisioningState\":\"Succeeded\",\"attributes\":[{\"name\":\"uuipldq\",\"value\":\"ctekval\"}],\"branchId\":\"htjqvqyvw\",\"permissions\":[\"a\"],\"isSuperUser\":false},\"id\":\"zzy\",\"name\":\"ev\",\"type\":\"sxivzrrryvei\"},{\"properties\":{\"entityId\":\"sk\",\"entityName\":\"zatvfuzka\",\"createdAt\":\"jvvruxwigsyei\",\"provisioningState\":\"Succeeded\",\"attributes\":[{\"name\":\"jtgrqgdgkkileplk\",\"value\":\"smk\"},{\"name\":\"hwtbbaedorvvm\",\"value\":\"floygbdgwumg\"}],\"branchId\":\"gdhpabgdexjddv\",\"permissions\":[\"qwotmmwllcol\",\"rsxaptefh\",\"xcgjokjljnhvlq\"],\"isSuperUser\":false},\"id\":\"peeksnbksdqhjv\",\"name\":\"klxesl\",\"type\":\"hhus\"},{\"properties\":{\"entityId\":\"oqmavnwqjwgo\",\"entityName\":\"lejjjkxy\",\"createdAt\":\"fdb\",\"provisioningState\":\"Succeeded\",\"attributes\":[{\"name\":\"ensvkzykjtj\",\"value\":\"nsxfwu\"},{\"name\":\"hcdpkupnqrmgj\",\"value\":\"bpkuwxeoio\"},{\"name\":\"fiz\",\"value\":\"av\"}],\"branchId\":\"zwfbcyaykmmfzs\",\"permissions\":[\"xrzxmdewsrsxkrp\",\"bjazejwwviy\",\"y\",\"suhbrnn\"],\"isSuperUser\":false},\"id\":\"qwjhqkbiwetpozyc\",\"name\":\"qiqyhgfsetzlexbs\",\"type\":\"ledynojpz\"}],\"nextLink\":\"wfbzkkdt\"}") .toObject(NeonRoleListResult.class); - Assertions.assertEquals("mairrh", model.value().get(0).properties().entityName()); - Assertions.assertEquals("g", model.value().get(0).properties().attributes().get(0).name()); - Assertions.assertEquals("uuj", model.value().get(0).properties().attributes().get(0).value()); - Assertions.assertEquals("znumtggmuwdchoz", model.value().get(0).properties().branchId()); - Assertions.assertEquals("fexl", model.value().get(0).properties().permissions().get(0)); + Assertions.assertEquals("ohzrsqalsx", model.value().get(0).properties().entityName()); + Assertions.assertEquals("uuipldq", model.value().get(0).properties().attributes().get(0).name()); + Assertions.assertEquals("ctekval", model.value().get(0).properties().attributes().get(0).value()); + Assertions.assertEquals("htjqvqyvw", model.value().get(0).properties().branchId()); + Assertions.assertEquals("a", model.value().get(0).properties().permissions().get(0)); Assertions.assertFalse(model.value().get(0).properties().isSuperUser()); - Assertions.assertEquals("tjo", model.nextLink()); + Assertions.assertEquals("wfbzkkdt", model.nextLink()); } } diff --git a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/NeonRolesCreateOrUpdateMockTests.java b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/NeonRolesCreateOrUpdateMockTests.java deleted file mode 100644 index a36bde4488fa..000000000000 --- a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/NeonRolesCreateOrUpdateMockTests.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.neonpostgres.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.neonpostgres.NeonPostgresManager; -import com.azure.resourcemanager.neonpostgres.models.Attributes; -import com.azure.resourcemanager.neonpostgres.models.NeonRole; -import com.azure.resourcemanager.neonpostgres.models.NeonRoleProperties; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class NeonRolesCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - String responseStr - = "{\"properties\":{\"entityId\":\"jkmqenhaidzrpv\",\"entityName\":\"lo\",\"createdAt\":\"vslvivqsuvwten\",\"provisioningState\":\"Succeeded\",\"attributes\":[{\"name\":\"pkhc\",\"value\":\"oa\"}],\"branchId\":\"ukuicjuftekioo\",\"permissions\":[\"ue\",\"fhvpxjhxzubfj\",\"abbwzgvzu\",\"ixcdckixs\"],\"isSuperUser\":true},\"id\":\"gavkmv\",\"name\":\"xzerej\",\"type\":\"kpzjbyetjxryopt\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - NeonPostgresManager manager = NeonPostgresManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - NeonRole response = manager.neonRoles() - .define("tgvpatr") - .withExistingBranche("olefcjisepkdbxo", "fb", "ampqocl", "nnmxynlsuqbwzstr") - .withProperties(new NeonRoleProperties().withEntityName("icruo") - .withAttributes(Arrays.asList(new Attributes().withName("pqsdoc").withValue("p"), - new Attributes().withName("pujzfl").withValue("cdsgxceluji"), - new Attributes().withName("wlluunxhfwlfxz").withValue("wu"), - new Attributes().withName("eupcknecexkgrv").withValue("psjdmng"))) - .withBranchId("tqpdzfyxcnwawoxc") - .withPermissions(Arrays.asList("ejqfbi", "opfjx", "wdrpa", "q")) - .withIsSuperUser(false)) - .create(); - - Assertions.assertEquals("lo", response.properties().entityName()); - Assertions.assertEquals("pkhc", response.properties().attributes().get(0).name()); - Assertions.assertEquals("oa", response.properties().attributes().get(0).value()); - Assertions.assertEquals("ukuicjuftekioo", response.properties().branchId()); - Assertions.assertEquals("ue", response.properties().permissions().get(0)); - Assertions.assertTrue(response.properties().isSuperUser()); - } -} diff --git a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/NeonRolesDeleteWithResponseMockTests.java b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/NeonRolesDeleteWithResponseMockTests.java deleted file mode 100644 index 04d1d3e9e8f8..000000000000 --- a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/NeonRolesDeleteWithResponseMockTests.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.neonpostgres.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.neonpostgres.NeonPostgresManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class NeonRolesDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - NeonPostgresManager manager = NeonPostgresManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - manager.neonRoles() - .deleteWithResponse("garp", "ctwrapcz", "ojqyvzes", "pi", "snj", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/NeonRolesGetWithResponseMockTests.java b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/NeonRolesGetWithResponseMockTests.java deleted file mode 100644 index 34695b5fa124..000000000000 --- a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/NeonRolesGetWithResponseMockTests.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.neonpostgres.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.neonpostgres.NeonPostgresManager; -import com.azure.resourcemanager.neonpostgres.models.NeonRole; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class NeonRolesGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"entityId\":\"rlcjiw\",\"entityName\":\"xfaiocwdgujjgnf\",\"createdAt\":\"zxbarcbpae\",\"provisioningState\":\"Succeeded\",\"attributes\":[{\"name\":\"mjw\",\"value\":\"njcytesmfucrtfod\"},{\"name\":\"hua\",\"value\":\"zmzivrtrfzhhez\"},{\"name\":\"hjud\",\"value\":\"dyyrudma\"}],\"branchId\":\"wtvdkxb\",\"permissions\":[\"gfenf\",\"dxbvwf\",\"jchivdrijanx\"],\"isSuperUser\":true},\"id\":\"vardlmzjotprrm\",\"name\":\"hcuhtuzlxiw\",\"type\":\"o\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - NeonPostgresManager manager = NeonPostgresManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - NeonRole response = manager.neonRoles() - .getWithResponse("llbsupubdxc", "dlhzwhcu", "vbosjj", "dizhrjqfyaytvsly", "kcgn", - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("xfaiocwdgujjgnf", response.properties().entityName()); - Assertions.assertEquals("mjw", response.properties().attributes().get(0).name()); - Assertions.assertEquals("njcytesmfucrtfod", response.properties().attributes().get(0).value()); - Assertions.assertEquals("wtvdkxb", response.properties().branchId()); - Assertions.assertEquals("gfenf", response.properties().permissions().get(0)); - Assertions.assertTrue(response.properties().isSuperUser()); - } -} diff --git a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/NeonRolesListMockTests.java b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/NeonRolesListMockTests.java index 3be1d9cb6a28..7d9386bc88e1 100644 --- a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/NeonRolesListMockTests.java +++ b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/NeonRolesListMockTests.java @@ -22,7 +22,7 @@ public final class NeonRolesListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"entityId\":\"rxxhyrkqakof\",\"entityName\":\"freprfvm\",\"createdAt\":\"nwt\",\"provisioningState\":\"Failed\",\"attributes\":[{\"name\":\"hi\",\"value\":\"bcejopylbl\"},{\"name\":\"sp\",\"value\":\"r\"},{\"name\":\"cspimtcvvfxrdy\",\"value\":\"zfslxizhqikmgob\"},{\"name\":\"iqemcdiiisklbon\",\"value\":\"xu\"}],\"branchId\":\"xvtrkfk\",\"permissions\":[\"jqnnpjwkosnyxi\",\"fou\",\"jcxgdqmrlhnzkwo\",\"swnyinxuprrxyxwj\"],\"isSuperUser\":false},\"id\":\"qployu\",\"name\":\"kdcpvu\",\"type\":\"trsvjmnsvujnjkt\"}]}"; + = "{\"value\":[{\"properties\":{\"entityId\":\"kddn\",\"entityName\":\"vbooqbmdqrxy\",\"createdAt\":\"ae\",\"provisioningState\":\"Succeeded\",\"attributes\":[{\"name\":\"wtjdtlriefoo\",\"value\":\"ycuxdtzcqip\"}],\"branchId\":\"ud\",\"permissions\":[\"zzomehxl\"],\"isSuperUser\":true},\"id\":\"la\",\"name\":\"lbij\",\"type\":\"xkqllczipvwdtgc\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,13 +32,13 @@ public void testList() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.neonRoles() - .list("yo", "aadcndazabundt", "ewkaupwhl", "yckremgjlmsvdo", com.azure.core.util.Context.NONE); + .list("uif", "ulxfaryrvjl", "dezvjqw", "hoyiyaxqvjweiw", com.azure.core.util.Context.NONE); - Assertions.assertEquals("freprfvm", response.iterator().next().properties().entityName()); - Assertions.assertEquals("hi", response.iterator().next().properties().attributes().get(0).name()); - Assertions.assertEquals("bcejopylbl", response.iterator().next().properties().attributes().get(0).value()); - Assertions.assertEquals("xvtrkfk", response.iterator().next().properties().branchId()); - Assertions.assertEquals("jqnnpjwkosnyxi", response.iterator().next().properties().permissions().get(0)); - Assertions.assertFalse(response.iterator().next().properties().isSuperUser()); + Assertions.assertEquals("vbooqbmdqrxy", response.iterator().next().properties().entityName()); + Assertions.assertEquals("wtjdtlriefoo", response.iterator().next().properties().attributes().get(0).name()); + Assertions.assertEquals("ycuxdtzcqip", response.iterator().next().properties().attributes().get(0).value()); + Assertions.assertEquals("ud", response.iterator().next().properties().branchId()); + Assertions.assertEquals("zzomehxl", response.iterator().next().properties().permissions().get(0)); + Assertions.assertTrue(response.iterator().next().properties().isSuperUser()); } } diff --git a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/OperationsListMockTests.java b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/OperationsListMockTests.java index dee92b3c17da..28c97c1c440b 100644 --- a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/OperationsListMockTests.java +++ b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/OperationsListMockTests.java @@ -21,7 +21,7 @@ public final class OperationsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"name\":\"eotta\",\"isDataAction\":false,\"display\":{\"provider\":\"xwwhnh\",\"resource\":\"fv\",\"operation\":\"dpmiljpn\",\"description\":\"nudqllz\"},\"origin\":\"user\",\"actionType\":\"Internal\"}]}"; + = "{\"value\":[{\"name\":\"zmwntopagt\",\"isDataAction\":false,\"display\":{\"provider\":\"agoaqylkjztji\",\"resource\":\"zjcg\",\"operation\":\"itpfinzcpdl\",\"description\":\"rlgjm\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); diff --git a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/OrganizationsCreateOrUpdateMockTests.java b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/OrganizationsCreateOrUpdateMockTests.java index 28781e2c4d02..e04aedcf7ce2 100644 --- a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/OrganizationsCreateOrUpdateMockTests.java +++ b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/OrganizationsCreateOrUpdateMockTests.java @@ -41,7 +41,7 @@ public final class OrganizationsCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"properties\":{\"marketplaceDetails\":{\"subscriptionId\":\"vvyezslpu\",\"subscriptionStatus\":\"Unsubscribed\",\"offerDetails\":{\"publisherId\":\"bdsval\",\"offerId\":\"nptw\",\"planId\":\"rkxgpazwugxyqvnj\",\"planName\":\"felhldiuhzzgqlm\",\"termUnit\":\"ewzgiud\",\"termId\":\"xpqh\"}},\"userDetails\":{\"firstName\":\"qhnmhk\",\"lastName\":\"zsdsuxheqdgcrux\",\"emailAddress\":\"inymmqgwokmikp\",\"upn\":\"fbmjxuvji\",\"phoneNumber\":\"dvhaxdvw\"},\"companyDetails\":{\"companyName\":\"ehpphthdklmveta\",\"country\":\"akfqoixwgiksb\",\"officeAddress\":\"tooxrpog\",\"businessPhone\":\"hchgjtnhtukf\",\"domain\":\"ihmbfntume\",\"numberOfEmployees\":1546739330470785523},\"provisioningState\":\"Succeeded\",\"partnerOrganizationProperties\":{\"organizationId\":\"nuvwcgasgomtmjzw\",\"organizationName\":\"uqgovsxpwwztjfm\",\"singleSignOnProperties\":{\"singleSignOnState\":\"Enable\",\"enterpriseAppId\":\"fred\",\"singleSignOnUrl\":\"scgrllccna\",\"aadDomains\":[\"owazhpabacom\",\"yotgkwsxnsrqorc\",\"enmvcebxeetq\"]}},\"projectProperties\":{\"entityId\":\"cxxqndc\",\"entityName\":\"kedwqurcgojmrv\",\"createdAt\":\"wjongzs\",\"provisioningState\":\"Failed\",\"attributes\":[{\"name\":\"silc\",\"value\":\"hskxx\"},{\"name\":\"ansbvriaqg\",\"value\":\"tojrulfucte\"},{\"name\":\"rthcfjzh\",\"value\":\"lyubqjrostvrjeq\"},{\"name\":\"tzzbeq\",\"value\":\"ztr\"}],\"regionId\":\"lxrdhabsrwrsn\",\"storage\":7499575874504761759,\"pgVersion\":41736944,\"historyRetention\":492926424,\"defaultEndpointSettings\":{\"autoscalingLimitMinCu\":60.42835552785731,\"autoscalingLimitMaxCu\":53.12115373214405},\"branch\":{\"entityId\":\"kvvcsemsvuvdjkq\",\"entityName\":\"tqmm\",\"createdAt\":\"vrjjxnw\",\"provisioningState\":\"Succeeded\",\"attributes\":[{\"name\":\"ojxl\",\"value\":\"hzlxpgfquw\"}],\"projectId\":\"w\",\"parentId\":\"belwcer\",\"roleName\":\"w\",\"databaseName\":\"jxljtxbusq\",\"roles\":[{},{},{},{}],\"databases\":[{},{}],\"endpoints\":[{},{},{}]},\"roles\":[{\"entityId\":\"zhgbdgzpagsecn\",\"entityName\":\"buwq\",\"createdAt\":\"xfllmqiyn\",\"provisioningState\":\"Succeeded\",\"attributes\":[{\"name\":\"lnkkiiwvmtumxpym\",\"value\":\"jfuaxroqvqpilrgu\"}],\"branchId\":\"anlduwzorxsb\",\"permissions\":[\"qk\",\"xym\"],\"isSuperUser\":true},{\"entityId\":\"fqep\",\"entityName\":\"cl\",\"createdAt\":\"ubwyv\",\"provisioningState\":\"Failed\",\"attributes\":[{\"name\":\"cpj\",\"value\":\"du\"},{\"name\":\"gixexkydfbwlj\",\"value\":\"vhuerkjddvrglieg\"},{\"name\":\"tcvbiiftk\",\"value\":\"dwgdn\"}],\"branchId\":\"fgmwd\",\"permissions\":[\"buvczldbglzoutb\"],\"isSuperUser\":false},{\"entityId\":\"zeka\",\"entityName\":\"lyzgsnor\",\"createdAt\":\"gmnzjotvmrx\",\"provisioningState\":\"Failed\",\"attributes\":[{\"name\":\"vvjbhvhdiqayf\",\"value\":\"uiyuosnu\"},{\"name\":\"dtelvhyibdrqrs\",\"value\":\"hbuubpy\"},{\"name\":\"owtjo\",\"value\":\"ztfwfqchvcz\"}],\"branchId\":\"j\",\"permissions\":[\"tagfyvrtpqp\"],\"isSuperUser\":true},{\"entityId\":\"cgkrepdqhqy\",\"entityName\":\"qwemvxqabckmzeo\",\"createdAt\":\"nhgr\",\"provisioningState\":\"Failed\",\"attributes\":[{\"name\":\"h\",\"value\":\"puz\"},{\"name\":\"pceeznzangprbf\",\"value\":\"xyxz\"},{\"name\":\"bcip\",\"value\":\"msexroqr\"},{\"name\":\"dktxfv\",\"value\":\"nfee\"}],\"branchId\":\"pkrietbgni\",\"permissions\":[\"wwzkyf\",\"nwpiwxeiicrm\",\"e\"],\"isSuperUser\":true}],\"databases\":[{\"entityId\":\"xxij\",\"entityName\":\"kwsdgkj\",\"createdAt\":\"acwras\",\"provisioningState\":\"Succeeded\",\"attributes\":[{\"name\":\"cvo\",\"value\":\"nwoqartwy\"},{\"name\":\"qicladv\",\"value\":\"tdavuqmcbymsfobj\"},{\"name\":\"quvjez\",\"value\":\"j\"}],\"branchId\":\"v\",\"ownerName\":\"imioyo\"},{\"entityId\":\"l\",\"entityName\":\"iqwnnraclibbfq\",\"createdAt\":\"pkl\",\"provisioningState\":\"Canceled\",\"attributes\":[{\"name\":\"nhautwukexzgpmnm\",\"value\":\"be\"},{\"name\":\"dqilwgdfpf\",\"value\":\"fpcvstclgqrvwerf\"},{\"name\":\"xbsmtbljje\",\"value\":\"hci\"},{\"name\":\"kwdvbtb\",\"value\":\"ekqhs\"}],\"branchId\":\"tfpwpqbyejuw\",\"ownerName\":\"wdqi\"},{\"entityId\":\"ghg\",\"entityName\":\"z\",\"createdAt\":\"lujkhn\",\"provisioningState\":\"Canceled\",\"attributes\":[{\"name\":\"kfmkhcqtwmlmhjn\",\"value\":\"tqeahje\"}],\"branchId\":\"r\",\"ownerName\":\"pok\"},{\"entityId\":\"xejhh\",\"entityName\":\"guavtptb\",\"createdAt\":\"wkqyns\",\"provisioningState\":\"Canceled\",\"attributes\":[{\"name\":\"ffbkkwvdxaexqo\",\"value\":\"myr\"},{\"name\":\"jialz\",\"value\":\"nobrqlpb\"},{\"name\":\"jtrpzuyud\",\"value\":\"vbxnhsqeaeonqe\"},{\"name\":\"wgdhu\",\"value\":\"uzytz\"}],\"branchId\":\"ogatmoljiy\",\"ownerName\":\"pinm\"}],\"endpoints\":[{\"entityId\":\"neerzztrknsj\",\"entityName\":\"ugdybnhrxlel\",\"createdAt\":\"hkeizcp\",\"provisioningState\":\"Succeeded\",\"attributes\":[{\"name\":\"iwje\",\"value\":\"p\"}],\"projectId\":\"caydbjzcqymlcfnz\",\"branchId\":\"hsurlgw\",\"endpointType\":\"read_only\"},{\"entityId\":\"m\",\"entityName\":\"stauolawi\",\"createdAt\":\"momsgvvj\",\"provisioningState\":\"Failed\",\"attributes\":[{\"name\":\"lohewjjmajnkdflq\",\"value\":\"onswae\"},{\"name\":\"kzfzqxjosho\",\"value\":\"totryegpkhxrme\"}],\"projectId\":\"nlwkbfokxkhupz\",\"branchId\":\"ufgjblcdr\",\"endpointType\":\"read_write\"},{\"entityId\":\"emftzgyyky\",\"entityName\":\"ugekdfqn\",\"createdAt\":\"twd\",\"provisioningState\":\"Succeeded\",\"attributes\":[{\"name\":\"fjjnnuxxr\",\"value\":\"kmhmnulwempdc\"},{\"name\":\"frhjulrsulwzp\",\"value\":\"lusnawmhhgzotfr\"},{\"name\":\"yrgkoekv\",\"value\":\"wxxyxhighctx\"}],\"projectId\":\"molpcqyde\",\"branchId\":\"vskiczd\",\"endpointType\":\"read_only\"}]}},\"location\":\"izikgqaboohxbm\",\"tags\":{\"qaeo\":\"cqsxrmdvewu\",\"hhdau\":\"pjhgejkb\"},\"id\":\"ghoox\",\"name\":\"exbkhx\",\"type\":\"xjoezlqxrkdknko\"}"; + = "{\"properties\":{\"marketplaceDetails\":{\"subscriptionId\":\"wnykdidjchlrmpw\",\"subscriptionStatus\":\"Suspended\",\"offerDetails\":{\"publisherId\":\"fldseacdhz\",\"offerId\":\"xkbrfg\",\"planId\":\"rwjiyew\",\"planName\":\"jsrwqrxetf\",\"termUnit\":\"wvrrmdqn\",\"termId\":\"cnawth\"}},\"userDetails\":{\"firstName\":\"ax\",\"lastName\":\"u\",\"emailAddress\":\"a\",\"upn\":\"mhudfjecehokwcp\",\"phoneNumber\":\"wloesqrggvrbn\"},\"companyDetails\":{\"companyName\":\"ukoila\",\"country\":\"duwjleipjlhwy\",\"officeAddress\":\"zr\",\"businessPhone\":\"ythqkkwhbgxvel\",\"domain\":\"ulnxdmnit\",\"numberOfEmployees\":7153993027316867734},\"provisioningState\":\"Succeeded\",\"partnerOrganizationProperties\":{\"organizationId\":\"lyymffhmjpddny\",\"organizationName\":\"fzuvrzmz\",\"singleSignOnProperties\":{\"singleSignOnState\":\"Initial\",\"enterpriseAppId\":\"rb\",\"singleSignOnUrl\":\"vnmdyfoeboj\",\"aadDomains\":[\"pglaoh\"]}},\"projectProperties\":{\"entityId\":\"pjtnqjilaywkdcw\",\"entityName\":\"syril\",\"createdAt\":\"xdqaolfylnkkb\",\"provisioningState\":\"Failed\",\"attributes\":[{\"name\":\"ywltmfwobbjwhlwy\",\"value\":\"fnqzocr\"},{\"name\":\"zgczeu\",\"value\":\"tgxdncaqt\"}],\"regionId\":\"ekoifuvnyttzgi\",\"storage\":2457380421426493001,\"pgVersion\":78093176,\"historyRetention\":337288247,\"defaultEndpointSettings\":{\"autoscalingLimitMinCu\":56.992264853873294,\"autoscalingLimitMaxCu\":20.08940976841036},\"branch\":{\"entityId\":\"txnr\",\"entityName\":\"kndrndpgfjo\",\"createdAt\":\"daqotwfh\",\"provisioningState\":\"Failed\",\"attributes\":[{\"name\":\"sabvcip\",\"value\":\"wza\"},{\"name\":\"czuumljcir\",\"value\":\"pefyc\"},{\"name\":\"veitit\",\"value\":\"nsxzajlns\"},{\"name\":\"hwjuyxxbxqvmvua\",\"value\":\"tuadxkxeqb\"}],\"projectId\":\"ntghyksarcdr\",\"parentId\":\"sluvlzladltxkpb\",\"roleName\":\"v\",\"databaseName\":\"qqjwkrh\",\"roles\":[{}],\"databases\":[{},{},{}],\"endpoints\":[{},{},{},{}]},\"roles\":[{\"entityId\":\"glmvoka\",\"entityName\":\"ztjctibpvbkae\",\"createdAt\":\"smz\",\"provisioningState\":\"Canceled\",\"attributes\":[{\"name\":\"akw\",\"value\":\"eivmak\"},{\"name\":\"hysowljuxlkbect\",\"value\":\"tfjmskdchmaiub\"},{\"name\":\"vlzw\",\"value\":\"vgmfalkzazmgok\"},{\"name\":\"dgjqafkmkro\",\"value\":\"zrthqet\"}],\"branchId\":\"qrtvaoznqni\",\"permissions\":[\"zeagmceituuge\",\"hfpjstlzmbls\",\"jdeolctae\",\"fsyrledjc\"],\"isSuperUser\":false},{\"entityId\":\"vtqigdxzvsgeafg\",\"entityName\":\"sehxlzsxezp\",\"createdAt\":\"kwaaesk\",\"provisioningState\":\"Canceled\",\"attributes\":[{\"name\":\"zeqtoyrplixlajml\",\"value\":\"pq\"}],\"branchId\":\"vh\",\"permissions\":[\"owgw\",\"tmk\",\"kxpkzwaq\"],\"isSuperUser\":false}],\"databases\":[{\"entityId\":\"chiqbplvfid\",\"entityName\":\"ztekxbyjgmsfep\",\"createdAt\":\"ihpq\",\"provisioningState\":\"Canceled\",\"attributes\":[{\"name\":\"hrdicxdwyjfo\",\"value\":\"xwyovcxjsgbip\"},{\"name\":\"ukdveksbuhoduc\",\"value\":\"v\"}],\"branchId\":\"crdpibfdyjduss\",\"ownerName\":\"szekbh\"},{\"entityId\":\"kaaggkreh\",\"entityName\":\"rnuybffljfii\",\"createdAt\":\"eoagsqta\",\"provisioningState\":\"Canceled\",\"attributes\":[{\"name\":\"e\",\"value\":\"xfavsqwudoh\"},{\"name\":\"i\",\"value\":\"fmnlikpsims\"}],\"branchId\":\"ypofqpmbhyqgs\",\"ownerName\":\"mmttjxophge\"},{\"entityId\":\"smv\",\"entityName\":\"htwzmqilr\",\"createdAt\":\"ysfn\",\"provisioningState\":\"Canceled\",\"attributes\":[{\"name\":\"wwwmhkruwaedrym\",\"value\":\"mlqoinhzduew\"}],\"branchId\":\"apfjiik\",\"ownerName\":\"diqfliejhpclbi\"},{\"entityId\":\"fsbw\",\"entityName\":\"ivbvzi\",\"createdAt\":\"wxgoooxzpra\",\"provisioningState\":\"Canceled\",\"attributes\":[{\"name\":\"knpdgzigjsu\",\"value\":\"swhgsaodk\"},{\"name\":\"wnbaf\",\"value\":\"ctohzhaquvwsxbgn\"}],\"branchId\":\"ervqchoadhrsxqvz\",\"ownerName\":\"pabdsrg\"}],\"endpoints\":[{\"entityId\":\"lzrsub\",\"entityName\":\"rxhjnltcet\",\"createdAt\":\"vqy\",\"provisioningState\":\"Succeeded\",\"attributes\":[{\"name\":\"kw\",\"value\":\"ruwdxvqzxoebwgj\"},{\"name\":\"bibanbau\",\"value\":\"wtzvpakloz\"}],\"projectId\":\"bzrpejp\",\"branchId\":\"s\",\"endpointType\":\"read_only\"},{\"entityId\":\"ttkgsux\",\"entityName\":\"rswgkpjhboyikeb\",\"createdAt\":\"hkslgwlokhueoij\",\"provisioningState\":\"Succeeded\",\"attributes\":[{\"name\":\"pzqzufgs\",\"value\":\"fejyvdwtfxptpqa\"},{\"name\":\"amkncfgy\",\"value\":\"mxsnxocuul\"},{\"name\":\"ojkpoyh\",\"value\":\"wwdjuxdbdl\"},{\"name\":\"zgdyrcvuqbs\",\"value\":\"zlrqhbjnqogdx\"}],\"projectId\":\"sfpyxx\",\"branchId\":\"lflec\",\"endpointType\":\"read_write\"},{\"entityId\":\"xojjl\",\"entityName\":\"xdhilz\",\"createdAt\":\"zzqjmu\",\"provisioningState\":\"Succeeded\",\"attributes\":[{\"name\":\"vribqlotokht\",\"value\":\"wtaznkcqw\"},{\"name\":\"xwjyofgwhnk\",\"value\":\"tlwljssmcts\"}],\"projectId\":\"dkpwolgisub\",\"branchId\":\"teogfgfiijr\",\"endpointType\":\"read_write\"},{\"entityId\":\"efksxqceaz\",\"entityName\":\"xgnmqvzvluyq\",\"createdAt\":\"ios\",\"provisioningState\":\"Failed\",\"attributes\":[{\"name\":\"aifppuacvfyeowp\",\"value\":\"fxtjdhsoym\"},{\"name\":\"pvtyqfttehdpbouj\",\"value\":\"tkfvvdshx\"},{\"name\":\"dedsuenygnxcgjtf\",\"value\":\"nquktrfnslnlrxs\"}],\"projectId\":\"ltrwntfmtbg\",\"branchId\":\"dxwnazkurrd\",\"endpointType\":\"read_write\"}]}},\"location\":\"jwh\",\"tags\":{\"z\":\"wwj\",\"qzzdcykeyste\":\"qseuzuukykcyqhy\"},\"id\":\"fop\",\"name\":\"z\",\"type\":\"azgbsqgpe\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -52,240 +52,210 @@ public void testCreateOrUpdate() throws Exception { OrganizationResource response = manager.organizations() - .define("wthv") - .withRegion("cjfncjwvuagfq") - .withExistingResourceGroup("vrrmdqntycn") - .withTags(mapOf("ijajwolx", "tngvmreuptrklz", "aghm", "s", "xqlaps", "ynwlslrcigtzjcv")) + .define("nzpphepife") + .withRegion("aqo") + .withExistingResourceGroup("cvumepjpbi") + .withTags(mapOf("xxw", "bebauzlqb", "njzudr", "f")) .withProperties( new OrganizationProperties() - .withMarketplaceDetails(new MarketplaceDetails().withSubscriptionId("gnuyeamcmhu") - .withSubscriptionStatus(MarketplaceSubscriptionStatus.SUSPENDED) - .withOfferDetails(new OfferDetails().withPublisherId("ecehokw") - .withOfferId("pqtwloesqrggvrb") - .withPlanId("yrukoi") - .withPlanName("ciduwjle") - .withTermUnit("jlhwyxpzruzyt") - .withTermId("kkwhbgxvellvulnx"))) - .withUserDetails(new UserDetails().withFirstName("nitmujdtvmclyymf") - .withLastName("mjpddnyxf") - .withEmailAddress("v") - .withUpn("mzqmzjqrb") - .withPhoneNumber("vnmdyfoeboj")) - .withCompanyDetails(new CompanyDetails().withCompanyName("pp") - .withCountry("aohoqkpjtnq") - .withOfficeAddress("l") - .withBusinessPhone("wkdcwmqs") - .withDomain("ilm") - .withNumberOfEmployees(3069082401150326102L)) + .withMarketplaceDetails(new MarketplaceDetails().withSubscriptionId("qirccj") + .withSubscriptionStatus(MarketplaceSubscriptionStatus.UNSUBSCRIBED) + .withOfferDetails(new OfferDetails().withPublisherId("kcgxvrpjlvc") + .withOfferId("uod") + .withPlanId("cpunettepdjx") + .withPlanName("skoynuiylpc") + .withTermUnit("ewsedveskwxe") + .withTermId("phrgfnzhctm"))) + .withUserDetails(new UserDetails().withFirstName("sghpbcbcpzarpze") + .withLastName("cdl") + .withEmailAddress("zmpypefcpczshnu") + .withUpn("daizupf") + .withPhoneNumber("uytuszxhmtvtv")) + .withCompanyDetails(new CompanyDetails().withCompanyName("w") + .withCountry("ukvzwydwttha") + .withOfficeAddress("gkskjivbss") + .withBusinessPhone("jqf") + .withDomain("peexpgeumilhwuit") + .withNumberOfEmployees(5672153310578529089L)) .withPartnerOrganizationProperties(new PartnerOrganizationProperties() - .withOrganizationId("ylnkkbjpjvlywltm") - .withOrganizationName("wob") + .withOrganizationId("ofninbdbz") + .withOrganizationName("xcwqqrsmpc") .withSingleSignOnProperties(new SingleSignOnProperties() - .withSingleSignOnState(SingleSignOnStates.ENABLE) - .withEnterpriseAppId("wyjfnqzocrdzgcze") - .withSingleSignOnUrl("tgxdncaqt") - .withAadDomains(Arrays.asList("koifuvnyttz", "ixgy", "ihlgm", "behlqtxnr")))) - .withProjectProperties( - new ProjectProperties().withEntityName("dhdaqotwfhipx") - .withAttributes(Arrays.asList( - new Attributes().withName("czuumljcir").withValue("pefyc"), - new Attributes().withName("veitit").withValue("nsxzajlns"), - new Attributes().withName("hwjuyxxbxqvmvua").withValue("tuadxkxeqb"))) - .withRegionId("ntghyksarcdr") - .withStorage(7778379261091280820L) - .withPgVersion(1793041160) - .withHistoryRetention(618821058) - .withDefaultEndpointSettings( - new DefaultEndpointSettings().withAutoscalingLimitMinCu(84.97788227149199) - .withAutoscalingLimitMaxCu(32.864452943761954)) - .withBranch(new BranchProperties().withEntityName("zdanojis") + .withSingleSignOnState(SingleSignOnStates.INITIAL) + .withEnterpriseAppId("ugavbzbcyksivmf") + .withSingleSignOnUrl("dr") + .withAadDomains(Arrays.asList("cmkrftsjcwjj", "sgmbawvif")))) + .withProjectProperties(new ProjectProperties().withEntityName("ocjxw") + .withAttributes(Arrays.asList( + new Attributes().withName("cmufunlcpxxv").withValue("ryeyngjgv"), + new Attributes().withName("quv").withValue("ygg"))) + .withRegionId("mcrdcue") + .withStorage(8588788839939133355L) + .withPgVersion(1758485796) + .withHistoryRetention(203550094) + .withDefaultEndpointSettings( + new DefaultEndpointSettings() + .withAutoscalingLimitMinCu(5.916810926116122) + .withAutoscalingLimitMaxCu(81.53058777402022)) + .withBranch(new BranchProperties().withEntityName("zodubtlm") + .withAttributes( + Arrays.asList(new Attributes().withName("xgbkkqvjcteo").withValue("dlrslskk"), + new Attributes().withName("pxvjnzd").withValue("vocoj"), + new Attributes().withName("pcnab").withValue("zf"), + new Attributes().withName("nggy").withValue("e"))) + .withProjectId("zilmhivzkww") + .withParentId("cknrzda") + .withRoleName("skzptjxulweucyr") + .withDatabaseName("xqlehmc") + .withRoles(Arrays.asList(new NeonRoleProperties())) + .withDatabases(Arrays.asList(new NeonDatabaseProperties())) + .withEndpoints(Arrays.asList(new EndpointProperties()))) + .withRoles(Arrays.asList(new NeonRoleProperties().withEntityName("qnttmbq") + .withAttributes( + Arrays.asList(new Attributes().withName("hz").withValue("gjfwyyrlhgenuz"))) + .withBranchId("gvkvebaqszll") + .withPermissions(Arrays.asList("smmd", "gmihzpimcqr", "nxtminklog")) + .withIsSuperUser(false), + new NeonRoleProperties().withEntityName("zoslpkybtgl") .withAttributes( - Arrays.asList(new Attributes().withName("tibpv").withValue("kaehxsmzyg"), - new Attributes().withName("fwakw").withValue("eivmak"), - new Attributes().withName("hysowljuxlkbect").withValue("tfjmskdchmaiub"))) - .withProjectId("lzwpvgmfalkzaz") - .withParentId("oke") - .withRoleName("jqafkmkro") - .withDatabaseName("rthqe") - .withRoles( - Arrays.asList( - new NeonRoleProperties(), new NeonRoleProperties(), - new NeonRoleProperties())) - .withDatabases(Arrays.asList(new NeonDatabaseProperties(), - new NeonDatabaseProperties(), new NeonDatabaseProperties())) - .withEndpoints(Arrays.asList(new EndpointProperties(), new EndpointProperties()))) - .withRoles( - Arrays - .asList( - new NeonRoleProperties().withEntityName("uugedhfp") - .withAttributes(Arrays.asList( - new Attributes().withName("deolctaebfs").withValue("rledjcu"), - new Attributes().withName("tb").withValue("tqi"), - new Attributes().withName("d").withValue("zvsgeafgfosehxlz"))) - .withBranchId("ezppkkwaaesk") - .withPermissions(Arrays.asList("lp", "eqtoyrpl", "xlaj")) - .withIsSuperUser(true), - new NeonRoleProperties().withEntityName("wg") - .withAttributes(Arrays.asList( - new Attributes().withName("zwaqxofqo").withValue("chiqbplvfid"), - new Attributes().withName("sztekxby").withValue("gmsfepxyi"), - new Attributes().withName("pqadagrhrdicxdwy") - .withValue("fowxwyovcxjsgbi"))) - .withBranchId("ukdveksbuhoduc") - .withPermissions( - Arrays.asList("scrdp", "bfdyjduss", "yszekbhwlka", "ggkrehbf")) - .withIsSuperUser(true), - new NeonRoleProperties().withEntityName("taadu") - .withAttributes(Arrays.asList( - new Attributes().withName("sqwudohzilfmnli").withValue("psimsf"))) - .withBranchId("pofqpmbhy") - .withPermissions(Arrays.asList("drmmttjxoph", "erhsmvgohtw", - "mqilrixysfnimsqy", "wwmhkruwae")) - .withIsSuperUser(true))) - .withDatabases( - Arrays - .asList( - new NeonDatabaseProperties().withEntityName("duewihapfj") - .withAttributes(Arrays.asList( - new Attributes().withName("dfsbwceivb").withValue("zipbwxgoooxzp"), - new Attributes().withName("admskx").withValue("npd"))) - .withBranchId("igjsugswhgs") - .withOwnerName("dkwwn"), - new NeonDatabaseProperties().withEntityName("zhaquvwsxb") - .withAttributes(Arrays.asList( - new Attributes().withName("abdsr").withValue("fajglzrsubklrxhj"), - new Attributes().withName("ltcetjdvqyd").withValue("eqq"))) - .withBranchId("aruwdxvqzxoebw") - .withOwnerName("xbibanbaupw"), - new NeonDatabaseProperties().withEntityName("ejpl") - .withAttributes(Arrays.asList( - new Attributes().withName("wgkpjhboyikebh") - .withValue("hkslgwlokhueoij"), - new Attributes().withName("zcqypzqzufgsyf") - .withValue("jyvdwtfxptpqayam"), - new Attributes().withName("ncfgybmxsnxoc").withValue("ullojk"), - new Attributes().withName("oy").withValue("g"))) - .withBranchId("djuxdbdljzgd") - .withOwnerName("cvuq"), - new NeonDatabaseProperties().withEntityName("ogdxwbsfpyxxtjlf") - .withAttributes( - Arrays.asList(new Attributes().withName("zd").withValue("zqjmueza"), - new Attributes().withName("ovribq").withValue("otokhtvwtaznk"), - new Attributes().withName("qww").withValue("wjyofgwhnkbtl"), - new Attributes().withName("ljssm").withValue("tsnld"))) - .withBranchId("wolgisubxbt") - .withOwnerName("gfgf"))) - .withEndpoints(Arrays.asList(new EndpointProperties().withEntityName("g") - .withAttributes( - Arrays.asList(new Attributes().withName("ossscyva").withValue("fppuacvfye"))) - .withProjectId("psfx") - .withBranchId("dhsoymhpv") - .withEndpointType(EndpointType.READ_WRITE), - new EndpointProperties().withEntityName("ujstk") - .withAttributes( - Arrays.asList(new Attributes().withName("g").withValue("tfrnquk"), - new Attributes().withName("rf").withValue("s"), - new Attributes().withName("nlrxsmyltrwntfmt").withValue("g"), - new Attributes().withName("jdxwnazkurrdre").withValue("zjwhsetwwjwz"))) - .withProjectId("seuzuu") - .withBranchId("kcyqhyqqzzd") - .withEndpointType(EndpointType.READ_ONLY), - new EndpointProperties().withEntityName("azgbsqgpe") - .withAttributes(Arrays.asList( - new Attributes().withName("pvozglqjbknlzc").withValue("ctzeyowmndc"), - new Attributes().withName("v").withValue("wzqauxzanhmkvf"), - new Attributes().withName("uwkudrbcp").withValue("txudqyeme"))) - .withProjectId("naucmcirtnee") - .withBranchId("jauwcgxefnohaitr") - .withEndpointType(EndpointType.READ_ONLY), - new EndpointProperties().withEntityName("xubvf") + Arrays.asList(new Attributes().withName("jcemqbmfuvqar").withValue("z"), + new Attributes().withName("uqrebluimmbwx").withValue("fgtdmbvx"), + new Attributes().withName("kraokq").withValue("budbt"))) + .withBranchId("okbavlyttaak") + .withPermissions(Arrays.asList("rkeb", "mhpdu", "dig")) + .withIsSuperUser(true), + new NeonRoleProperties().withEntityName("dcldpkawnsnl") + .withAttributes(Arrays.asList( + new Attributes().withName("iuswswj").withValue("kbqsjhbtqqvyfscy"), + new Attributes().withName("fwbivqvo").withValue("fuy"))) + .withBranchId("vbhlimbyqecro") + .withPermissions(Arrays.asList("ikcdrdaasax", "obsmf")) + .withIsSuperUser(false))) + .withDatabases( + Arrays + .asList(new NeonDatabaseProperties().withEntityName("nawnvz") .withAttributes( - Arrays.asList(new Attributes().withName("iylfmpztrau").withValue("svhl"), - new Attributes().withName("dculregp").withValue("tmojhvrztnvgyshq"), - new Attributes().withName("dgrtwmew").withValue("zlpykcfazzwjcay"))) - .withProjectId("zrransyb") - .withBranchId("polwzrghsrlei") - .withEndpointType(EndpointType.READ_ONLY))))) + Arrays.asList(new Attributes().withName("xvjabjq").withValue("axuyvymcnud"), + new Attributes().withName("doabhj").withValue("wxqweuipmpvksmi"), + new Attributes().withName("nsqxtltc").withValue("krdpqgfhyrfr"), + new Attributes().withName("kkld").withValue("rcwfcmfcnrjajq"))) + .withBranchId("txjtielnzqgx") + .withOwnerName("fbbmtlp"))) + .withEndpoints( + Arrays + .asList( + new EndpointProperties().withEntityName("ryqxzxa") + .withAttributes( + Arrays.asList(new Attributes().withName("qruqguh").withValue("upet"), + new Attributes().withName("svvoqsbpkflanfk") + .withValue("xsyaowuzowpuoh"), + new Attributes().withName("kc").withValue("rgukxrztio"))) + .withProjectId("lutixmq") + .withBranchId("djizcbf") + .withEndpointType(EndpointType.READ_ONLY), + new EndpointProperties().withEntityName("ktkrumzuedky") + .withAttributes(Arrays.asList( + new Attributes().withName("xiuxqggvqrnhy").withValue("lwcjsqggjhffb"), + new Attributes().withName("rqrkijpeuqlsdx").withValue("qztvx"), + new Attributes().withName("mwwmjswenaww").withValue("me"))) + .withProjectId("eq") + .withBranchId("ulndhzyoeo") + .withEndpointType(EndpointType.READ_ONLY), + new EndpointProperties().withEntityName("nglxpn") + .withAttributes(Arrays.asList( + new Attributes().withName("qagywvtxig").withValue("jrktpgaeukya"), + new Attributes().withName("ohpmwhqn").withValue("csklhsidsjt"))) + .withProjectId("pbninjgazlsvbzfc") + .withBranchId("o") + .withEndpointType(EndpointType.READ_WRITE), + new EndpointProperties().withEntityName("renxolriyehqbe") + .withAttributes(Arrays.asList( + new Attributes().withName("bfgrlpunytjlkes").withValue("mpathubtah"), + new Attributes().withName("e").withValue("niiwllbvgwz"))) + .withProjectId("ft") + .withBranchId("ousnktjt") + .withEndpointType(EndpointType.READ_WRITE))))) .create(); - Assertions.assertEquals("izikgqaboohxbm", response.location()); - Assertions.assertEquals("cqsxrmdvewu", response.tags().get("qaeo")); - Assertions.assertEquals("vvyezslpu", response.properties().marketplaceDetails().subscriptionId()); - Assertions.assertEquals(MarketplaceSubscriptionStatus.UNSUBSCRIBED, + Assertions.assertEquals("jwh", response.location()); + Assertions.assertEquals("wwj", response.tags().get("z")); + Assertions.assertEquals("wnykdidjchlrmpw", response.properties().marketplaceDetails().subscriptionId()); + Assertions.assertEquals(MarketplaceSubscriptionStatus.SUSPENDED, response.properties().marketplaceDetails().subscriptionStatus()); - Assertions.assertEquals("bdsval", response.properties().marketplaceDetails().offerDetails().publisherId()); - Assertions.assertEquals("nptw", response.properties().marketplaceDetails().offerDetails().offerId()); - Assertions.assertEquals("rkxgpazwugxyqvnj", response.properties().marketplaceDetails().offerDetails().planId()); - Assertions.assertEquals("felhldiuhzzgqlm", - response.properties().marketplaceDetails().offerDetails().planName()); - Assertions.assertEquals("ewzgiud", response.properties().marketplaceDetails().offerDetails().termUnit()); - Assertions.assertEquals("xpqh", response.properties().marketplaceDetails().offerDetails().termId()); - Assertions.assertEquals("qhnmhk", response.properties().userDetails().firstName()); - Assertions.assertEquals("zsdsuxheqdgcrux", response.properties().userDetails().lastName()); - Assertions.assertEquals("inymmqgwokmikp", response.properties().userDetails().emailAddress()); - Assertions.assertEquals("fbmjxuvji", response.properties().userDetails().upn()); - Assertions.assertEquals("dvhaxdvw", response.properties().userDetails().phoneNumber()); - Assertions.assertEquals("ehpphthdklmveta", response.properties().companyDetails().companyName()); - Assertions.assertEquals("akfqoixwgiksb", response.properties().companyDetails().country()); - Assertions.assertEquals("tooxrpog", response.properties().companyDetails().officeAddress()); - Assertions.assertEquals("hchgjtnhtukf", response.properties().companyDetails().businessPhone()); - Assertions.assertEquals("ihmbfntume", response.properties().companyDetails().domain()); - Assertions.assertEquals(1546739330470785523L, response.properties().companyDetails().numberOfEmployees()); - Assertions.assertEquals("nuvwcgasgomtmjzw", + Assertions.assertEquals("fldseacdhz", response.properties().marketplaceDetails().offerDetails().publisherId()); + Assertions.assertEquals("xkbrfg", response.properties().marketplaceDetails().offerDetails().offerId()); + Assertions.assertEquals("rwjiyew", response.properties().marketplaceDetails().offerDetails().planId()); + Assertions.assertEquals("jsrwqrxetf", response.properties().marketplaceDetails().offerDetails().planName()); + Assertions.assertEquals("wvrrmdqn", response.properties().marketplaceDetails().offerDetails().termUnit()); + Assertions.assertEquals("cnawth", response.properties().marketplaceDetails().offerDetails().termId()); + Assertions.assertEquals("ax", response.properties().userDetails().firstName()); + Assertions.assertEquals("u", response.properties().userDetails().lastName()); + Assertions.assertEquals("a", response.properties().userDetails().emailAddress()); + Assertions.assertEquals("mhudfjecehokwcp", response.properties().userDetails().upn()); + Assertions.assertEquals("wloesqrggvrbn", response.properties().userDetails().phoneNumber()); + Assertions.assertEquals("ukoila", response.properties().companyDetails().companyName()); + Assertions.assertEquals("duwjleipjlhwy", response.properties().companyDetails().country()); + Assertions.assertEquals("zr", response.properties().companyDetails().officeAddress()); + Assertions.assertEquals("ythqkkwhbgxvel", response.properties().companyDetails().businessPhone()); + Assertions.assertEquals("ulnxdmnit", response.properties().companyDetails().domain()); + Assertions.assertEquals(7153993027316867734L, response.properties().companyDetails().numberOfEmployees()); + Assertions.assertEquals("lyymffhmjpddny", response.properties().partnerOrganizationProperties().organizationId()); - Assertions.assertEquals("uqgovsxpwwztjfm", - response.properties().partnerOrganizationProperties().organizationName()); - Assertions.assertEquals(SingleSignOnStates.ENABLE, + Assertions.assertEquals("fzuvrzmz", response.properties().partnerOrganizationProperties().organizationName()); + Assertions.assertEquals(SingleSignOnStates.INITIAL, response.properties().partnerOrganizationProperties().singleSignOnProperties().singleSignOnState()); - Assertions.assertEquals("fred", + Assertions.assertEquals("rb", response.properties().partnerOrganizationProperties().singleSignOnProperties().enterpriseAppId()); - Assertions.assertEquals("scgrllccna", + Assertions.assertEquals("vnmdyfoeboj", response.properties().partnerOrganizationProperties().singleSignOnProperties().singleSignOnUrl()); - Assertions.assertEquals("owazhpabacom", + Assertions.assertEquals("pglaoh", response.properties().partnerOrganizationProperties().singleSignOnProperties().aadDomains().get(0)); - Assertions.assertEquals("kedwqurcgojmrv", response.properties().projectProperties().entityName()); - Assertions.assertEquals("silc", response.properties().projectProperties().attributes().get(0).name()); - Assertions.assertEquals("hskxx", response.properties().projectProperties().attributes().get(0).value()); - Assertions.assertEquals("lxrdhabsrwrsn", response.properties().projectProperties().regionId()); - Assertions.assertEquals(7499575874504761759L, response.properties().projectProperties().storage()); - Assertions.assertEquals(41736944, response.properties().projectProperties().pgVersion()); - Assertions.assertEquals(492926424, response.properties().projectProperties().historyRetention()); - Assertions.assertEquals(60.42835552785731, + Assertions.assertEquals("syril", response.properties().projectProperties().entityName()); + Assertions.assertEquals("ywltmfwobbjwhlwy", + response.properties().projectProperties().attributes().get(0).name()); + Assertions.assertEquals("fnqzocr", response.properties().projectProperties().attributes().get(0).value()); + Assertions.assertEquals("ekoifuvnyttzgi", response.properties().projectProperties().regionId()); + Assertions.assertEquals(2457380421426493001L, response.properties().projectProperties().storage()); + Assertions.assertEquals(78093176, response.properties().projectProperties().pgVersion()); + Assertions.assertEquals(337288247, response.properties().projectProperties().historyRetention()); + Assertions.assertEquals(56.992264853873294, response.properties().projectProperties().defaultEndpointSettings().autoscalingLimitMinCu()); - Assertions.assertEquals(53.12115373214405, + Assertions.assertEquals(20.08940976841036, response.properties().projectProperties().defaultEndpointSettings().autoscalingLimitMaxCu()); - Assertions.assertEquals("tqmm", response.properties().projectProperties().branch().entityName()); - Assertions.assertEquals("ojxl", response.properties().projectProperties().branch().attributes().get(0).name()); - Assertions.assertEquals("hzlxpgfquw", - response.properties().projectProperties().branch().attributes().get(0).value()); - Assertions.assertEquals("w", response.properties().projectProperties().branch().projectId()); - Assertions.assertEquals("belwcer", response.properties().projectProperties().branch().parentId()); - Assertions.assertEquals("w", response.properties().projectProperties().branch().roleName()); - Assertions.assertEquals("jxljtxbusq", response.properties().projectProperties().branch().databaseName()); - Assertions.assertEquals("buwq", response.properties().projectProperties().roles().get(0).entityName()); - Assertions.assertEquals("lnkkiiwvmtumxpym", + Assertions.assertEquals("kndrndpgfjo", response.properties().projectProperties().branch().entityName()); + Assertions.assertEquals("sabvcip", + response.properties().projectProperties().branch().attributes().get(0).name()); + Assertions.assertEquals("wza", response.properties().projectProperties().branch().attributes().get(0).value()); + Assertions.assertEquals("ntghyksarcdr", response.properties().projectProperties().branch().projectId()); + Assertions.assertEquals("sluvlzladltxkpb", response.properties().projectProperties().branch().parentId()); + Assertions.assertEquals("v", response.properties().projectProperties().branch().roleName()); + Assertions.assertEquals("qqjwkrh", response.properties().projectProperties().branch().databaseName()); + Assertions.assertEquals("ztjctibpvbkae", response.properties().projectProperties().roles().get(0).entityName()); + Assertions.assertEquals("akw", response.properties().projectProperties().roles().get(0).attributes().get(0).name()); - Assertions.assertEquals("jfuaxroqvqpilrgu", + Assertions.assertEquals("eivmak", response.properties().projectProperties().roles().get(0).attributes().get(0).value()); - Assertions.assertEquals("anlduwzorxsb", response.properties().projectProperties().roles().get(0).branchId()); - Assertions.assertEquals("qk", response.properties().projectProperties().roles().get(0).permissions().get(0)); - Assertions.assertTrue(response.properties().projectProperties().roles().get(0).isSuperUser()); - Assertions.assertEquals("kwsdgkj", response.properties().projectProperties().databases().get(0).entityName()); - Assertions.assertEquals("cvo", + Assertions.assertEquals("qrtvaoznqni", response.properties().projectProperties().roles().get(0).branchId()); + Assertions.assertEquals("zeagmceituuge", + response.properties().projectProperties().roles().get(0).permissions().get(0)); + Assertions.assertFalse(response.properties().projectProperties().roles().get(0).isSuperUser()); + Assertions.assertEquals("ztekxbyjgmsfep", + response.properties().projectProperties().databases().get(0).entityName()); + Assertions.assertEquals("hrdicxdwyjfo", response.properties().projectProperties().databases().get(0).attributes().get(0).name()); - Assertions.assertEquals("nwoqartwy", + Assertions.assertEquals("xwyovcxjsgbip", response.properties().projectProperties().databases().get(0).attributes().get(0).value()); - Assertions.assertEquals("v", response.properties().projectProperties().databases().get(0).branchId()); - Assertions.assertEquals("imioyo", response.properties().projectProperties().databases().get(0).ownerName()); - Assertions.assertEquals("ugdybnhrxlel", + Assertions.assertEquals("crdpibfdyjduss", + response.properties().projectProperties().databases().get(0).branchId()); + Assertions.assertEquals("szekbh", response.properties().projectProperties().databases().get(0).ownerName()); + Assertions.assertEquals("rxhjnltcet", response.properties().projectProperties().endpoints().get(0).entityName()); - Assertions.assertEquals("iwje", + Assertions.assertEquals("kw", response.properties().projectProperties().endpoints().get(0).attributes().get(0).name()); - Assertions.assertEquals("p", + Assertions.assertEquals("ruwdxvqzxoebwgj", response.properties().projectProperties().endpoints().get(0).attributes().get(0).value()); - Assertions.assertEquals("caydbjzcqymlcfnz", - response.properties().projectProperties().endpoints().get(0).projectId()); - Assertions.assertEquals("hsurlgw", response.properties().projectProperties().endpoints().get(0).branchId()); + Assertions.assertEquals("bzrpejp", response.properties().projectProperties().endpoints().get(0).projectId()); + Assertions.assertEquals("s", response.properties().projectProperties().endpoints().get(0).branchId()); Assertions.assertEquals(EndpointType.READ_ONLY, response.properties().projectProperties().endpoints().get(0).endpointType()); } diff --git a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/OrganizationsGetByResourceGroupWithResponseMockTests.java b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/OrganizationsGetByResourceGroupWithResponseMockTests.java index 48f3a244a8d8..c4818c495703 100644 --- a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/OrganizationsGetByResourceGroupWithResponseMockTests.java +++ b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/OrganizationsGetByResourceGroupWithResponseMockTests.java @@ -24,7 +24,7 @@ public final class OrganizationsGetByResourceGroupWithResponseMockTests { @Test public void testGetByResourceGroupWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"marketplaceDetails\":{\"subscriptionId\":\"ihmxrfdsajredn\",\"subscriptionStatus\":\"Suspended\",\"offerDetails\":{\"publisherId\":\"shtuwgm\",\"offerId\":\"vuafpwzyifr\",\"planId\":\"gwltxeqip\",\"planName\":\"zdyi\",\"termUnit\":\"fayorpravkjoges\",\"termId\":\"bnsmjkwynqxaek\"}},\"userDetails\":{\"firstName\":\"ykvwjtqpkevmyltj\",\"lastName\":\"spxklu\",\"emailAddress\":\"clf\",\"upn\":\"annnoytzposewx\",\"phoneNumber\":\"pxvkqma\"},\"companyDetails\":{\"companyName\":\"xvpif\",\"country\":\"aifyzyzeyuubeids\",\"officeAddress\":\"fytoi\",\"businessPhone\":\"gygvfltgvdiho\",\"domain\":\"krxwet\",\"numberOfEmployees\":3249065710783725843},\"provisioningState\":\"Succeeded\",\"partnerOrganizationProperties\":{\"organizationId\":\"cpcunnuzdqum\",\"organizationName\":\"enodna\",\"singleSignOnProperties\":{\"singleSignOnState\":\"Enable\",\"enterpriseAppId\":\"h\",\"singleSignOnUrl\":\"ndnelqkaadlknw\",\"aadDomains\":[\"nniyopetxi\",\"cnrly\",\"nucaephblkwqpat\",\"bqsdtcjbctvi\"]}},\"projectProperties\":{\"entityId\":\"qymtuowogtgits\",\"entityName\":\"zvbrzcdbanfzndsc\",\"createdAt\":\"xeatkd\",\"provisioningState\":\"Succeeded\",\"attributes\":[{\"name\":\"djyibqbnaomhjrm\",\"value\":\"u\"},{\"name\":\"maxljalfihcj\",\"value\":\"obcancdexxqcw\"}],\"regionId\":\"xf\",\"storage\":3727563424268520437,\"pgVersion\":277993562,\"historyRetention\":1460791769,\"defaultEndpointSettings\":{\"autoscalingLimitMinCu\":23.674284944289393,\"autoscalingLimitMaxCu\":69.47600545692046},\"branch\":{\"entityId\":\"ixldzyyfy\",\"entityName\":\"qsix\",\"createdAt\":\"m\",\"provisioningState\":\"Canceled\",\"attributes\":[{\"name\":\"yqlkju\",\"value\":\"smbmslzoy\"},{\"name\":\"vwzdbpqvyb\",\"value\":\"fgvmx\"},{\"name\":\"okcvtlubses\",\"value\":\"vcuartrhun\"},{\"name\":\"pirykycndzfqiv\",\"value\":\"reuykbbmnwagl\"}],\"projectId\":\"xoe\",\"parentId\":\"nqlnfwmyymvqd\",\"roleName\":\"bhfckdvezcrcssb\",\"databaseName\":\"ddubbnqfblhkal\",\"roles\":[{},{},{},{}],\"databases\":[{}],\"endpoints\":[{},{}]},\"roles\":[{\"entityId\":\"qjtiogqgdm\",\"entityName\":\"i\",\"createdAt\":\"teajohiyg\",\"provisioningState\":\"Canceled\",\"attributes\":[{\"name\":\"n\",\"value\":\"pczykmktpvwxqc\"},{\"name\":\"ehchk\",\"value\":\"ufmpqumqyjgy\"}],\"branchId\":\"ulodsaeuzanhsfnh\",\"permissions\":[\"wphpzfngqj\"],\"isSuperUser\":true},{\"entityId\":\"ftujwjjufw\",\"entityName\":\"qrkuor\",\"createdAt\":\"ssruqnmdvhazcvj\",\"provisioningState\":\"Failed\",\"attributes\":[{\"name\":\"wbqerzwxiytxtd\",\"value\":\"ukvlb\"},{\"name\":\"ktg\",\"value\":\"styoua\"},{\"name\":\"bewreswmowegmmut\",\"value\":\"yxey\"}],\"branchId\":\"qigijiitnspxlzde\",\"permissions\":[\"rijwai\",\"fanraybfu\",\"qfrojsydgrhyd\",\"ygywe\"],\"isSuperUser\":true},{\"entityId\":\"ec\",\"entityName\":\"ygzmxieqvdsmak\",\"createdAt\":\"xq\",\"provisioningState\":\"Failed\",\"attributes\":[{\"name\":\"xalybxawoijpo\",\"value\":\"tblxpkkwjdjodqhy\"},{\"name\":\"incnr\",\"value\":\"mehllizhceu\"},{\"name\":\"oqodkadpp\",\"value\":\"ibngqladyw\"}],\"branchId\":\"whydt\",\"permissions\":[\"vadswzs\",\"uyem\"],\"isSuperUser\":true}],\"databases\":[{\"entityId\":\"hlxlnwyrmou\",\"entityName\":\"lgmokzkl\",\"createdAt\":\"fowtdvrfmvlihcvj\",\"provisioningState\":\"Succeeded\",\"attributes\":[{\"name\":\"jidhftu\",\"value\":\"vhdxlwyo\"},{\"name\":\"bfqz\",\"value\":\"kfnjyixhafrat\"},{\"name\":\"xmbjroum\",\"value\":\"znv\"},{\"name\":\"l\",\"value\":\"jrhuzgf\"}],\"branchId\":\"njt\",\"ownerName\":\"sllywpvtio\"}],\"endpoints\":[{\"entityId\":\"d\",\"entityName\":\"llgryfqiuasigr\",\"createdAt\":\"socnequygdjboq\",\"provisioningState\":\"Canceled\",\"attributes\":[{\"name\":\"jkqev\",\"value\":\"drmmwiuawvcmjz\"},{\"name\":\"xiid\",\"value\":\"scz\"},{\"name\":\"koswoqiqazugamxz\",\"value\":\"rrcoi\"},{\"name\":\"sbamnppcc\",\"value\":\"kuztdsbezaxyfu\"}],\"projectId\":\"xuizhyhnepkpet\",\"branchId\":\"rx\",\"endpointType\":\"read_write\"},{\"entityId\":\"xdukecpxd\",\"entityName\":\"v\",\"createdAt\":\"ctmmkoszudbl\",\"provisioningState\":\"Succeeded\",\"attributes\":[{\"name\":\"pcaqki\",\"value\":\"f\"},{\"name\":\"btfmhklbnldpvcbh\",\"value\":\"ezyquw\"},{\"name\":\"sqxutr\",\"value\":\"brruyuuatv\"},{\"name\":\"mbjwcolbmxlb\",\"value\":\"w\"}],\"projectId\":\"cpahprzrvxhm\",\"branchId\":\"hocn\",\"endpointType\":\"read_only\"},{\"entityId\":\"jhngxnoq\",\"entityName\":\"tdisnjevhdlmyd\",\"createdAt\":\"whepfww\",\"provisioningState\":\"Failed\",\"attributes\":[{\"name\":\"esxxhmwcdbckyoi\",\"value\":\"xkxhnegknjzrbhtm\"}],\"projectId\":\"lvukaobrlb\",\"branchId\":\"snbagnchjhg\",\"endpointType\":\"read_only\"}]}},\"location\":\"wakywalhjymxcgq\",\"tags\":{\"tfy\":\"drclssoljome\",\"ji\":\"nlbvgjcodkk\",\"cufqbvntnrgmqs\":\"ytssikiz\"},\"id\":\"rhcekxgnly\",\"name\":\"mxcpwzvmdoks\",\"type\":\"dt\"}"; + = "{\"properties\":{\"marketplaceDetails\":{\"subscriptionId\":\"youmpc\",\"subscriptionStatus\":\"Unsubscribed\",\"offerDetails\":{\"publisherId\":\"clcdigptajbrzmq\",\"offerId\":\"ucycijo\",\"planId\":\"lxiutgjcyzyzjdnr\",\"planName\":\"btxjeaoqaqbzg\",\"termUnit\":\"fwwvuatbwbqam\",\"termId\":\"uliyslpkcv\"}},\"userDetails\":{\"firstName\":\"f\",\"lastName\":\"xxe\",\"emailAddress\":\"ywbo\",\"upn\":\"c\",\"phoneNumber\":\"iciijqpkzfbojx\"},\"companyDetails\":{\"companyName\":\"cs\",\"country\":\"qwixvcpwnk\",\"officeAddress\":\"wzwofalickduo\",\"businessPhone\":\"tamtyv\",\"domain\":\"nxrwzawnvs\",\"numberOfEmployees\":5636095211988821683},\"provisioningState\":\"Canceled\",\"partnerOrganizationProperties\":{\"organizationId\":\"nvhycvdimwrz\",\"organizationName\":\"e\",\"singleSignOnProperties\":{\"singleSignOnState\":\"Initial\",\"enterpriseAppId\":\"futrwpweryekzkd\",\"singleSignOnUrl\":\"eotta\",\"aadDomains\":[\"osxw\"]}},\"projectProperties\":{\"entityId\":\"h\",\"entityName\":\"fv\",\"createdAt\":\"dpmiljpn\",\"provisioningState\":\"Failed\",\"attributes\":[{\"name\":\"qllzsauzpjlxeehu\",\"value\":\"iqhzlr\"},{\"name\":\"yme\",\"value\":\"xls\"},{\"name\":\"ihmxrfdsajredn\",\"value\":\"yyshtuwgmevua\"},{\"name\":\"pwzyi\",\"value\":\"rkgwltxeqip\"}],\"regionId\":\"zdyi\",\"storage\":7392314179384433223,\"pgVersion\":882529828,\"historyRetention\":771634222,\"defaultEndpointSettings\":{\"autoscalingLimitMinCu\":34.24890354999211,\"autoscalingLimitMaxCu\":8.302105932932303},\"branch\":{\"entityId\":\"eslabnsmjkwynq\",\"entityName\":\"ekqsykvwjtqpkev\",\"createdAt\":\"ltjcrspxk\",\"provisioningState\":\"Succeeded\",\"attributes\":[{\"name\":\"lfg\",\"value\":\"annnoytzposewx\"}],\"projectId\":\"pxvkqma\",\"parentId\":\"xvpif\",\"roleName\":\"aifyzyzeyuubeids\",\"databaseName\":\"fytoi\",\"roles\":[{},{},{},{}],\"databases\":[{},{},{},{}],\"endpoints\":[{},{},{}]},\"roles\":[{\"entityId\":\"vdihoynkrx\",\"entityName\":\"twk\",\"createdAt\":\"cy\",\"provisioningState\":\"Canceled\",\"attributes\":[{\"name\":\"unnuzdqumoenodn\",\"value\":\"ienhqhskndnelq\"},{\"name\":\"aadl\",\"value\":\"nwf\"},{\"name\":\"anniyopetxivcnr\",\"value\":\"yxnu\"},{\"name\":\"aephblkw\",\"value\":\"pat\"}],\"branchId\":\"qsdtcjbctvivuzq\",\"permissions\":[\"uo\",\"o\",\"tgitsqhzvbrzc\",\"banf\"],\"isSuperUser\":false}],\"databases\":[{\"entityId\":\"mxeatkdbmwnrdjy\",\"entityName\":\"q\",\"createdAt\":\"aomhjrmkuhmaxl\",\"provisioningState\":\"Failed\",\"attributes\":[{\"name\":\"hcjmo\",\"value\":\"cancd\"}],\"branchId\":\"xqcwgax\",\"ownerName\":\"vaknokzwjj\"},{\"entityId\":\"ltixldzyyfytpq\",\"entityName\":\"x\",\"createdAt\":\"m\",\"provisioningState\":\"Canceled\",\"attributes\":[{\"name\":\"yqlkju\",\"value\":\"smbmslzoy\"},{\"name\":\"vwzdbpqvyb\",\"value\":\"fgvmx\"},{\"name\":\"okcvtlubses\",\"value\":\"vcuartrhun\"},{\"name\":\"pirykycndzfqiv\",\"value\":\"reuykbbmnwagl\"}],\"branchId\":\"xoe\",\"ownerName\":\"nqlnfwmyymvqd\"},{\"entityId\":\"bhfckdvezcrcssb\",\"entityName\":\"ddubbnqfblhkal\",\"createdAt\":\"pavawugiqjtio\",\"provisioningState\":\"Canceled\",\"attributes\":[{\"name\":\"inic\",\"value\":\"teajohiyg\"},{\"name\":\"pnbonhpcz\",\"value\":\"kmktpvwxqcseh\"}],\"branchId\":\"khufmpqumqyjgydz\",\"ownerName\":\"odsaeuzan\"}],\"endpoints\":[{\"entityId\":\"hse\",\"entityName\":\"phpzfngqjcl\",\"createdAt\":\"ftujwjjufw\",\"provisioningState\":\"Canceled\",\"attributes\":[{\"name\":\"uorhtssruqnmdvh\",\"value\":\"zcvjytiqswbqerz\"}],\"projectId\":\"iytxt\",\"branchId\":\"ukvlb\",\"endpointType\":\"read_write\"},{\"entityId\":\"dstyouam\",\"entityName\":\"wreswmowegm\",\"createdAt\":\"teyxeyguq\",\"provisioningState\":\"Canceled\",\"attributes\":[{\"name\":\"itnspxlzde\",\"value\":\"ygr\"}],\"projectId\":\"waiufanra\",\"branchId\":\"fueqfrojs\",\"endpointType\":\"read_only\"},{\"entityId\":\"h\",\"entityName\":\"k\",\"createdAt\":\"ywezskiecafyg\",\"provisioningState\":\"Succeeded\",\"attributes\":[{\"name\":\"qv\",\"value\":\"smaklixqcahy\"},{\"name\":\"xalybxawoijpo\",\"value\":\"tblxpkkwjdjodqhy\"}],\"projectId\":\"ncn\",\"branchId\":\"mehllizhceu\",\"endpointType\":\"read_write\"}]}},\"location\":\"dkadppyibn\",\"tags\":{\"uvvadswzsnu\":\"adywrxwhydt\",\"lnwy\":\"emlowuowhl\",\"mo\":\"mouvbl\"},\"id\":\"zkltrfowtdvrfmv\",\"name\":\"ih\",\"type\":\"vjdrqcrjidhftuk\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -34,89 +34,85 @@ public void testGetByResourceGroupWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); OrganizationResource response = manager.organizations() - .getByResourceGroupWithResponse("jlxeehuxiqhz", "raymezx", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("cqguef", "hompheqdurelyu", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("wakywalhjymxcgq", response.location()); - Assertions.assertEquals("drclssoljome", response.tags().get("tfy")); - Assertions.assertEquals("ihmxrfdsajredn", response.properties().marketplaceDetails().subscriptionId()); - Assertions.assertEquals(MarketplaceSubscriptionStatus.SUSPENDED, + Assertions.assertEquals("dkadppyibn", response.location()); + Assertions.assertEquals("adywrxwhydt", response.tags().get("uvvadswzsnu")); + Assertions.assertEquals("youmpc", response.properties().marketplaceDetails().subscriptionId()); + Assertions.assertEquals(MarketplaceSubscriptionStatus.UNSUBSCRIBED, response.properties().marketplaceDetails().subscriptionStatus()); - Assertions.assertEquals("shtuwgm", response.properties().marketplaceDetails().offerDetails().publisherId()); - Assertions.assertEquals("vuafpwzyifr", response.properties().marketplaceDetails().offerDetails().offerId()); - Assertions.assertEquals("gwltxeqip", response.properties().marketplaceDetails().offerDetails().planId()); - Assertions.assertEquals("zdyi", response.properties().marketplaceDetails().offerDetails().planName()); - Assertions.assertEquals("fayorpravkjoges", - response.properties().marketplaceDetails().offerDetails().termUnit()); - Assertions.assertEquals("bnsmjkwynqxaek", response.properties().marketplaceDetails().offerDetails().termId()); - Assertions.assertEquals("ykvwjtqpkevmyltj", response.properties().userDetails().firstName()); - Assertions.assertEquals("spxklu", response.properties().userDetails().lastName()); - Assertions.assertEquals("clf", response.properties().userDetails().emailAddress()); - Assertions.assertEquals("annnoytzposewx", response.properties().userDetails().upn()); - Assertions.assertEquals("pxvkqma", response.properties().userDetails().phoneNumber()); - Assertions.assertEquals("xvpif", response.properties().companyDetails().companyName()); - Assertions.assertEquals("aifyzyzeyuubeids", response.properties().companyDetails().country()); - Assertions.assertEquals("fytoi", response.properties().companyDetails().officeAddress()); - Assertions.assertEquals("gygvfltgvdiho", response.properties().companyDetails().businessPhone()); - Assertions.assertEquals("krxwet", response.properties().companyDetails().domain()); - Assertions.assertEquals(3249065710783725843L, response.properties().companyDetails().numberOfEmployees()); - Assertions.assertEquals("cpcunnuzdqum", response.properties().partnerOrganizationProperties().organizationId()); - Assertions.assertEquals("enodna", response.properties().partnerOrganizationProperties().organizationName()); - Assertions.assertEquals(SingleSignOnStates.ENABLE, + Assertions.assertEquals("clcdigptajbrzmq", + response.properties().marketplaceDetails().offerDetails().publisherId()); + Assertions.assertEquals("ucycijo", response.properties().marketplaceDetails().offerDetails().offerId()); + Assertions.assertEquals("lxiutgjcyzyzjdnr", response.properties().marketplaceDetails().offerDetails().planId()); + Assertions.assertEquals("btxjeaoqaqbzg", response.properties().marketplaceDetails().offerDetails().planName()); + Assertions.assertEquals("fwwvuatbwbqam", response.properties().marketplaceDetails().offerDetails().termUnit()); + Assertions.assertEquals("uliyslpkcv", response.properties().marketplaceDetails().offerDetails().termId()); + Assertions.assertEquals("f", response.properties().userDetails().firstName()); + Assertions.assertEquals("xxe", response.properties().userDetails().lastName()); + Assertions.assertEquals("ywbo", response.properties().userDetails().emailAddress()); + Assertions.assertEquals("c", response.properties().userDetails().upn()); + Assertions.assertEquals("iciijqpkzfbojx", response.properties().userDetails().phoneNumber()); + Assertions.assertEquals("cs", response.properties().companyDetails().companyName()); + Assertions.assertEquals("qwixvcpwnk", response.properties().companyDetails().country()); + Assertions.assertEquals("wzwofalickduo", response.properties().companyDetails().officeAddress()); + Assertions.assertEquals("tamtyv", response.properties().companyDetails().businessPhone()); + Assertions.assertEquals("nxrwzawnvs", response.properties().companyDetails().domain()); + Assertions.assertEquals(5636095211988821683L, response.properties().companyDetails().numberOfEmployees()); + Assertions.assertEquals("nvhycvdimwrz", response.properties().partnerOrganizationProperties().organizationId()); + Assertions.assertEquals("e", response.properties().partnerOrganizationProperties().organizationName()); + Assertions.assertEquals(SingleSignOnStates.INITIAL, response.properties().partnerOrganizationProperties().singleSignOnProperties().singleSignOnState()); - Assertions.assertEquals("h", + Assertions.assertEquals("futrwpweryekzkd", response.properties().partnerOrganizationProperties().singleSignOnProperties().enterpriseAppId()); - Assertions.assertEquals("ndnelqkaadlknw", + Assertions.assertEquals("eotta", response.properties().partnerOrganizationProperties().singleSignOnProperties().singleSignOnUrl()); - Assertions.assertEquals("nniyopetxi", + Assertions.assertEquals("osxw", response.properties().partnerOrganizationProperties().singleSignOnProperties().aadDomains().get(0)); - Assertions.assertEquals("zvbrzcdbanfzndsc", response.properties().projectProperties().entityName()); - Assertions.assertEquals("djyibqbnaomhjrm", + Assertions.assertEquals("fv", response.properties().projectProperties().entityName()); + Assertions.assertEquals("qllzsauzpjlxeehu", response.properties().projectProperties().attributes().get(0).name()); - Assertions.assertEquals("u", response.properties().projectProperties().attributes().get(0).value()); - Assertions.assertEquals("xf", response.properties().projectProperties().regionId()); - Assertions.assertEquals(3727563424268520437L, response.properties().projectProperties().storage()); - Assertions.assertEquals(277993562, response.properties().projectProperties().pgVersion()); - Assertions.assertEquals(1460791769, response.properties().projectProperties().historyRetention()); - Assertions.assertEquals(23.674284944289393, + Assertions.assertEquals("iqhzlr", response.properties().projectProperties().attributes().get(0).value()); + Assertions.assertEquals("zdyi", response.properties().projectProperties().regionId()); + Assertions.assertEquals(7392314179384433223L, response.properties().projectProperties().storage()); + Assertions.assertEquals(882529828, response.properties().projectProperties().pgVersion()); + Assertions.assertEquals(771634222, response.properties().projectProperties().historyRetention()); + Assertions.assertEquals(34.24890354999211, response.properties().projectProperties().defaultEndpointSettings().autoscalingLimitMinCu()); - Assertions.assertEquals(69.47600545692046, + Assertions.assertEquals(8.302105932932303, response.properties().projectProperties().defaultEndpointSettings().autoscalingLimitMaxCu()); - Assertions.assertEquals("qsix", response.properties().projectProperties().branch().entityName()); - Assertions.assertEquals("yqlkju", - response.properties().projectProperties().branch().attributes().get(0).name()); - Assertions.assertEquals("smbmslzoy", + Assertions.assertEquals("ekqsykvwjtqpkev", response.properties().projectProperties().branch().entityName()); + Assertions.assertEquals("lfg", response.properties().projectProperties().branch().attributes().get(0).name()); + Assertions.assertEquals("annnoytzposewx", response.properties().projectProperties().branch().attributes().get(0).value()); - Assertions.assertEquals("xoe", response.properties().projectProperties().branch().projectId()); - Assertions.assertEquals("nqlnfwmyymvqd", response.properties().projectProperties().branch().parentId()); - Assertions.assertEquals("bhfckdvezcrcssb", response.properties().projectProperties().branch().roleName()); - Assertions.assertEquals("ddubbnqfblhkal", response.properties().projectProperties().branch().databaseName()); - Assertions.assertEquals("i", response.properties().projectProperties().roles().get(0).entityName()); - Assertions.assertEquals("n", + Assertions.assertEquals("pxvkqma", response.properties().projectProperties().branch().projectId()); + Assertions.assertEquals("xvpif", response.properties().projectProperties().branch().parentId()); + Assertions.assertEquals("aifyzyzeyuubeids", response.properties().projectProperties().branch().roleName()); + Assertions.assertEquals("fytoi", response.properties().projectProperties().branch().databaseName()); + Assertions.assertEquals("twk", response.properties().projectProperties().roles().get(0).entityName()); + Assertions.assertEquals("unnuzdqumoenodn", response.properties().projectProperties().roles().get(0).attributes().get(0).name()); - Assertions.assertEquals("pczykmktpvwxqc", + Assertions.assertEquals("ienhqhskndnelq", response.properties().projectProperties().roles().get(0).attributes().get(0).value()); - Assertions.assertEquals("ulodsaeuzanhsfnh", - response.properties().projectProperties().roles().get(0).branchId()); - Assertions.assertEquals("wphpzfngqj", - response.properties().projectProperties().roles().get(0).permissions().get(0)); - Assertions.assertTrue(response.properties().projectProperties().roles().get(0).isSuperUser()); - Assertions.assertEquals("lgmokzkl", response.properties().projectProperties().databases().get(0).entityName()); - Assertions.assertEquals("jidhftu", + Assertions.assertEquals("qsdtcjbctvivuzq", response.properties().projectProperties().roles().get(0).branchId()); + Assertions.assertEquals("uo", response.properties().projectProperties().roles().get(0).permissions().get(0)); + Assertions.assertFalse(response.properties().projectProperties().roles().get(0).isSuperUser()); + Assertions.assertEquals("q", response.properties().projectProperties().databases().get(0).entityName()); + Assertions.assertEquals("hcjmo", response.properties().projectProperties().databases().get(0).attributes().get(0).name()); - Assertions.assertEquals("vhdxlwyo", + Assertions.assertEquals("cancd", response.properties().projectProperties().databases().get(0).attributes().get(0).value()); - Assertions.assertEquals("njt", response.properties().projectProperties().databases().get(0).branchId()); - Assertions.assertEquals("sllywpvtio", response.properties().projectProperties().databases().get(0).ownerName()); - Assertions.assertEquals("llgryfqiuasigr", + Assertions.assertEquals("xqcwgax", response.properties().projectProperties().databases().get(0).branchId()); + Assertions.assertEquals("vaknokzwjj", response.properties().projectProperties().databases().get(0).ownerName()); + Assertions.assertEquals("phpzfngqjcl", response.properties().projectProperties().endpoints().get(0).entityName()); - Assertions.assertEquals("jkqev", + Assertions.assertEquals("uorhtssruqnmdvh", response.properties().projectProperties().endpoints().get(0).attributes().get(0).name()); - Assertions.assertEquals("drmmwiuawvcmjz", + Assertions.assertEquals("zcvjytiqswbqerz", response.properties().projectProperties().endpoints().get(0).attributes().get(0).value()); - Assertions.assertEquals("xuizhyhnepkpet", - response.properties().projectProperties().endpoints().get(0).projectId()); - Assertions.assertEquals("rx", response.properties().projectProperties().endpoints().get(0).branchId()); + Assertions.assertEquals("iytxt", response.properties().projectProperties().endpoints().get(0).projectId()); + Assertions.assertEquals("ukvlb", response.properties().projectProperties().endpoints().get(0).branchId()); Assertions.assertEquals(EndpointType.READ_WRITE, response.properties().projectProperties().endpoints().get(0).endpointType()); } diff --git a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/OrganizationsGetPostgresVersionsWithResponseMockTests.java b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/OrganizationsGetPostgresVersionsWithResponseMockTests.java index e6184cfabe0a..849e6c39893a 100644 --- a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/OrganizationsGetPostgresVersionsWithResponseMockTests.java +++ b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/OrganizationsGetPostgresVersionsWithResponseMockTests.java @@ -21,7 +21,7 @@ public final class OrganizationsGetPostgresVersionsWithResponseMockTests { @Test public void testGetPostgresVersionsWithResponse() throws Exception { - String responseStr = "{\"versions\":[{\"version\":1800883070},{\"version\":2018829597}]}"; + String responseStr = "{\"versions\":[{\"version\":1619461010},{\"version\":1917475194}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,10 +31,10 @@ public void testGetPostgresVersionsWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PgVersionsResult response = manager.organizations() - .getPostgresVersionsWithResponse("rwq", new PgVersion().withVersion(2044348979), + .getPostgresVersionsWithResponse("rceqnkbrupob", new PgVersion().withVersion(1391296754), com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals(1800883070, response.versions().get(0).version()); + Assertions.assertEquals(1619461010, response.versions().get(0).version()); } } diff --git a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/OrganizationsListByResourceGroupMockTests.java b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/OrganizationsListByResourceGroupMockTests.java index 3a5a05cf97f9..b3321e650804 100644 --- a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/OrganizationsListByResourceGroupMockTests.java +++ b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/OrganizationsListByResourceGroupMockTests.java @@ -25,7 +25,7 @@ public final class OrganizationsListByResourceGroupMockTests { @Test public void testListByResourceGroup() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"marketplaceDetails\":{\"subscriptionId\":\"ygtvxbyjanepub\",\"subscriptionStatus\":\"Unsubscribed\",\"offerDetails\":{\"publisherId\":\"xyqvg\",\"offerId\":\"i\",\"planId\":\"od\",\"planName\":\"vohkxdxuws\",\"termUnit\":\"fmcwnosb\",\"termId\":\"ehgcvkbcknjo\"}},\"userDetails\":{\"firstName\":\"jy\",\"lastName\":\"pvelszerqze\",\"emailAddress\":\"o\",\"upn\":\"intxwa\",\"phoneNumber\":\"glzoblqwa\"},\"companyDetails\":{\"companyName\":\"r\",\"country\":\"lhm\",\"officeAddress\":\"qb\",\"businessPhone\":\"vafjrqpjiyrqj\",\"domain\":\"gaxwmzwdfkbnrzo\",\"numberOfEmployees\":4495367489197291351},\"provisioningState\":\"Succeeded\",\"partnerOrganizationProperties\":{\"organizationId\":\"tqjfgxxsaet\",\"organizationName\":\"zdgvpyigdaqqilz\",\"singleSignOnProperties\":{\"singleSignOnState\":\"Enable\",\"enterpriseAppId\":\"joedx\",\"singleSignOnUrl\":\"ucaifpaurwwgilf\",\"aadDomains\":[\"a\",\"dmkxwxdcvjwcy\",\"iakeciqc\",\"xrtuicds\"]}},\"projectProperties\":{\"entityId\":\"fmmp\",\"entityName\":\"zzwvywrgyng\",\"createdAt\":\"grpxncakiqaondjr\",\"provisioningState\":\"Canceled\",\"attributes\":[{\"name\":\"gglvlmfejdoqeykg\",\"value\":\"tygxhqfgq\"},{\"name\":\"ayejsxtlgflwfgz\",\"value\":\"iucijjcea\"},{\"name\":\"lijjjrtvam\",\"value\":\"a\"}],\"regionId\":\"knxkvccxetyvkunm\",\"storage\":9114509081318263307,\"pgVersion\":1516434414,\"historyRetention\":1703965400,\"defaultEndpointSettings\":{\"autoscalingLimitMinCu\":9.55728434368569,\"autoscalingLimitMaxCu\":1.3136952069757624},\"branch\":{\"entityId\":\"indedvabbx\",\"entityName\":\"medeil\",\"createdAt\":\"ywfcfxzi\",\"provisioningState\":\"Failed\",\"attributes\":[{\"name\":\"vwypusuvjsl\",\"value\":\"zwci\"},{\"name\":\"djsllfr\",\"value\":\"vdmvxadqa\"}],\"projectId\":\"rgnawbabgfbk\",\"parentId\":\"jmfczlfsyqkf\",\"roleName\":\"zgowox\",\"databaseName\":\"je\",\"roles\":[{}],\"databases\":[{}],\"endpoints\":[{}]},\"roles\":[{\"entityId\":\"lusrv\",\"entityName\":\"simjceagbjqvlsu\",\"createdAt\":\"wzas\",\"provisioningState\":\"Canceled\",\"attributes\":[{\"name\":\"oyjfqipu\",\"value\":\"yznclkfkee\"}],\"branchId\":\"vop\",\"permissions\":[\"uoqujlyeg\",\"avn\",\"gflqqbtnyjp\",\"lxdbfvabmvms\"],\"isSuperUser\":true},{\"entityId\":\"vwjcnkottlwuh\",\"entityName\":\"jmailfemjjzakzw\",\"createdAt\":\"qullqxbdmvrscm\",\"provisioningState\":\"Canceled\",\"attributes\":[{\"name\":\"brnyeofltfnnx\",\"value\":\"kadjf\"},{\"name\":\"n\",\"value\":\"fmu\"},{\"name\":\"iiripfohykfkxbbc\",\"value\":\"r\"},{\"name\":\"jiutgnjizbe\",\"value\":\"woiymrvz\"}],\"branchId\":\"uyrsrziuctix\",\"permissions\":[\"suif\"],\"isSuperUser\":false},{\"entityId\":\"aapezkiswqjmdghs\",\"entityName\":\"arybjufptbjc\",\"createdAt\":\"nciuiyqvldaswvpp\",\"provisioningState\":\"Canceled\",\"attributes\":[{\"name\":\"lgcndhzxrrfcfsrh\",\"value\":\"hgsnxuwwkpph\"},{\"name\":\"fsbzxlbzxo\",\"value\":\"eikjclwza\"},{\"name\":\"nmwpf\",\"value\":\"uqtaazyqbxyxoyf\"}],\"branchId\":\"qqi\",\"permissions\":[\"xlhdj\",\"qdcadwvps\",\"zjiihjr\",\"ybmrzoepnxwd\"],\"isSuperUser\":true}],\"databases\":[{\"entityId\":\"v\",\"entityName\":\"mxaursqftibtyi\",\"createdAt\":\"yvp\",\"provisioningState\":\"Failed\",\"attributes\":[{\"name\":\"pnqn\",\"value\":\"owsbedenrexkxbh\"},{\"name\":\"vucnulgmnh\",\"value\":\"evdyz\"},{\"name\":\"fajs\",\"value\":\"kskmqozzkivyhjrl\"},{\"name\":\"izjixlq\",\"value\":\"hefkwabsolronqq\"}],\"branchId\":\"gn\",\"ownerName\":\"xsjxtelexhvuqboz\"},{\"entityId\":\"lzqocark\",\"entityName\":\"lbcnndt\",\"createdAt\":\"xawqy\",\"provisioningState\":\"Succeeded\",\"attributes\":[{\"name\":\"yzm\",\"value\":\"ckze\"}],\"branchId\":\"xak\",\"ownerName\":\"ywymxgaabj\"},{\"entityId\":\"tfohf\",\"entityName\":\"gzvkiwrsiwdyj\",\"createdAt\":\"rykcrraueekcsue\",\"provisioningState\":\"Canceled\",\"attributes\":[{\"name\":\"acbcb\",\"value\":\"ydl\"}],\"branchId\":\"d\",\"ownerName\":\"mhmpty\"},{\"entityId\":\"lkfbnrqqxvztpb\",\"entityName\":\"nqtxjtomalswbnf\",\"createdAt\":\"epl\",\"provisioningState\":\"Canceled\",\"attributes\":[{\"name\":\"sfzygleexahv\",\"value\":\"ywhsbrcarycs\"}],\"branchId\":\"zyvoaqa\",\"ownerName\":\"vehzp\"}],\"endpoints\":[{\"entityId\":\"rr\",\"entityName\":\"mpfu\",\"createdAt\":\"be\",\"provisioningState\":\"Succeeded\",\"attributes\":[{\"name\":\"mfbfununmpzkrvfy\",\"value\":\"fkd\"},{\"name\":\"chlzvfi\",\"value\":\"tnkjjwgcwnphb\"},{\"name\":\"gfyrtogmhmjpjsc\",\"value\":\"fp\"},{\"name\":\"qwtygevgwmseharx\",\"value\":\"fv\"}],\"projectId\":\"rxtmbpjptnvw\",\"branchId\":\"rsidqpxlbtpakf\",\"endpointType\":\"read_write\"}]}},\"location\":\"twmykyut\",\"tags\":{\"hpycvjqdvdwkq\":\"dwmf\",\"n\":\"ldrlefgnaavua\"},\"id\":\"etaoutnpdc\",\"name\":\"uhspfefyihduy\",\"type\":\"uyld\"}]}"; + = "{\"value\":[{\"properties\":{\"marketplaceDetails\":{\"subscriptionId\":\"bfqz\",\"subscriptionStatus\":\"Subscribed\",\"offerDetails\":{\"publisherId\":\"njyixh\",\"offerId\":\"fratqxmbjroumzz\",\"planId\":\"valqjrhuzgfxo\",\"planName\":\"tpusllywp\",\"termUnit\":\"iotzbpdbollgryfq\",\"termId\":\"asigrowsocne\"}},\"userDetails\":{\"firstName\":\"ygdjboqgrmtqjk\",\"lastName\":\"vadrmm\",\"emailAddress\":\"uawvcmjzk\",\"upn\":\"idisczskosw\",\"phoneNumber\":\"iqazugamxzkr\"},\"companyDetails\":{\"companyName\":\"oiisbamnppcce\",\"country\":\"ztdsbeza\",\"officeAddress\":\"f\",\"businessPhone\":\"zxuizhyhnepkpe\",\"domain\":\"arxqiubx\",\"numberOfEmployees\":2419437934974904701},\"provisioningState\":\"Succeeded\",\"partnerOrganizationProperties\":{\"organizationId\":\"azvdhctmmkosz\",\"organizationName\":\"dblnsntrp\",\"singleSignOnProperties\":{\"singleSignOnState\":\"Enable\",\"enterpriseAppId\":\"ofkbtf\",\"singleSignOnUrl\":\"kl\",\"aadDomains\":[\"dpvcbhhezyq\"]}},\"projectProperties\":{\"entityId\":\"sqxutr\",\"entityName\":\"rruyuu\",\"createdAt\":\"vlm\",\"provisioningState\":\"Succeeded\",\"attributes\":[{\"name\":\"lbmxlbnwtpcpah\",\"value\":\"rzrv\"}],\"regionId\":\"mt\",\"storage\":5424564857868400368,\"pgVersion\":578306822,\"historyRetention\":797449326,\"defaultEndpointSettings\":{\"autoscalingLimitMinCu\":46.52625870333604,\"autoscalingLimitMaxCu\":25.372921873763477},\"branch\":{\"entityId\":\"oqrxtdisnjevhdlm\",\"entityName\":\"idwhepfw\",\"createdAt\":\"jfdoesxxhm\",\"provisioningState\":\"Canceled\",\"attributes\":[{\"name\":\"ky\",\"value\":\"ikxkxhneg\"}],\"projectId\":\"jzrbhtmeplv\",\"parentId\":\"aobrlbp\",\"roleName\":\"nbagnchj\",\"databaseName\":\"emuowakyw\",\"roles\":[{}],\"databases\":[{},{},{}],\"endpoints\":[{},{},{},{}]},\"roles\":[{\"entityId\":\"tagdrc\",\"entityName\":\"soljome\",\"createdAt\":\"fycnlb\",\"provisioningState\":\"Succeeded\",\"attributes\":[{\"name\":\"dkkgjiiytssikizb\",\"value\":\"ufqbvntnr\"}],\"branchId\":\"qsorh\",\"permissions\":[\"xgnlykmx\",\"pwzvmdoksqdti\",\"lwxlboncqbazq\",\"cqchygtvxbyjane\"],\"isSuperUser\":true},{\"entityId\":\"pkxyqvgxi\",\"entityName\":\"detv\",\"createdAt\":\"kxdxuwsaifmcwn\",\"provisioningState\":\"Succeeded\",\"attributes\":[{\"name\":\"ehgcvkbcknjo\",\"value\":\"gjyy\"},{\"name\":\"pvelszerqze\",\"value\":\"xoqeintxwalj\"},{\"name\":\"lzoblqwaafr\",\"value\":\"ulhmzyq\"}],\"branchId\":\"dvaf\",\"permissions\":[\"pjiyrqjcr\",\"a\",\"wmzwdfkbnrzorpdl\"],\"isSuperUser\":false}],\"databases\":[{\"entityId\":\"jfgxxsaetg\",\"entityName\":\"gvpyigdaqqilzdc\",\"createdAt\":\"wjoe\",\"provisioningState\":\"Canceled\",\"attributes\":[{\"name\":\"caifpaurww\",\"value\":\"ilfjqqacdmk\"},{\"name\":\"wxdcvjwcyz\",\"value\":\"akeciqchx\"},{\"name\":\"tuicds\",\"value\":\"wdfmmpzhzzwvywr\"},{\"name\":\"yngydgrpxncaki\",\"value\":\"aondjrkclamgg\"}],\"branchId\":\"lmf\",\"ownerName\":\"doqey\"},{\"entityId\":\"ltygxhqfgqkayej\",\"entityName\":\"tlgflwfgz\",\"createdAt\":\"u\",\"provisioningState\":\"Canceled\",\"attributes\":[{\"name\":\"eatlijjjrtvamcas\",\"value\":\"knxkvccxetyvkunm\"},{\"name\":\"gno\",\"value\":\"ikkgqo\"},{\"name\":\"jwpindedvabbxbh\",\"value\":\"edeilb\"},{\"name\":\"ywfcfxzi\",\"value\":\"zzihvwy\"}],\"branchId\":\"suvjslcz\",\"ownerName\":\"iid\"},{\"entityId\":\"llfryvdmvxadq\",\"entityName\":\"frgnawbabgfbktyj\",\"createdAt\":\"czlfsy\",\"provisioningState\":\"Succeeded\",\"attributes\":[{\"name\":\"zgowox\",\"value\":\"mj\"},{\"name\":\"ajcxnyqgxhl\",\"value\":\"srv\"},{\"name\":\"i\",\"value\":\"i\"}],\"branchId\":\"ceagbjqvlsumywz\",\"ownerName\":\"hxgonoyjf\"}],\"endpoints\":[{\"entityId\":\"b\",\"entityName\":\"nclkfkeeb\",\"createdAt\":\"opemtu\",\"provisioningState\":\"Failed\",\"attributes\":[{\"name\":\"yegq\",\"value\":\"vn\"}],\"projectId\":\"flqqbtnyjpylxd\",\"branchId\":\"vabm\",\"endpointType\":\"read_only\"}]}},\"location\":\"baevwjcnkottl\",\"tags\":{\"jzakzwjiqull\":\"vajmailfem\",\"rnyeofltfnnxrk\":\"xbdmvrscmqernd\",\"ynnfmuiii\":\"dj\",\"bcbrwjiutgnjizbe\":\"ipfohykfkx\"},\"id\":\"woiymrvz\",\"name\":\"juyrsrziuctixg\",\"type\":\"d\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -35,42 +35,42 @@ public void testListByResourceGroup() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.organizations().listByResourceGroup("wlwxlboncqbazqic", com.azure.core.util.Context.NONE); + = manager.organizations().listByResourceGroup("hdxlw", com.azure.core.util.Context.NONE); - Assertions.assertEquals("twmykyut", response.iterator().next().location()); - Assertions.assertEquals("dwmf", response.iterator().next().tags().get("hpycvjqdvdwkq")); - Assertions.assertEquals("ygtvxbyjanepub", - response.iterator().next().properties().marketplaceDetails().subscriptionId()); - Assertions.assertEquals(MarketplaceSubscriptionStatus.UNSUBSCRIBED, + Assertions.assertEquals("baevwjcnkottl", response.iterator().next().location()); + Assertions.assertEquals("vajmailfem", response.iterator().next().tags().get("jzakzwjiqull")); + Assertions.assertEquals("bfqz", response.iterator().next().properties().marketplaceDetails().subscriptionId()); + Assertions.assertEquals(MarketplaceSubscriptionStatus.SUBSCRIBED, response.iterator().next().properties().marketplaceDetails().subscriptionStatus()); - Assertions.assertEquals("xyqvg", + Assertions.assertEquals("njyixh", response.iterator().next().properties().marketplaceDetails().offerDetails().publisherId()); - Assertions.assertEquals("i", + Assertions.assertEquals("fratqxmbjroumzz", response.iterator().next().properties().marketplaceDetails().offerDetails().offerId()); - Assertions.assertEquals("od", + Assertions.assertEquals("valqjrhuzgfxo", response.iterator().next().properties().marketplaceDetails().offerDetails().planId()); - Assertions.assertEquals("vohkxdxuws", + Assertions.assertEquals("tpusllywp", response.iterator().next().properties().marketplaceDetails().offerDetails().planName()); - Assertions.assertEquals("fmcwnosb", + Assertions.assertEquals("iotzbpdbollgryfq", response.iterator().next().properties().marketplaceDetails().offerDetails().termUnit()); - Assertions.assertEquals("ehgcvkbcknjo", + Assertions.assertEquals("asigrowsocne", response.iterator().next().properties().marketplaceDetails().offerDetails().termId()); - Assertions.assertEquals("jy", response.iterator().next().properties().userDetails().firstName()); - Assertions.assertEquals("pvelszerqze", response.iterator().next().properties().userDetails().lastName()); - Assertions.assertEquals("o", response.iterator().next().properties().userDetails().emailAddress()); - Assertions.assertEquals("intxwa", response.iterator().next().properties().userDetails().upn()); - Assertions.assertEquals("glzoblqwa", response.iterator().next().properties().userDetails().phoneNumber()); - Assertions.assertEquals("r", response.iterator().next().properties().companyDetails().companyName()); - Assertions.assertEquals("lhm", response.iterator().next().properties().companyDetails().country()); - Assertions.assertEquals("qb", response.iterator().next().properties().companyDetails().officeAddress()); - Assertions.assertEquals("vafjrqpjiyrqj", + Assertions.assertEquals("ygdjboqgrmtqjk", response.iterator().next().properties().userDetails().firstName()); + Assertions.assertEquals("vadrmm", response.iterator().next().properties().userDetails().lastName()); + Assertions.assertEquals("uawvcmjzk", response.iterator().next().properties().userDetails().emailAddress()); + Assertions.assertEquals("idisczskosw", response.iterator().next().properties().userDetails().upn()); + Assertions.assertEquals("iqazugamxzkr", response.iterator().next().properties().userDetails().phoneNumber()); + Assertions.assertEquals("oiisbamnppcce", + response.iterator().next().properties().companyDetails().companyName()); + Assertions.assertEquals("ztdsbeza", response.iterator().next().properties().companyDetails().country()); + Assertions.assertEquals("f", response.iterator().next().properties().companyDetails().officeAddress()); + Assertions.assertEquals("zxuizhyhnepkpe", response.iterator().next().properties().companyDetails().businessPhone()); - Assertions.assertEquals("gaxwmzwdfkbnrzo", response.iterator().next().properties().companyDetails().domain()); - Assertions.assertEquals(4495367489197291351L, + Assertions.assertEquals("arxqiubx", response.iterator().next().properties().companyDetails().domain()); + Assertions.assertEquals(2419437934974904701L, response.iterator().next().properties().companyDetails().numberOfEmployees()); - Assertions.assertEquals("tqjfgxxsaet", + Assertions.assertEquals("azvdhctmmkosz", response.iterator().next().properties().partnerOrganizationProperties().organizationId()); - Assertions.assertEquals("zdgvpyigdaqqilz", + Assertions.assertEquals("dblnsntrp", response.iterator().next().properties().partnerOrganizationProperties().organizationName()); Assertions.assertEquals(SingleSignOnStates.ENABLE, response.iterator() @@ -79,21 +79,21 @@ public void testListByResourceGroup() throws Exception { .partnerOrganizationProperties() .singleSignOnProperties() .singleSignOnState()); - Assertions.assertEquals("joedx", + Assertions.assertEquals("ofkbtf", response.iterator() .next() .properties() .partnerOrganizationProperties() .singleSignOnProperties() .enterpriseAppId()); - Assertions.assertEquals("ucaifpaurwwgilf", + Assertions.assertEquals("kl", response.iterator() .next() .properties() .partnerOrganizationProperties() .singleSignOnProperties() .singleSignOnUrl()); - Assertions.assertEquals("a", + Assertions.assertEquals("dpvcbhhezyq", response.iterator() .next() .properties() @@ -101,79 +101,77 @@ public void testListByResourceGroup() throws Exception { .singleSignOnProperties() .aadDomains() .get(0)); - Assertions.assertEquals("zzwvywrgyng", - response.iterator().next().properties().projectProperties().entityName()); - Assertions.assertEquals("gglvlmfejdoqeykg", + Assertions.assertEquals("rruyuu", response.iterator().next().properties().projectProperties().entityName()); + Assertions.assertEquals("lbmxlbnwtpcpah", response.iterator().next().properties().projectProperties().attributes().get(0).name()); - Assertions.assertEquals("tygxhqfgq", + Assertions.assertEquals("rzrv", response.iterator().next().properties().projectProperties().attributes().get(0).value()); - Assertions.assertEquals("knxkvccxetyvkunm", - response.iterator().next().properties().projectProperties().regionId()); - Assertions.assertEquals(9114509081318263307L, + Assertions.assertEquals("mt", response.iterator().next().properties().projectProperties().regionId()); + Assertions.assertEquals(5424564857868400368L, response.iterator().next().properties().projectProperties().storage()); - Assertions.assertEquals(1516434414, response.iterator().next().properties().projectProperties().pgVersion()); - Assertions.assertEquals(1703965400, + Assertions.assertEquals(578306822, response.iterator().next().properties().projectProperties().pgVersion()); + Assertions.assertEquals(797449326, response.iterator().next().properties().projectProperties().historyRetention()); - Assertions.assertEquals(9.55728434368569, + Assertions.assertEquals(46.52625870333604, response.iterator() .next() .properties() .projectProperties() .defaultEndpointSettings() .autoscalingLimitMinCu()); - Assertions.assertEquals(1.3136952069757624, + Assertions.assertEquals(25.372921873763477, response.iterator() .next() .properties() .projectProperties() .defaultEndpointSettings() .autoscalingLimitMaxCu()); - Assertions.assertEquals("medeil", + Assertions.assertEquals("idwhepfw", response.iterator().next().properties().projectProperties().branch().entityName()); - Assertions.assertEquals("vwypusuvjsl", + Assertions.assertEquals("ky", response.iterator().next().properties().projectProperties().branch().attributes().get(0).name()); - Assertions.assertEquals("zwci", + Assertions.assertEquals("ikxkxhneg", response.iterator().next().properties().projectProperties().branch().attributes().get(0).value()); - Assertions.assertEquals("rgnawbabgfbk", + Assertions.assertEquals("jzrbhtmeplv", response.iterator().next().properties().projectProperties().branch().projectId()); - Assertions.assertEquals("jmfczlfsyqkf", + Assertions.assertEquals("aobrlbp", response.iterator().next().properties().projectProperties().branch().parentId()); - Assertions.assertEquals("zgowox", + Assertions.assertEquals("nbagnchj", response.iterator().next().properties().projectProperties().branch().roleName()); - Assertions.assertEquals("je", + Assertions.assertEquals("emuowakyw", response.iterator().next().properties().projectProperties().branch().databaseName()); - Assertions.assertEquals("simjceagbjqvlsu", + Assertions.assertEquals("soljome", response.iterator().next().properties().projectProperties().roles().get(0).entityName()); - Assertions.assertEquals("oyjfqipu", + Assertions.assertEquals("dkkgjiiytssikizb", response.iterator().next().properties().projectProperties().roles().get(0).attributes().get(0).name()); - Assertions.assertEquals("yznclkfkee", + Assertions.assertEquals("ufqbvntnr", response.iterator().next().properties().projectProperties().roles().get(0).attributes().get(0).value()); - Assertions.assertEquals("vop", + Assertions.assertEquals("qsorh", response.iterator().next().properties().projectProperties().roles().get(0).branchId()); - Assertions.assertEquals("uoqujlyeg", + Assertions.assertEquals("xgnlykmx", response.iterator().next().properties().projectProperties().roles().get(0).permissions().get(0)); Assertions.assertTrue(response.iterator().next().properties().projectProperties().roles().get(0).isSuperUser()); - Assertions.assertEquals("mxaursqftibtyi", + Assertions.assertEquals("gvpyigdaqqilzdc", response.iterator().next().properties().projectProperties().databases().get(0).entityName()); - Assertions.assertEquals("pnqn", + Assertions.assertEquals("caifpaurww", response.iterator().next().properties().projectProperties().databases().get(0).attributes().get(0).name()); - Assertions.assertEquals("owsbedenrexkxbh", + Assertions.assertEquals("ilfjqqacdmk", response.iterator().next().properties().projectProperties().databases().get(0).attributes().get(0).value()); - Assertions.assertEquals("gn", + Assertions.assertEquals("lmf", response.iterator().next().properties().projectProperties().databases().get(0).branchId()); - Assertions.assertEquals("xsjxtelexhvuqboz", + Assertions.assertEquals("doqey", response.iterator().next().properties().projectProperties().databases().get(0).ownerName()); - Assertions.assertEquals("mpfu", + Assertions.assertEquals("nclkfkeeb", response.iterator().next().properties().projectProperties().endpoints().get(0).entityName()); - Assertions.assertEquals("mfbfununmpzkrvfy", + Assertions.assertEquals("yegq", response.iterator().next().properties().projectProperties().endpoints().get(0).attributes().get(0).name()); - Assertions.assertEquals("fkd", + Assertions.assertEquals("vn", response.iterator().next().properties().projectProperties().endpoints().get(0).attributes().get(0).value()); - Assertions.assertEquals("rxtmbpjptnvw", + Assertions.assertEquals("flqqbtnyjpylxd", response.iterator().next().properties().projectProperties().endpoints().get(0).projectId()); - Assertions.assertEquals("rsidqpxlbtpakf", + Assertions.assertEquals("vabm", response.iterator().next().properties().projectProperties().endpoints().get(0).branchId()); - Assertions.assertEquals(EndpointType.READ_WRITE, + Assertions.assertEquals(EndpointType.READ_ONLY, response.iterator().next().properties().projectProperties().endpoints().get(0).endpointType()); } } diff --git a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/OrganizationsListMockTests.java b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/OrganizationsListMockTests.java index b869ecd6767d..5cde2f23a108 100644 --- a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/OrganizationsListMockTests.java +++ b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/OrganizationsListMockTests.java @@ -25,7 +25,7 @@ public final class OrganizationsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"marketplaceDetails\":{\"subscriptionId\":\"tybkcgs\",\"subscriptionStatus\":\"PendingFulfillmentStart\",\"offerDetails\":{\"publisherId\":\"hllnmwynefxe\",\"offerId\":\"lf\",\"planId\":\"i\",\"planName\":\"xtjrrlk\",\"termUnit\":\"skjh\",\"termId\":\"dl\"}},\"userDetails\":{\"firstName\":\"foxcx\",\"lastName\":\"vslxlh\",\"emailAddress\":\"vkrmukmyjmkx\",\"upn\":\"tcsloj\",\"phoneNumber\":\"qid\"},\"companyDetails\":{\"companyName\":\"toqxjh\",\"country\":\"csqhtkbtnqlrng\",\"officeAddress\":\"mbiipsnawwlqk\",\"businessPhone\":\"xhhllxricct\",\"domain\":\"muqqoajxei\",\"numberOfEmployees\":7784406900944389738},\"provisioningState\":\"Canceled\",\"partnerOrganizationProperties\":{\"organizationId\":\"aexhdctrceqnk\",\"organizationName\":\"rupobehd\",\"singleSignOnProperties\":{\"singleSignOnState\":\"Enable\",\"enterpriseAppId\":\"cvumepjpbi\",\"singleSignOnUrl\":\"zpphepif\",\"aadDomains\":[\"eqir\",\"cjclykcgxv\",\"pjlvczuoda\",\"punettepdjxq\"]}},\"projectProperties\":{\"entityId\":\"oy\",\"entityName\":\"iylpck\",\"createdAt\":\"wsedvesk\",\"provisioningState\":\"Succeeded\",\"attributes\":[{\"name\":\"phrgfnzhctm\",\"value\":\"tsghpbcbcp\"}],\"regionId\":\"rpzeqac\",\"storage\":8906126674616609071,\"pgVersion\":1615507010,\"historyRetention\":2081028827,\"defaultEndpointSettings\":{\"autoscalingLimitMinCu\":53.38695185445249,\"autoscalingLimitMaxCu\":66.27143482769027},\"branch\":{\"entityId\":\"shnuqnd\",\"entityName\":\"zupfkhuytuszxhm\",\"createdAt\":\"tvegwqiukvzwy\",\"provisioningState\":\"Succeeded\",\"attributes\":[{\"name\":\"aokgkskjivbsshaj\",\"value\":\"fukpeexpgeu\"},{\"name\":\"i\",\"value\":\"hwu\"},{\"name\":\"trdexyionofnin\",\"value\":\"dbzsx\"}],\"projectId\":\"qqrsmpcbbprtugav\",\"parentId\":\"bcyksivmfogd\",\"roleName\":\"bfcmkrfts\",\"databaseName\":\"wjjxsgm\",\"roles\":[{}],\"databases\":[{},{},{},{}],\"endpoints\":[{},{}]},\"roles\":[{\"entityId\":\"cifhocjxwkl\",\"entityName\":\"zrvtx\",\"createdAt\":\"mufun\",\"provisioningState\":\"Succeeded\",\"attributes\":[{\"name\":\"vir\",\"value\":\"eyngjg\"}],\"branchId\":\"quv\",\"permissions\":[\"glpm\",\"rdcueljtiahx\",\"fqryarvsx\",\"qbglcjkaysp\"],\"isSuperUser\":false},{\"entityId\":\"dubtlmj\",\"entityName\":\"blioskkfmkmf\",\"createdAt\":\"xyxgbkkqv\",\"provisioningState\":\"Succeeded\",\"attributes\":[{\"name\":\"edlrslskkzpxvj\",\"value\":\"zdpv\"},{\"name\":\"cojhpcnabx\",\"value\":\"fsnggytexvzilm\"},{\"name\":\"iv\",\"value\":\"kwwwnckn\"},{\"name\":\"zdajlskzptjxu\",\"value\":\"weucyrth\"}],\"branchId\":\"lehmcgcjeinueho\",\"permissions\":[\"vfejvqnttmbqda\",\"zfivfokpysthhzag\",\"fwy\",\"rlhgenuze\"],\"isSuperUser\":true},{\"entityId\":\"veb\",\"entityName\":\"szllrzlsmmdqgmi\",\"createdAt\":\"pimcqrhn\",\"provisioningState\":\"Canceled\",\"attributes\":[{\"name\":\"klogx\",\"value\":\"vtza\"},{\"name\":\"hzvqnsqktcmbjwz\",\"value\":\"oslpky\"},{\"name\":\"tglwkzpgajsqjc\",\"value\":\"mqbmfuvqarwz\"},{\"name\":\"uqrebluimmbwx\",\"value\":\"fgtdmbvx\"}],\"branchId\":\"raokqkbudb\",\"permissions\":[\"okbavlyttaak\",\"wfrke\",\"sm\",\"p\"],\"isSuperUser\":true},{\"entityId\":\"igatolekscbctna\",\"entityName\":\"imwbzxpdcldpk\",\"createdAt\":\"n\",\"provisioningState\":\"Canceled\",\"attributes\":[{\"name\":\"mouxwksqmudmfco\",\"value\":\"bicziuswswj\"},{\"name\":\"kbqsjhbtqqvyfscy\",\"value\":\"fwbivqvo\"},{\"name\":\"fuy\",\"value\":\"wvbhlimbyq\"},{\"name\":\"crood\",\"value\":\"ikcdrdaasax\"}],\"branchId\":\"bsmfkwiyjvz\",\"permissions\":[\"srnawnvzmln\",\"oywsxvjabjqqaxu\",\"vym\",\"nudn\"],\"isSuperUser\":false}],\"databases\":[{\"entityId\":\"xwxq\",\"entityName\":\"uipmpvks\",\"createdAt\":\"tnsqxtlt\",\"provisioningState\":\"Failed\",\"attributes\":[{\"name\":\"pqgfhyrfr\",\"value\":\"kkld\"},{\"name\":\"rcwfcmfcnrjajq\",\"value\":\"atxjtiel\"},{\"name\":\"zqgxx\",\"value\":\"fbbmtlp\"}],\"branchId\":\"gynoiprnzcali\",\"ownerName\":\"ryqxzxa\"},{\"entityId\":\"ibmq\",\"entityName\":\"iymqr\",\"createdAt\":\"guhfupe\",\"provisioningState\":\"Canceled\",\"attributes\":[{\"name\":\"oqsbpkflanfkgxsy\",\"value\":\"owuz\"},{\"name\":\"wpuohdkcpr\",\"value\":\"ukxrzti\"},{\"name\":\"chlutixmqru\",\"value\":\"jizcbfzmcrunfhiu\"}],\"branchId\":\"mfbcpaqktkrum\",\"ownerName\":\"ed\"}],\"endpoints\":[{\"entityId\":\"fv\",\"entityName\":\"vqkxiuxqggvq\",\"createdAt\":\"hyhlwcjsqg\",\"provisioningState\":\"Succeeded\",\"attributes\":[{\"name\":\"bxrqrkijp\",\"value\":\"uqlsdx\"}],\"projectId\":\"ztv\",\"branchId\":\"mwwmjswenaww\",\"endpointType\":\"read_write\"},{\"entityId\":\"leqioulndh\",\"entityName\":\"oeojhto\",\"createdAt\":\"h\",\"provisioningState\":\"Canceled\",\"attributes\":[{\"name\":\"ytz\",\"value\":\"nglxpn\"},{\"name\":\"vyoanfbcswqagywv\",\"value\":\"xigvjrktpgaeuk\"}],\"projectId\":\"wohpmwhqnucs\",\"branchId\":\"hsidsjtdlpbnin\",\"endpointType\":\"read_write\"},{\"entityId\":\"lsvbzfcpuoeedw\",\"entityName\":\"ciklh\",\"createdAt\":\"ekrdr\",\"provisioningState\":\"Failed\",\"attributes\":[{\"name\":\"riyehqbeivdlhy\",\"value\":\"wbdbfg\"},{\"name\":\"lpu\",\"value\":\"ytjlkesmmpath\"},{\"name\":\"btahdeanii\",\"value\":\"llbvgwzsfftedous\"}],\"projectId\":\"tjtgravaqogfkb\",\"branchId\":\"auzlqbtxxw\",\"endpointType\":\"read_only\"}]}},\"location\":\"jzudrtpzk\",\"tags\":{\"hczzqrhm\":\"boy\",\"rzwnyk\":\"gqbedygi\",\"chl\":\"id\",\"acdhztxkbr\":\"mpwctoflds\"},\"id\":\"g\",\"name\":\"rwjiyew\",\"type\":\"fj\"}]}"; + = "{\"value\":[{\"properties\":{\"marketplaceDetails\":{\"subscriptionId\":\"frevkaapezkiswqj\",\"subscriptionStatus\":\"PendingFulfillmentStart\",\"offerDetails\":{\"publisherId\":\"hsyparybjuf\",\"offerId\":\"tbjczjnciui\",\"planId\":\"qvldaswvppisqqzl\",\"planName\":\"ndhzx\",\"termUnit\":\"fcfsrhkhgsnx\",\"termId\":\"wkpphefsb\"}},\"userDetails\":{\"firstName\":\"lbzxomeikjc\",\"lastName\":\"zacn\",\"emailAddress\":\"pfsuqtaaz\",\"upn\":\"bxyxoy\",\"phoneNumber\":\"uqqiqezxlhd\"},\"companyDetails\":{\"companyName\":\"qdcadwvps\",\"country\":\"j\",\"officeAddress\":\"hjriyb\",\"businessPhone\":\"zo\",\"domain\":\"nxwdvwnjkg\",\"numberOfEmployees\":3209476601303491310},\"provisioningState\":\"Canceled\",\"partnerOrganizationProperties\":{\"organizationId\":\"sqftibtyibuyvp\",\"organizationName\":\"rfqjpnqnoo\",\"singleSignOnProperties\":{\"singleSignOnState\":\"Disable\",\"enterpriseAppId\":\"e\",\"singleSignOnUrl\":\"exkxbhx\",\"aadDomains\":[\"nul\",\"mnhjevdyzn\",\"ajsvk\",\"kmq\"]}},\"projectProperties\":{\"entityId\":\"kivy\",\"entityName\":\"rl\",\"createdAt\":\"zji\",\"provisioningState\":\"Succeeded\",\"attributes\":[{\"name\":\"ef\",\"value\":\"wabs\"},{\"name\":\"lronqqlmg\",\"value\":\"lqxsjxtelex\"},{\"name\":\"vuqbozoo\",\"value\":\"zqocarku\"},{\"name\":\"lbcnndt\",\"value\":\"nx\"}],\"regionId\":\"qytl\",\"storage\":2771937460629297530,\"pgVersion\":848455814,\"historyRetention\":1026321813,\"defaultEndpointSettings\":{\"autoscalingLimitMinCu\":58.709158277728605,\"autoscalingLimitMaxCu\":17.010027872676268},\"branch\":{\"entityId\":\"kck\",\"entityName\":\"ymx\",\"createdAt\":\"abjkdtfohfao\",\"provisioningState\":\"Failed\",\"attributes\":[{\"name\":\"wrsiwdyjqurykc\",\"value\":\"raueekcsueh\"}],\"projectId\":\"ddacbcbgydlqidy\",\"parentId\":\"hmptyrilkfbn\",\"roleName\":\"qxvztpbnfnqtxjt\",\"databaseName\":\"alswbnfd\",\"roles\":[{}],\"databases\":[{}],\"endpoints\":[{}]},\"roles\":[{\"entityId\":\"f\",\"entityName\":\"gl\",\"createdAt\":\"x\",\"provisioningState\":\"Canceled\",\"attributes\":[{\"name\":\"whsbrcary\",\"value\":\"sjjzyvoaqajuveh\"},{\"name\":\"ptdmkrrbhmpful\",\"value\":\"be\"},{\"name\":\"gybpmfb\",\"value\":\"ununm\"}],\"branchId\":\"krvfyifkdschl\",\"permissions\":[\"ictnkjjwgcw\"],\"isSuperUser\":false}],\"databases\":[{\"entityId\":\"fyrtogmhmjp\",\"entityName\":\"cdf\",\"createdAt\":\"qwtygevgwmseharx\",\"provisioningState\":\"Failed\",\"attributes\":[{\"name\":\"rxtmbpjptnvw\",\"value\":\"hrsidq\"}],\"branchId\":\"l\",\"ownerName\":\"pakftngatwm\"}],\"endpoints\":[{\"entityId\":\"trymd\",\"entityName\":\"fj\",\"createdAt\":\"y\",\"provisioningState\":\"Failed\",\"attributes\":[{\"name\":\"vdwkqpldr\",\"value\":\"efgnaavuagnt\"},{\"name\":\"taoutnpdct\",\"value\":\"hspfefyihd\"},{\"name\":\"yeuyldph\",\"value\":\"tybkcgs\"}],\"projectId\":\"h\",\"branchId\":\"lnm\",\"endpointType\":\"read_write\"},{\"entityId\":\"fxexlfciatxtjrr\",\"entityName\":\"mdskjhhxdlajfoxc\",\"createdAt\":\"cvslxlhuavkrmukm\",\"provisioningState\":\"Failed\",\"attributes\":[{\"name\":\"ettcsl\",\"value\":\"jfkqidn\"}],\"projectId\":\"o\",\"branchId\":\"jhqxc\",\"endpointType\":\"read_only\"}]}},\"location\":\"kbtn\",\"tags\":{\"w\":\"ngldmbiipsn\"},\"id\":\"lqkznxhhllxricct\",\"name\":\"wmuqqoajxeiygle\",\"type\":\"rwvaexhdc\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -36,64 +36,62 @@ public void testList() throws Exception { PagedIterable response = manager.organizations().list(com.azure.core.util.Context.NONE); - Assertions.assertEquals("jzudrtpzk", response.iterator().next().location()); - Assertions.assertEquals("boy", response.iterator().next().tags().get("hczzqrhm")); - Assertions.assertEquals("tybkcgs", + Assertions.assertEquals("kbtn", response.iterator().next().location()); + Assertions.assertEquals("ngldmbiipsn", response.iterator().next().tags().get("w")); + Assertions.assertEquals("frevkaapezkiswqj", response.iterator().next().properties().marketplaceDetails().subscriptionId()); Assertions.assertEquals(MarketplaceSubscriptionStatus.PENDING_FULFILLMENT_START, response.iterator().next().properties().marketplaceDetails().subscriptionStatus()); - Assertions.assertEquals("hllnmwynefxe", + Assertions.assertEquals("hsyparybjuf", response.iterator().next().properties().marketplaceDetails().offerDetails().publisherId()); - Assertions.assertEquals("lf", + Assertions.assertEquals("tbjczjnciui", response.iterator().next().properties().marketplaceDetails().offerDetails().offerId()); - Assertions.assertEquals("i", + Assertions.assertEquals("qvldaswvppisqqzl", response.iterator().next().properties().marketplaceDetails().offerDetails().planId()); - Assertions.assertEquals("xtjrrlk", + Assertions.assertEquals("ndhzx", response.iterator().next().properties().marketplaceDetails().offerDetails().planName()); - Assertions.assertEquals("skjh", + Assertions.assertEquals("fcfsrhkhgsnx", response.iterator().next().properties().marketplaceDetails().offerDetails().termUnit()); - Assertions.assertEquals("dl", + Assertions.assertEquals("wkpphefsb", response.iterator().next().properties().marketplaceDetails().offerDetails().termId()); - Assertions.assertEquals("foxcx", response.iterator().next().properties().userDetails().firstName()); - Assertions.assertEquals("vslxlh", response.iterator().next().properties().userDetails().lastName()); - Assertions.assertEquals("vkrmukmyjmkx", response.iterator().next().properties().userDetails().emailAddress()); - Assertions.assertEquals("tcsloj", response.iterator().next().properties().userDetails().upn()); - Assertions.assertEquals("qid", response.iterator().next().properties().userDetails().phoneNumber()); - Assertions.assertEquals("toqxjh", response.iterator().next().properties().companyDetails().companyName()); - Assertions.assertEquals("csqhtkbtnqlrng", response.iterator().next().properties().companyDetails().country()); - Assertions.assertEquals("mbiipsnawwlqk", - response.iterator().next().properties().companyDetails().officeAddress()); - Assertions.assertEquals("xhhllxricct", - response.iterator().next().properties().companyDetails().businessPhone()); - Assertions.assertEquals("muqqoajxei", response.iterator().next().properties().companyDetails().domain()); - Assertions.assertEquals(7784406900944389738L, + Assertions.assertEquals("lbzxomeikjc", response.iterator().next().properties().userDetails().firstName()); + Assertions.assertEquals("zacn", response.iterator().next().properties().userDetails().lastName()); + Assertions.assertEquals("pfsuqtaaz", response.iterator().next().properties().userDetails().emailAddress()); + Assertions.assertEquals("bxyxoy", response.iterator().next().properties().userDetails().upn()); + Assertions.assertEquals("uqqiqezxlhd", response.iterator().next().properties().userDetails().phoneNumber()); + Assertions.assertEquals("qdcadwvps", response.iterator().next().properties().companyDetails().companyName()); + Assertions.assertEquals("j", response.iterator().next().properties().companyDetails().country()); + Assertions.assertEquals("hjriyb", response.iterator().next().properties().companyDetails().officeAddress()); + Assertions.assertEquals("zo", response.iterator().next().properties().companyDetails().businessPhone()); + Assertions.assertEquals("nxwdvwnjkg", response.iterator().next().properties().companyDetails().domain()); + Assertions.assertEquals(3209476601303491310L, response.iterator().next().properties().companyDetails().numberOfEmployees()); - Assertions.assertEquals("aexhdctrceqnk", + Assertions.assertEquals("sqftibtyibuyvp", response.iterator().next().properties().partnerOrganizationProperties().organizationId()); - Assertions.assertEquals("rupobehd", + Assertions.assertEquals("rfqjpnqnoo", response.iterator().next().properties().partnerOrganizationProperties().organizationName()); - Assertions.assertEquals(SingleSignOnStates.ENABLE, + Assertions.assertEquals(SingleSignOnStates.DISABLE, response.iterator() .next() .properties() .partnerOrganizationProperties() .singleSignOnProperties() .singleSignOnState()); - Assertions.assertEquals("cvumepjpbi", + Assertions.assertEquals("e", response.iterator() .next() .properties() .partnerOrganizationProperties() .singleSignOnProperties() .enterpriseAppId()); - Assertions.assertEquals("zpphepif", + Assertions.assertEquals("exkxbhx", response.iterator() .next() .properties() .partnerOrganizationProperties() .singleSignOnProperties() .singleSignOnUrl()); - Assertions.assertEquals("eqir", + Assertions.assertEquals("nul", response.iterator() .next() .properties() @@ -101,76 +99,76 @@ public void testList() throws Exception { .singleSignOnProperties() .aadDomains() .get(0)); - Assertions.assertEquals("iylpck", response.iterator().next().properties().projectProperties().entityName()); - Assertions.assertEquals("phrgfnzhctm", + Assertions.assertEquals("rl", response.iterator().next().properties().projectProperties().entityName()); + Assertions.assertEquals("ef", response.iterator().next().properties().projectProperties().attributes().get(0).name()); - Assertions.assertEquals("tsghpbcbcp", + Assertions.assertEquals("wabs", response.iterator().next().properties().projectProperties().attributes().get(0).value()); - Assertions.assertEquals("rpzeqac", response.iterator().next().properties().projectProperties().regionId()); - Assertions.assertEquals(8906126674616609071L, + Assertions.assertEquals("qytl", response.iterator().next().properties().projectProperties().regionId()); + Assertions.assertEquals(2771937460629297530L, response.iterator().next().properties().projectProperties().storage()); - Assertions.assertEquals(1615507010, response.iterator().next().properties().projectProperties().pgVersion()); - Assertions.assertEquals(2081028827, + Assertions.assertEquals(848455814, response.iterator().next().properties().projectProperties().pgVersion()); + Assertions.assertEquals(1026321813, response.iterator().next().properties().projectProperties().historyRetention()); - Assertions.assertEquals(53.38695185445249, + Assertions.assertEquals(58.709158277728605, response.iterator() .next() .properties() .projectProperties() .defaultEndpointSettings() .autoscalingLimitMinCu()); - Assertions.assertEquals(66.27143482769027, + Assertions.assertEquals(17.010027872676268, response.iterator() .next() .properties() .projectProperties() .defaultEndpointSettings() .autoscalingLimitMaxCu()); - Assertions.assertEquals("zupfkhuytuszxhm", + Assertions.assertEquals("ymx", response.iterator().next().properties().projectProperties().branch().entityName()); - Assertions.assertEquals("aokgkskjivbsshaj", + Assertions.assertEquals("wrsiwdyjqurykc", response.iterator().next().properties().projectProperties().branch().attributes().get(0).name()); - Assertions.assertEquals("fukpeexpgeu", + Assertions.assertEquals("raueekcsueh", response.iterator().next().properties().projectProperties().branch().attributes().get(0).value()); - Assertions.assertEquals("qqrsmpcbbprtugav", + Assertions.assertEquals("ddacbcbgydlqidy", response.iterator().next().properties().projectProperties().branch().projectId()); - Assertions.assertEquals("bcyksivmfogd", + Assertions.assertEquals("hmptyrilkfbn", response.iterator().next().properties().projectProperties().branch().parentId()); - Assertions.assertEquals("bfcmkrfts", + Assertions.assertEquals("qxvztpbnfnqtxjt", response.iterator().next().properties().projectProperties().branch().roleName()); - Assertions.assertEquals("wjjxsgm", + Assertions.assertEquals("alswbnfd", response.iterator().next().properties().projectProperties().branch().databaseName()); - Assertions.assertEquals("zrvtx", + Assertions.assertEquals("gl", response.iterator().next().properties().projectProperties().roles().get(0).entityName()); - Assertions.assertEquals("vir", + Assertions.assertEquals("whsbrcary", response.iterator().next().properties().projectProperties().roles().get(0).attributes().get(0).name()); - Assertions.assertEquals("eyngjg", + Assertions.assertEquals("sjjzyvoaqajuveh", response.iterator().next().properties().projectProperties().roles().get(0).attributes().get(0).value()); - Assertions.assertEquals("quv", + Assertions.assertEquals("krvfyifkdschl", response.iterator().next().properties().projectProperties().roles().get(0).branchId()); - Assertions.assertEquals("glpm", + Assertions.assertEquals("ictnkjjwgcw", response.iterator().next().properties().projectProperties().roles().get(0).permissions().get(0)); Assertions .assertFalse(response.iterator().next().properties().projectProperties().roles().get(0).isSuperUser()); - Assertions.assertEquals("uipmpvks", + Assertions.assertEquals("cdf", response.iterator().next().properties().projectProperties().databases().get(0).entityName()); - Assertions.assertEquals("pqgfhyrfr", + Assertions.assertEquals("rxtmbpjptnvw", response.iterator().next().properties().projectProperties().databases().get(0).attributes().get(0).name()); - Assertions.assertEquals("kkld", + Assertions.assertEquals("hrsidq", response.iterator().next().properties().projectProperties().databases().get(0).attributes().get(0).value()); - Assertions.assertEquals("gynoiprnzcali", + Assertions.assertEquals("l", response.iterator().next().properties().projectProperties().databases().get(0).branchId()); - Assertions.assertEquals("ryqxzxa", + Assertions.assertEquals("pakftngatwm", response.iterator().next().properties().projectProperties().databases().get(0).ownerName()); - Assertions.assertEquals("vqkxiuxqggvq", + Assertions.assertEquals("fj", response.iterator().next().properties().projectProperties().endpoints().get(0).entityName()); - Assertions.assertEquals("bxrqrkijp", + Assertions.assertEquals("vdwkqpldr", response.iterator().next().properties().projectProperties().endpoints().get(0).attributes().get(0).name()); - Assertions.assertEquals("uqlsdx", + Assertions.assertEquals("efgnaavuagnt", response.iterator().next().properties().projectProperties().endpoints().get(0).attributes().get(0).value()); - Assertions.assertEquals("ztv", + Assertions.assertEquals("h", response.iterator().next().properties().projectProperties().endpoints().get(0).projectId()); - Assertions.assertEquals("mwwmjswenaww", + Assertions.assertEquals("lnm", response.iterator().next().properties().projectProperties().endpoints().get(0).branchId()); Assertions.assertEquals(EndpointType.READ_WRITE, response.iterator().next().properties().projectProperties().endpoints().get(0).endpointType()); diff --git a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/ProjectsCreateOrUpdateMockTests.java b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/ProjectsCreateOrUpdateMockTests.java index 9f814dbd9c51..822445aa2dcb 100644 --- a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/ProjectsCreateOrUpdateMockTests.java +++ b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/ProjectsCreateOrUpdateMockTests.java @@ -30,7 +30,7 @@ public final class ProjectsCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"properties\":{\"entityId\":\"xfabl\",\"entityName\":\"pwbmwhria\",\"createdAt\":\"wrycgnwpl\",\"provisioningState\":\"Succeeded\",\"attributes\":[{\"name\":\"ctsbbibt\",\"value\":\"cu\"},{\"name\":\"qvumspbfsfeqbbe\",\"value\":\"f\"},{\"name\":\"uqfpyyxmzrmtm\",\"value\":\"wi\"}],\"regionId\":\"we\",\"storage\":8294959969159846095,\"pgVersion\":1563265954,\"historyRetention\":2080803737,\"defaultEndpointSettings\":{\"autoscalingLimitMinCu\":55.359310157197186,\"autoscalingLimitMaxCu\":54.85246943768806},\"branch\":{\"entityId\":\"prcmvouujxdiik\",\"entityName\":\"xrezsvavlrxi\",\"createdAt\":\"moywlu\",\"provisioningState\":\"Failed\",\"attributes\":[{\"name\":\"wybsz\",\"value\":\"ncnpat\"},{\"name\":\"ftsaebwfwh\",\"value\":\"orpwaltzwugexojf\"},{\"name\":\"cylht\",\"value\":\"hthvazjpwex\"},{\"name\":\"dr\",\"value\":\"probzzxezmnrkjgp\"}],\"projectId\":\"uxsphlokfpm\",\"parentId\":\"pd\",\"roleName\":\"vfbhwb\",\"databaseName\":\"ufvcgnrgl\",\"roles\":[{\"entityId\":\"yambhb\",\"entityName\":\"ebzx\",\"createdAt\":\"jqut\",\"provisioningState\":\"Succeeded\",\"attributes\":[{\"name\":\"nntrvrkps\",\"value\":\"bduxvzmlghnys\"},{\"name\":\"lpyeu\",\"value\":\"kppdi\"},{\"name\":\"qb\",\"value\":\"lxvhhyqqegatxgrz\"},{\"name\":\"mg\",\"value\":\"nmtsdixc\"}],\"branchId\":\"kibmgjymn\",\"permissions\":[\"agairwcqzoofjnqj\"],\"isSuperUser\":true},{\"entityId\":\"fbhtleberp\",\"entityName\":\"jeknfqnw\",\"createdAt\":\"qxowkdn\",\"provisioningState\":\"Succeeded\",\"attributes\":[{\"name\":\"rhw\",\"value\":\"ehycpn\"},{\"name\":\"wawonoehrguql\",\"value\":\"fwafbjz\"}],\"branchId\":\"yrguyfazbk\",\"permissions\":[\"ygvthrmxkbcjw\",\"dxomrawppk\",\"boozflyacagaed\"],\"isSuperUser\":false},{\"entityId\":\"clmgdtw\",\"entityName\":\"bd\",\"createdAt\":\"kuz\",\"provisioningState\":\"Canceled\",\"attributes\":[{\"name\":\"ooyvhtuqbpeln\",\"value\":\"ibncgagdvcd\"},{\"name\":\"hftzbpyfao\",\"value\":\"df\"},{\"name\":\"htncwmhjobzrfp\",\"value\":\"iz\"}],\"branchId\":\"qhy\",\"permissions\":[\"vb\",\"wgwhgkg\",\"o\",\"uoorssatfybipufd\"],\"isSuperUser\":false},{\"entityId\":\"bd\",\"entityName\":\"as\",\"createdAt\":\"uxvzfqayopbtsi\",\"provisioningState\":\"Failed\",\"attributes\":[{\"name\":\"hx\",\"value\":\"ndztgsq\"},{\"name\":\"ayqmarxneibpgbrh\",\"value\":\"jdqknhqn\"},{\"name\":\"otpu\",\"value\":\"nnohmmzngo\"},{\"name\":\"fr\",\"value\":\"uypwyiulaynos\"}],\"branchId\":\"kfhaxttpfsmwgsgh\",\"permissions\":[\"umlddauqmllfe\"],\"isSuperUser\":false}],\"databases\":[{\"entityId\":\"rigrjdljlkq\",\"entityName\":\"krbzkuas\",\"createdAt\":\"xk\",\"provisioningState\":\"Succeeded\",\"attributes\":[{\"name\":\"l\",\"value\":\"gltoizwxvscksgf\"},{\"name\":\"yskye\",\"value\":\"gafxczvf\"},{\"name\":\"ckwrtw\",\"value\":\"ety\"}],\"branchId\":\"szrtlhpdhwynct\",\"ownerName\":\"zcnjfmbbfnvjxit\"},{\"entityId\":\"vnk\",\"entityName\":\"iklsmni\",\"createdAt\":\"lcoqksyiib\",\"provisioningState\":\"Canceled\",\"attributes\":[{\"name\":\"gbudav\",\"value\":\"d\"},{\"name\":\"rbccqcdht\",\"value\":\"ojvlirknucosaw\"}],\"branchId\":\"tnagzlgpya\",\"ownerName\":\"ihzqjjtsmuy\"}],\"endpoints\":[{\"entityId\":\"tkacybdueurgmcd\",\"entityName\":\"kshloje\",\"createdAt\":\"hzic\",\"provisioningState\":\"Failed\",\"attributes\":[{\"name\":\"hyaaknyukibxiglh\",\"value\":\"hzwxq\"},{\"name\":\"ejp\",\"value\":\"ilhvtozyagjj\"},{\"name\":\"xkbylhyyxgffklv\",\"value\":\"z\"}],\"projectId\":\"trdgscnvqeons\",\"branchId\":\"wxlwme\",\"endpointType\":\"read_only\"},{\"entityId\":\"xpthceopvkvt\",\"entityName\":\"vesob\",\"createdAt\":\"okh\",\"provisioningState\":\"Failed\",\"attributes\":[{\"name\":\"yarnggcjfwblqhxk\",\"value\":\"smcolmugpy\"},{\"name\":\"aosd\",\"value\":\"l\"},{\"name\":\"wzxeygzvtyevjhu\",\"value\":\"nobguqisqsqkpdmi\"},{\"name\":\"y\",\"value\":\"pnml\"}],\"projectId\":\"qcpszp\",\"branchId\":\"vqdvrdmvxyrxdhg\",\"endpointType\":\"read_only\"},{\"entityId\":\"bxaot\",\"entityName\":\"bzxmbtplefoio\",\"createdAt\":\"doxzn\",\"provisioningState\":\"Canceled\",\"attributes\":[{\"name\":\"muuv\",\"value\":\"awsxmrszbknimxlp\"},{\"name\":\"erxrzutylcurza\",\"value\":\"mnb\"},{\"name\":\"qaeht\",\"value\":\"bjmbnvynfaooeac\"}],\"projectId\":\"dcglskakddid\",\"branchId\":\"zl\",\"endpointType\":\"read_write\"}]},\"roles\":[{\"entityId\":\"pbyxroiduyqy\",\"entityName\":\"fmnoiicsudy\",\"createdAt\":\"rjjtalxrdsjrho\",\"provisioningState\":\"Canceled\",\"attributes\":[{\"name\":\"usxxhdodpjwybl\",\"value\":\"tbdmvsbyidae\"},{\"name\":\"q\",\"value\":\"vekmkwjfbotloggd\"},{\"name\":\"s\",\"value\":\"ursuivuxcjk\"}],\"branchId\":\"qwczsyiq\",\"permissions\":[\"fwihvaan\"],\"isSuperUser\":true},{\"entityId\":\"hjrfdmfdvbbaex\",\"entityName\":\"fwtgdfkkauigvmua\",\"createdAt\":\"czfedyuep\",\"provisioningState\":\"Canceled\",\"attributes\":[{\"name\":\"ida\",\"value\":\"jvyweo\"},{\"name\":\"fkumcfjxoky\",\"value\":\"lsyasv\"},{\"name\":\"nkwmygjj\",\"value\":\"krknf\"},{\"name\":\"rugjqyckgtx\",\"value\":\"rdtulcrcjdklotcs\"}],\"branchId\":\"mzoonsvobchkxfpw\",\"permissions\":[\"sl\"],\"isSuperUser\":true},{\"entityId\":\"lmnnk\",\"entityName\":\"ayqshwyqxridttbs\",\"createdAt\":\"jmkgxqwqueuuylzt\",\"provisioningState\":\"Failed\",\"attributes\":[{\"name\":\"evjykofvezefkhkq\",\"value\":\"wqlepjj\"},{\"name\":\"kca\",\"value\":\"fwzcntogffjwaj\"},{\"name\":\"rtwzvaqkifmxa\",\"value\":\"ostfzknh\"}],\"branchId\":\"m\",\"permissions\":[\"cfvdscnhemvwfnqq\"],\"isSuperUser\":false}],\"databases\":[{\"entityId\":\"r\",\"entityName\":\"godtggrs\",\"createdAt\":\"wjfkainjmuym\",\"provisioningState\":\"Canceled\",\"attributes\":[{\"name\":\"tscbgmusai\",\"value\":\"tdscnkzzohnrdd\"},{\"name\":\"lze\",\"value\":\"ozrehlbzqixbnjrq\"},{\"name\":\"zyuexozony\",\"value\":\"pam\"},{\"name\":\"udpabcreuwzos\",\"value\":\"yjxvc\"}],\"branchId\":\"sormrex\",\"ownerName\":\"dubewgzy\"}],\"endpoints\":[{\"entityId\":\"uvecovsd\",\"entityName\":\"zrtdbakr\",\"createdAt\":\"mz\",\"provisioningState\":\"Failed\",\"attributes\":[{\"name\":\"eqsifjmclngygnhr\",\"value\":\"ombcdtajdopggo\"}],\"projectId\":\"jo\",\"branchId\":\"rotpvclpof\",\"endpointType\":\"read_write\"}]},\"id\":\"wkpts\",\"name\":\"wxjgvhxccbmkak\",\"type\":\"kookbputmgvmuyak\"}"; + = "{\"properties\":{\"entityId\":\"vorbalkjnbk\",\"entityName\":\"h\",\"createdAt\":\"tqstqkqsygxiyne\",\"provisioningState\":\"Succeeded\",\"attributes\":[{\"name\":\"zkheubanlxunpqcc\",\"value\":\"qiawzl\"},{\"name\":\"klaslga\",\"value\":\"izuxlrarwpewsaud\"},{\"name\":\"ejtig\",\"value\":\"sx\"}],\"regionId\":\"ytnkqb\",\"storage\":6976813642737516877,\"pgVersion\":76421440,\"historyRetention\":522943136,\"defaultEndpointSettings\":{\"autoscalingLimitMinCu\":85.89372340228213,\"autoscalingLimitMaxCu\":68.44178885621959},\"branch\":{\"entityId\":\"nhjiotiffb\",\"entityName\":\"ngkegxcypxbbfe\",\"createdAt\":\"ilyrzoxp\",\"provisioningState\":\"Failed\",\"attributes\":[{\"name\":\"r\",\"value\":\"lqownkiua\"},{\"name\":\"ewnahwkxjjmzt\",\"value\":\"lmsoodtmve\"}],\"projectId\":\"hdyswcrptveajc\",\"parentId\":\"vlgsrgkrfiz\",\"roleName\":\"ywlptyuqh\",\"databaseName\":\"mc\",\"roles\":[{\"entityId\":\"pfuofixcnpcfykkp\",\"entityName\":\"cpawmp\",\"createdAt\":\"rdpwrpc\",\"provisioningState\":\"Canceled\",\"attributes\":[{\"name\":\"fwzlgzawkgyepeya\",\"value\":\"nnidmdiawpzxk\"}],\"branchId\":\"ntmkctdhuosgwqps\",\"permissions\":[\"i\",\"qodvqgcnbhcbmj\"],\"isSuperUser\":false},{\"entityId\":\"bn\",\"entityName\":\"ntsxjmfmeftvh\",\"createdAt\":\"o\",\"provisioningState\":\"Canceled\",\"attributes\":[{\"name\":\"skbwgm\",\"value\":\"g\"}],\"branchId\":\"lcfog\",\"permissions\":[\"xnwjtpfdzxcouz\"],\"isSuperUser\":true}],\"databases\":[{\"entityId\":\"k\",\"entityName\":\"zkdtzxsoed\",\"createdAt\":\"wglihezomu\",\"provisioningState\":\"Canceled\",\"attributes\":[{\"name\":\"snio\",\"value\":\"etbzdrdpuenxkgtl\"},{\"name\":\"lmtrlxcznnhz\",\"value\":\"bnbmxlxm\"},{\"name\":\"tygeqzus\",\"value\":\"toqcahfsgbjm\"},{\"name\":\"reesrfwsszvl\",\"value\":\"wliso\"}],\"branchId\":\"tfx\",\"ownerName\":\"rqmipfjwf\"},{\"entityId\":\"gizmshxxbaizabu\",\"entityName\":\"vgs\",\"createdAt\":\"toxjdzj\",\"provisioningState\":\"Canceled\",\"attributes\":[{\"name\":\"hxqqmqip\",\"value\":\"y\"},{\"name\":\"hfnzocx\",\"value\":\"tfshksnyzm\"},{\"name\":\"pamwbw\",\"value\":\"bnl\"},{\"name\":\"lcefiqdktw\",\"value\":\"kvi\"}],\"branchId\":\"pfliwo\",\"ownerName\":\"guuzh\"},{\"entityId\":\"ladpcmhjha\",\"entityName\":\"ybkekym\",\"createdAt\":\"ztsilscvq\",\"provisioningState\":\"Failed\",\"attributes\":[{\"name\":\"hfym\",\"value\":\"ouihy\"}],\"branchId\":\"euugcigzho\",\"ownerName\":\"mgbvmtdwrqbe\"}],\"endpoints\":[{\"entityId\":\"veglabtvkbiwzn\",\"entityName\":\"fg\",\"createdAt\":\"cud\",\"provisioningState\":\"Succeeded\",\"attributes\":[{\"name\":\"aczmuh\",\"value\":\"cakznhokhoitwhrj\"},{\"name\":\"dmmazdnc\",\"value\":\"idb\"}],\"projectId\":\"glhzqp\",\"branchId\":\"bawkikcdg\",\"endpointType\":\"read_write\"},{\"entityId\":\"sd\",\"entityName\":\"ey\",\"createdAt\":\"xdede\",\"provisioningState\":\"Canceled\",\"attributes\":[{\"name\":\"agxsurej\",\"value\":\"rshzzbgullcxiqqz\"},{\"name\":\"koxdupnamgl\",\"value\":\"ouigdmfivjqte\"}],\"projectId\":\"qq\",\"branchId\":\"dydkghpcvrwqir\",\"endpointType\":\"read_write\"}]},\"roles\":[{\"entityId\":\"hmvfxlapjajodm\",\"entityName\":\"rw\",\"createdAt\":\"gqvqokqluj\",\"provisioningState\":\"Succeeded\",\"attributes\":[{\"name\":\"bwlyvxc\",\"value\":\"pqvctsfaeuhwwsk\"},{\"name\":\"stvzuzhasupml\",\"value\":\"pdpg\"}],\"branchId\":\"zqazvb\",\"permissions\":[\"kptgongruat\",\"yiysjqheni\",\"beqngubabyjde\",\"ysc\"],\"isSuperUser\":true},{\"entityId\":\"zjemexmnvkvm\",\"entityName\":\"rxl\",\"createdAt\":\"wmcpmrrdlhvdvm\",\"provisioningState\":\"Failed\",\"attributes\":[{\"name\":\"aeqjzmhkd\",\"value\":\"lacro\"},{\"name\":\"zfmunerkelux\",\"value\":\"shxzezb\"},{\"name\":\"uzudlevzskejcg\",\"value\":\"fsgqkstyecupyuij\"},{\"name\":\"ard\",\"value\":\"vs\"}],\"branchId\":\"fmazpzdqwu\",\"permissions\":[\"mcokxizeku\",\"frjwucaon\",\"vajbvbnkrdemdid\"],\"isSuperUser\":true}],\"databases\":[{\"entityId\":\"gzwdydamis\",\"entityName\":\"ztdivykpxkq\",\"createdAt\":\"tpjfojiunrlshxuk\",\"provisioningState\":\"Failed\",\"attributes\":[{\"name\":\"toiboancdr\",\"value\":\"o\"},{\"name\":\"nvxuldxonckb\",\"value\":\"lblfxlupibaqzizx\"},{\"name\":\"pzweghlwwbo\",\"value\":\"vgfklqiyndveqe\"},{\"name\":\"sbfvdstrkzxsgtzn\",\"value\":\"vlrdsmovpi\"}],\"branchId\":\"ndnoxaxnrqaq\",\"ownerName\":\"nndx\"},{\"entityId\":\"o\",\"entityName\":\"dvrgptqmawzjdrp\",\"createdAt\":\"fu\",\"provisioningState\":\"Succeeded\",\"attributes\":[{\"name\":\"sd\",\"value\":\"tqgkujd\"},{\"name\":\"ooxrqwoeurb\",\"value\":\"igapdy\"}],\"branchId\":\"ikeej\",\"ownerName\":\"dfhtwmmkfqbriqul\"},{\"entityId\":\"trj\",\"entityName\":\"qkvyhzokpoyuohu\",\"createdAt\":\"snaajph\",\"provisioningState\":\"Succeeded\",\"attributes\":[{\"name\":\"nglpwsada\",\"value\":\"jsumxpezcoio\"},{\"name\":\"jrmfqzwqd\",\"value\":\"xkeedcnwmy\"},{\"name\":\"xfqzkvemyzd\",\"value\":\"czaqpqifdbmpt\"}],\"branchId\":\"txzuisamonatnize\",\"ownerName\":\"oqsqjghr\"}],\"endpoints\":[{\"entityId\":\"plwsttxsrgxfqp\",\"entityName\":\"iceovxgzw\",\"createdAt\":\"xyrujmt\",\"provisioningState\":\"Succeeded\",\"attributes\":[{\"name\":\"ik\",\"value\":\"ohzixyqhfnkvycqq\"},{\"name\":\"dseipnquwzxhrp\",\"value\":\"yodlhkfktltddsob\"}],\"projectId\":\"pnouhbqezkqx\",\"branchId\":\"lu\",\"endpointType\":\"read_write\"},{\"entityId\":\"fcvcewbwq\",\"entityName\":\"gsjs\",\"createdAt\":\"mrncmaz\",\"provisioningState\":\"Failed\",\"attributes\":[{\"name\":\"hyqmrejparnpv\",\"value\":\"rsz\"},{\"name\":\"bwtdr\",\"value\":\"wgzwllxzlhhfi\"}],\"projectId\":\"cfculzj\",\"branchId\":\"hp\",\"endpointType\":\"read_write\"},{\"entityId\":\"yldqpzfzxsox\",\"entityName\":\"unjlzkdrocq\",\"createdAt\":\"ytqqtcmi\",\"provisioningState\":\"Canceled\",\"attributes\":[{\"name\":\"vn\",\"value\":\"eylajamcajyhft\"},{\"name\":\"zcrryklleynqa\",\"value\":\"hkigglclwalhvub\"},{\"name\":\"gzphetxd\",\"value\":\"cmyc\"},{\"name\":\"ajqzj\",\"value\":\"alec\"}],\"projectId\":\"ibiwksdegyxsb\",\"branchId\":\"zvoikvntwczf\",\"endpointType\":\"read_write\"},{\"entityId\":\"hlcxpblalh\",\"entityName\":\"zpfkis\",\"createdAt\":\"idqzsaaoqdsgpto\",\"provisioningState\":\"Failed\",\"attributes\":[{\"name\":\"ia\",\"value\":\"cnlrt\"},{\"name\":\"fijzz\",\"value\":\"aoijolb\"}],\"projectId\":\"uktwieopexelxqdw\",\"branchId\":\"wyil\",\"endpointType\":\"read_write\"}]},\"id\":\"kgxyxyauxre\",\"name\":\"do\",\"type\":\"mcnltmwytkujsqyc\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -40,195 +40,174 @@ public void testCreateOrUpdate() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); Project response = manager.projects() - .define("i") - .withExistingOrganization("shjvpzaptuoskaoi", "jixwfgc") - .withProperties(new ProjectProperties().withEntityName("nujvqynvavi") - .withAttributes(Arrays.asList(new Attributes().withName("uddrwjc").withValue("jbrhlhpvzadbw"), - new Attributes().withName("nnin").withValue("fhxrzfr"), - new Attributes().withName("vztiucwviqllukh").withValue("rcqxgcbvzarmqc"))) - .withRegionId("okstsinvagovjyh") - .withStorage(3047175540235079611L) - .withPgVersion(1624969770) - .withHistoryRetention(1174803854) - .withDefaultEndpointSettings(new DefaultEndpointSettings().withAutoscalingLimitMinCu(99.70891949032664) - .withAutoscalingLimitMaxCu(98.64417809464288)) - .withBranch(new BranchProperties().withEntityName("vorbalkjnbk") - .withAttributes(Arrays.asList(new Attributes().withName("tqkqsygxiynecov").withValue("gzkheubanl"), - new Attributes().withName("u").withValue("pqcckqiawzlz"), - new Attributes().withName("laslgacizux").withValue("r"))) - .withProjectId("wp") - .withParentId("saudoejtighsx") - .withRoleName("ytnkqb") - .withDatabaseName("ahovuuw") - .withRoles(Arrays + .define("usuzgfjzcvaaxo") + .withExistingOrganization("zaahzbhuroolkoli", "hhmo") + .withProperties(new ProjectProperties().withEntityName("kuk") + .withAttributes(Arrays.asList(new Attributes().withName("hoqeqshavljqk").withValue("yrqolnthbbnkgz"))) + .withRegionId("wdrnzkj") + .withStorage(5969767813024427211L) + .withPgVersion(1493461224) + .withHistoryRetention(79179303) + .withDefaultEndpointSettings(new DefaultEndpointSettings().withAutoscalingLimitMinCu(58.163566206474535) + .withAutoscalingLimitMaxCu(89.48256105249192)) + .withBranch( + new BranchProperties().withEntityName("mq") + .withAttributes(Arrays.asList(new Attributes().withName("qmdtffi").withValue("jmr"), + new Attributes().withName("khmwdmd").withValue("gyqi"), + new Attributes().withName("okwtjawhvagnqfqq").withValue("lcvmyolcaymjch"))) + .withProjectId("snvlaqd") + .withParentId("yzawatu") + .withRoleName("kokb") + .withDatabaseName("othymgobl") + .withRoles( + Arrays.asList( + new NeonRoleProperties().withEntityName("eakhtmhobcya") + .withAttributes(Arrays.asList( + new Attributes().withName("aoaqymhccto").withValue("uowyrnskbyhqu"), + new Attributes().withName("czygxv").withValue("ajpxecxqnwhscoza"), + new Attributes().withName("mvgxsmpknpwir").withValue("ljfewxqo"))) + .withBranchId("xudnmckap") + .withPermissions(Arrays.asList("nqi")) + .withIsSuperUser(true), + new NeonRoleProperties().withEntityName("kkyo") + .withAttributes( + Arrays.asList(new Attributes().withName("ksmfxm").withValue("vprstv"))) + .withBranchId("tbfjtdyotnplf") + .withPermissions(Arrays.asList("occqrqxw", "tjtdrhutfd", "a", "txop")) + .withIsSuperUser(true), + new NeonRoleProperties().withEntityName("gssz") + .withAttributes(Arrays.asList( + new Attributes().withName("ncclabvoyngsuxxc").withValue("bmyqjog"), + new Attributes().withName("dsaidjanormovdxx").withValue("rntu"))) + .withBranchId("oilunwemhdee") + .withPermissions(Arrays.asList("lkyozdsfzj", "egrhrh")) + .withIsSuperUser(false))) + .withDatabases( + Arrays + .asList(new NeonDatabaseProperties().withEntityName("bfiobpnjodfc") + .withAttributes(Arrays.asList( + new Attributes().withName("oxsazuxejgwe").withValue("ywnfyszzaczs"), + new Attributes().withName("nqbdnddbboz").withValue("yvrmkjm"))) + .withBranchId("trchwudlxe") + .withOwnerName("htpmnoejhq"))) + .withEndpoints(Arrays.asList( + new EndpointProperties().withEntityName("mypgfqvmty") + .withAttributes(Arrays.asList(new Attributes().withName("ampqcrzgeuq").withValue("b"), + new Attributes().withName("iatwfaujegqdtadr").withValue("kgd"))) + .withProjectId("jkrukizyhgsqtnqs") + .withBranchId("xqfpj") + .withEndpointType(EndpointType.READ_WRITE), + new EndpointProperties().withEntityName("fzuscstun") + .withAttributes( + Arrays.asList(new Attributes().withName("gjsysmvxodgwxfkz").withValue("ifc"), + new Attributes().withName("vbdujgcwxvecbb").withValue("jtrdxr"), + new Attributes().withName("zagbbgiarksykp").withValue("dqxwabzrwiqrxhac"))) + .withProjectId("dosqkptjqg") + .withBranchId("fmmainwhedxkpbq") + .withEndpointType(EndpointType.READ_ONLY)))) + .withRoles( + Arrays .asList( - new NeonRoleProperties().withEntityName("fbbcngkegxcypxbb") - .withAttributes(Arrays.asList(new Attributes().withName("r").withValue("lqownkiua"), - new Attributes().withName("ewnahwkxjjmzt").withValue("lmsoodtmve"))) - .withBranchId("hdyswcrptveajc") - .withPermissions(Arrays.asList("lgsrgkrfizrpywlp", "yuqh", "lmcskyk")) - .withIsSuperUser(false), - new NeonRoleProperties().withEntityName("pawmpjprdp") - .withAttributes(Arrays.asList(new Attributes().withName("z").withValue("wk"), - new Attributes().withName("yep").withValue("yamnnidmdiawp"))) - .withBranchId("kzrn") - .withPermissions(Arrays.asList("ctdhuosgwq")) + new NeonRoleProperties().withEntityName("jufbnkl") + .withAttributes(Arrays.asList( + new Attributes().withName("fdxaglzfytlbtlq").withValue("opxouvmrsif"), + new Attributes().withName("ikyypz").withValue("gxfx"))) + .withBranchId("yrqsdbpokszanm") + .withPermissions(Arrays.asList("pter", "iuwkirkskwzts")) .withIsSuperUser(true), - new NeonRoleProperties().withEntityName("gcnbhcbmjk") - .withAttributes(Arrays.asList(new Attributes().withName("eftvhkmoog").withValue("rh"))) - .withBranchId("bwgmjgrul") - .withPermissions(Arrays.asList("gxhcxnwjtpfdzxco", "z")) - .withIsSuperUser(true))) - .withDatabases(Arrays.asList(new NeonDatabaseProperties().withEntityName("zkdtzxsoed") - .withAttributes(Arrays.asList(new Attributes().withName("snio").withValue("etbzdrdpuenxkgtl"), - new Attributes().withName("lmtrlxcznnhz").withValue("bnbmxlxm"), - new Attributes().withName("tygeqzus").withValue("toqcahfsgbjm"), - new Attributes().withName("reesrfwsszvl").withValue("wliso"))) - .withBranchId("tfx") - .withOwnerName("rqmipfjwf"), - new NeonDatabaseProperties().withEntityName("vgs") - .withAttributes(Arrays.asList(new Attributes().withName("hxqqmqip").withValue("y"), - new Attributes().withName("hfnzocx").withValue("tfshksnyzm"), - new Attributes().withName("pamwbw").withValue("bnl"), - new Attributes().withName("lcefiqdktw").withValue("kvi"))) - .withBranchId("pfliwo") - .withOwnerName("guuzh"), - new NeonDatabaseProperties().withEntityName("ybkekym") - .withAttributes(Arrays.asList(new Attributes().withName("hfym").withValue("ouihy"))) - .withBranchId("euugcigzho") - .withOwnerName("mgbvmtdwrqbe"))) - .withEndpoints(Arrays.asList(new EndpointProperties().withEntityName("fg") - .withAttributes(Arrays.asList(new Attributes().withName("aczmuh").withValue("cakznhokhoitwhrj"), - new Attributes().withName("dmmazdnc").withValue("idb"))) - .withProjectId("glhzqp") - .withBranchId("bawkikcdg") - .withEndpointType(EndpointType.READ_WRITE), - new EndpointProperties().withEntityName("ey") - .withAttributes( - Arrays.asList(new Attributes().withName("agxsurej").withValue("rshzzbgullcxiqqz"), - new Attributes().withName("koxdupnamgl").withValue("ouigdmfivjqte"))) - .withProjectId("qq") - .withBranchId("dydkghpcvrwqir") - .withEndpointType(EndpointType.READ_WRITE)))) - .withRoles(Arrays.asList( - new NeonRoleProperties().withEntityName("rw") - .withAttributes(Arrays.asList(new Attributes().withName("bwlyvxc").withValue("pqvctsfaeuhwwsk"), - new Attributes().withName("stvzuzhasupml").withValue("pdpg"))) - .withBranchId("zqazvb") - .withPermissions(Arrays.asList("kptgongruat", "yiysjqheni", "beqngubabyjde", "ysc")) - .withIsSuperUser(true), - new NeonRoleProperties().withEntityName("rxl") - .withAttributes(Arrays.asList(new Attributes().withName("aeqjzmhkd").withValue("lacro"), - new Attributes().withName("zfmunerkelux").withValue("shxzezb"), - new Attributes().withName("uzudlevzskejcg").withValue("fsgqkstyecupyuij"), - new Attributes().withName("ard").withValue("vs"))) - .withBranchId("fmazpzdqwu") - .withPermissions(Arrays.asList("mcokxizeku", "frjwucaon", "vajbvbnkrdemdid")) - .withIsSuperUser(true))) - .withDatabases(Arrays.asList( - new NeonDatabaseProperties().withEntityName("ztdivykpxkq") - .withAttributes(Arrays.asList(new Attributes().withName("toiboancdr").withValue("o"), - new Attributes().withName("nvxuldxonckb").withValue("lblfxlupibaqzizx"), - new Attributes().withName("pzweghlwwbo").withValue("vgfklqiyndveqe"), - new Attributes().withName("sbfvdstrkzxsgtzn").withValue("vlrdsmovpi"))) - .withBranchId("ndnoxaxnrqaq") - .withOwnerName("nndx"), - new NeonDatabaseProperties().withEntityName("dvrgptqmawzjdrp") - .withAttributes(Arrays.asList(new Attributes().withName("sd").withValue("tqgkujd"), - new Attributes().withName("ooxrqwoeurb").withValue("igapdy"))) - .withBranchId("ikeej") - .withOwnerName("dfhtwmmkfqbriqul"), - new NeonDatabaseProperties().withEntityName("qkvyhzokpoyuohu") - .withAttributes(Arrays.asList(new Attributes().withName("nglpwsada").withValue("jsumxpezcoio"), - new Attributes().withName("jrmfqzwqd").withValue("xkeedcnwmy"), - new Attributes().withName("xfqzkvemyzd").withValue("czaqpqifdbmpt"))) - .withBranchId("txzuisamonatnize") - .withOwnerName("oqsqjghr"))) + new NeonRoleProperties().withEntityName("cq") + .withAttributes( + Arrays.asList(new Attributes().withName("ptvdxxheigm").withValue("ilwzghj"), + new Attributes().withName("jvmabzzbway").withValue("fmdafbgymqtnap"), + new Attributes().withName("eojxrjn").withValue("sconxavipney"))) + .withBranchId("bjizqfsgn") + .withPermissions(Arrays.asList("zed")) + .withIsSuperUser(false))) + .withDatabases(Arrays.asList(new NeonDatabaseProperties().withEntityName("picdbk") + .withAttributes(Arrays.asList(new Attributes().withName("shthmgpczqu").withValue("ptkbvcpxtzhi"))) + .withBranchId("qbtimpk") + .withOwnerName("lornsihqh"))) .withEndpoints(Arrays.asList( - new EndpointProperties().withEntityName("iceovxgzw") - .withAttributes(Arrays.asList(new Attributes().withName("ik").withValue("ohzixyqhfnkvycqq"), - new Attributes().withName("dseipnquwzxhrp").withValue("yodlhkfktltddsob"))) - .withProjectId("pnouhbqezkqx") - .withBranchId("lu") - .withEndpointType(EndpointType.READ_WRITE), - new EndpointProperties().withEntityName("gsjs") - .withAttributes(Arrays.asList(new Attributes().withName("hyqmrejparnpv").withValue("rsz"), - new Attributes().withName("bwtdr").withValue("wgzwllxzlhhfi"))) - .withProjectId("cfculzj") - .withBranchId("hp") - .withEndpointType(EndpointType.READ_WRITE), - new EndpointProperties().withEntityName("unjlzkdrocq") - .withAttributes(Arrays.asList(new Attributes().withName("vn").withValue("eylajamcajyhft"), - new Attributes().withName("zcrryklleynqa").withValue("hkigglclwalhvub"), - new Attributes().withName("gzphetxd").withValue("cmyc"), - new Attributes().withName("ajqzj").withValue("alec"))) - .withProjectId("ibiwksdegyxsb") - .withBranchId("zvoikvntwczf") - .withEndpointType(EndpointType.READ_WRITE), - new EndpointProperties().withEntityName("zpfkis") - .withAttributes(Arrays.asList(new Attributes().withName("ia").withValue("cnlrt"), - new Attributes().withName("fijzz").withValue("aoijolb"))) - .withProjectId("uktwieopexelxqdw") - .withBranchId("wyil") - .withEndpointType(EndpointType.READ_WRITE)))) + new EndpointProperties().withEntityName("akx") + .withAttributes(Arrays.asList(new Attributes().withName("jtgirnb").withValue("mgm"), + new Attributes().withName("dorgmynltw").withValue("p"), + new Attributes().withName("tmfoeajogsyxwet").withValue("mfd"), + new Attributes().withName("rvlkpzwbhnrec").withValue("hdidrmuhkahmjedb"))) + .withProjectId("cvkhhwmjpjbweun") + .withBranchId("qrrihufoihp") + .withEndpointType(EndpointType.READ_ONLY), + new EndpointProperties().withEntityName("iuzvkunhdimju") + .withAttributes(Arrays.asList(new Attributes().withName("wgofmhx").withValue("rjlvzklkvbgi"), + new Attributes().withName("yjtkakvlb").withValue("shjvpzaptuoskaoi"))) + .withProjectId("ixwfgcdi") + .withBranchId("kcxwnujvqynvavi") + .withEndpointType(EndpointType.READ_ONLY), + new EndpointProperties().withEntityName("a") + .withAttributes(Arrays.asList(new Attributes().withName("lhpv").withValue("adbwe"), + new Attributes().withName("ninafhxrz").withValue("rmvzti"), + new Attributes().withName("cwviqllukhk").withValue("cqx"))) + .withProjectId("bvzarmq") + .withBranchId("po") + .withEndpointType(EndpointType.READ_ONLY)))) .create(); - Assertions.assertEquals("pwbmwhria", response.properties().entityName()); - Assertions.assertEquals("ctsbbibt", response.properties().attributes().get(0).name()); - Assertions.assertEquals("cu", response.properties().attributes().get(0).value()); - Assertions.assertEquals("we", response.properties().regionId()); - Assertions.assertEquals(8294959969159846095L, response.properties().storage()); - Assertions.assertEquals(1563265954, response.properties().pgVersion()); - Assertions.assertEquals(2080803737, response.properties().historyRetention()); - Assertions.assertEquals(55.359310157197186, + Assertions.assertEquals("h", response.properties().entityName()); + Assertions.assertEquals("zkheubanlxunpqcc", response.properties().attributes().get(0).name()); + Assertions.assertEquals("qiawzl", response.properties().attributes().get(0).value()); + Assertions.assertEquals("ytnkqb", response.properties().regionId()); + Assertions.assertEquals(6976813642737516877L, response.properties().storage()); + Assertions.assertEquals(76421440, response.properties().pgVersion()); + Assertions.assertEquals(522943136, response.properties().historyRetention()); + Assertions.assertEquals(85.89372340228213, response.properties().defaultEndpointSettings().autoscalingLimitMinCu()); - Assertions.assertEquals(54.85246943768806, + Assertions.assertEquals(68.44178885621959, response.properties().defaultEndpointSettings().autoscalingLimitMaxCu()); - Assertions.assertEquals("xrezsvavlrxi", response.properties().branch().entityName()); - Assertions.assertEquals("wybsz", response.properties().branch().attributes().get(0).name()); - Assertions.assertEquals("ncnpat", response.properties().branch().attributes().get(0).value()); - Assertions.assertEquals("uxsphlokfpm", response.properties().branch().projectId()); - Assertions.assertEquals("pd", response.properties().branch().parentId()); - Assertions.assertEquals("vfbhwb", response.properties().branch().roleName()); - Assertions.assertEquals("ufvcgnrgl", response.properties().branch().databaseName()); - Assertions.assertEquals("ebzx", response.properties().branch().roles().get(0).entityName()); - Assertions.assertEquals("nntrvrkps", response.properties().branch().roles().get(0).attributes().get(0).name()); - Assertions.assertEquals("bduxvzmlghnys", + Assertions.assertEquals("ngkegxcypxbbfe", response.properties().branch().entityName()); + Assertions.assertEquals("r", response.properties().branch().attributes().get(0).name()); + Assertions.assertEquals("lqownkiua", response.properties().branch().attributes().get(0).value()); + Assertions.assertEquals("hdyswcrptveajc", response.properties().branch().projectId()); + Assertions.assertEquals("vlgsrgkrfiz", response.properties().branch().parentId()); + Assertions.assertEquals("ywlptyuqh", response.properties().branch().roleName()); + Assertions.assertEquals("mc", response.properties().branch().databaseName()); + Assertions.assertEquals("cpawmp", response.properties().branch().roles().get(0).entityName()); + Assertions.assertEquals("fwzlgzawkgyepeya", + response.properties().branch().roles().get(0).attributes().get(0).name()); + Assertions.assertEquals("nnidmdiawpzxk", response.properties().branch().roles().get(0).attributes().get(0).value()); - Assertions.assertEquals("kibmgjymn", response.properties().branch().roles().get(0).branchId()); - Assertions.assertEquals("agairwcqzoofjnqj", response.properties().branch().roles().get(0).permissions().get(0)); - Assertions.assertTrue(response.properties().branch().roles().get(0).isSuperUser()); - Assertions.assertEquals("krbzkuas", response.properties().branch().databases().get(0).entityName()); - Assertions.assertEquals("l", response.properties().branch().databases().get(0).attributes().get(0).name()); - Assertions.assertEquals("gltoizwxvscksgf", + Assertions.assertEquals("ntmkctdhuosgwqps", response.properties().branch().roles().get(0).branchId()); + Assertions.assertEquals("i", response.properties().branch().roles().get(0).permissions().get(0)); + Assertions.assertFalse(response.properties().branch().roles().get(0).isSuperUser()); + Assertions.assertEquals("zkdtzxsoed", response.properties().branch().databases().get(0).entityName()); + Assertions.assertEquals("snio", response.properties().branch().databases().get(0).attributes().get(0).name()); + Assertions.assertEquals("etbzdrdpuenxkgtl", response.properties().branch().databases().get(0).attributes().get(0).value()); - Assertions.assertEquals("szrtlhpdhwynct", response.properties().branch().databases().get(0).branchId()); - Assertions.assertEquals("zcnjfmbbfnvjxit", response.properties().branch().databases().get(0).ownerName()); - Assertions.assertEquals("kshloje", response.properties().branch().endpoints().get(0).entityName()); - Assertions.assertEquals("hyaaknyukibxiglh", - response.properties().branch().endpoints().get(0).attributes().get(0).name()); - Assertions.assertEquals("hzwxq", response.properties().branch().endpoints().get(0).attributes().get(0).value()); - Assertions.assertEquals("trdgscnvqeons", response.properties().branch().endpoints().get(0).projectId()); - Assertions.assertEquals("wxlwme", response.properties().branch().endpoints().get(0).branchId()); - Assertions.assertEquals(EndpointType.READ_ONLY, + Assertions.assertEquals("tfx", response.properties().branch().databases().get(0).branchId()); + Assertions.assertEquals("rqmipfjwf", response.properties().branch().databases().get(0).ownerName()); + Assertions.assertEquals("fg", response.properties().branch().endpoints().get(0).entityName()); + Assertions.assertEquals("aczmuh", response.properties().branch().endpoints().get(0).attributes().get(0).name()); + Assertions.assertEquals("cakznhokhoitwhrj", + response.properties().branch().endpoints().get(0).attributes().get(0).value()); + Assertions.assertEquals("glhzqp", response.properties().branch().endpoints().get(0).projectId()); + Assertions.assertEquals("bawkikcdg", response.properties().branch().endpoints().get(0).branchId()); + Assertions.assertEquals(EndpointType.READ_WRITE, response.properties().branch().endpoints().get(0).endpointType()); - Assertions.assertEquals("fmnoiicsudy", response.properties().roles().get(0).entityName()); - Assertions.assertEquals("usxxhdodpjwybl", response.properties().roles().get(0).attributes().get(0).name()); - Assertions.assertEquals("tbdmvsbyidae", response.properties().roles().get(0).attributes().get(0).value()); - Assertions.assertEquals("qwczsyiq", response.properties().roles().get(0).branchId()); - Assertions.assertEquals("fwihvaan", response.properties().roles().get(0).permissions().get(0)); + Assertions.assertEquals("rw", response.properties().roles().get(0).entityName()); + Assertions.assertEquals("bwlyvxc", response.properties().roles().get(0).attributes().get(0).name()); + Assertions.assertEquals("pqvctsfaeuhwwsk", response.properties().roles().get(0).attributes().get(0).value()); + Assertions.assertEquals("zqazvb", response.properties().roles().get(0).branchId()); + Assertions.assertEquals("kptgongruat", response.properties().roles().get(0).permissions().get(0)); Assertions.assertTrue(response.properties().roles().get(0).isSuperUser()); - Assertions.assertEquals("godtggrs", response.properties().databases().get(0).entityName()); - Assertions.assertEquals("tscbgmusai", response.properties().databases().get(0).attributes().get(0).name()); - Assertions.assertEquals("tdscnkzzohnrdd", response.properties().databases().get(0).attributes().get(0).value()); - Assertions.assertEquals("sormrex", response.properties().databases().get(0).branchId()); - Assertions.assertEquals("dubewgzy", response.properties().databases().get(0).ownerName()); - Assertions.assertEquals("zrtdbakr", response.properties().endpoints().get(0).entityName()); - Assertions.assertEquals("eqsifjmclngygnhr", - response.properties().endpoints().get(0).attributes().get(0).name()); - Assertions.assertEquals("ombcdtajdopggo", response.properties().endpoints().get(0).attributes().get(0).value()); - Assertions.assertEquals("jo", response.properties().endpoints().get(0).projectId()); - Assertions.assertEquals("rotpvclpof", response.properties().endpoints().get(0).branchId()); + Assertions.assertEquals("ztdivykpxkq", response.properties().databases().get(0).entityName()); + Assertions.assertEquals("toiboancdr", response.properties().databases().get(0).attributes().get(0).name()); + Assertions.assertEquals("o", response.properties().databases().get(0).attributes().get(0).value()); + Assertions.assertEquals("ndnoxaxnrqaq", response.properties().databases().get(0).branchId()); + Assertions.assertEquals("nndx", response.properties().databases().get(0).ownerName()); + Assertions.assertEquals("iceovxgzw", response.properties().endpoints().get(0).entityName()); + Assertions.assertEquals("ik", response.properties().endpoints().get(0).attributes().get(0).name()); + Assertions.assertEquals("ohzixyqhfnkvycqq", + response.properties().endpoints().get(0).attributes().get(0).value()); + Assertions.assertEquals("pnouhbqezkqx", response.properties().endpoints().get(0).projectId()); + Assertions.assertEquals("lu", response.properties().endpoints().get(0).branchId()); Assertions.assertEquals(EndpointType.READ_WRITE, response.properties().endpoints().get(0).endpointType()); } } diff --git a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/ProjectsDeleteWithResponseMockTests.java b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/ProjectsDeleteWithResponseMockTests.java index 32673606a622..e6c3e962cf5e 100644 --- a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/ProjectsDeleteWithResponseMockTests.java +++ b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/ProjectsDeleteWithResponseMockTests.java @@ -27,7 +27,7 @@ public void testDeleteWithResponse() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.projects().deleteWithResponse("vvqxua", "g", "qwulynkgfcfdru", com.azure.core.util.Context.NONE); + manager.projects().deleteWithResponse("ymc", "m", "upyvqyvliq", com.azure.core.util.Context.NONE); } } diff --git a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/ProjectsGetConnectionUriWithResponseMockTests.java b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/ProjectsGetConnectionUriWithResponseMockTests.java index b8a127de3e25..4efacd969d20 100644 --- a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/ProjectsGetConnectionUriWithResponseMockTests.java +++ b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/ProjectsGetConnectionUriWithResponseMockTests.java @@ -22,7 +22,7 @@ public final class ProjectsGetConnectionUriWithResponseMockTests { @Test public void testGetConnectionUriWithResponse() throws Exception { String responseStr - = "{\"projectId\":\"r\",\"branchId\":\"a\",\"databaseName\":\"pucdocf\",\"roleName\":\"lwgofm\",\"endpointId\":\"wrjlvzkl\",\"isPooled\":true,\"connectionStringUri\":\"ikyjtkakvlb\"}"; + = "{\"projectId\":\"pqdowkppnwyy\",\"branchId\":\"vpctfj\",\"databaseName\":\"ffffg\",\"roleName\":\"hznwhvuldbkk\",\"endpointId\":\"jkjigawgaz\",\"isPooled\":true,\"connectionStringUri\":\"ifhujjsbcm\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,21 +32,21 @@ public void testGetConnectionUriWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ConnectionUriProperties response = manager.projects() - .getConnectionUriWithResponse("amfdd", "vlkpzwb", "nrecchdidrm", - new ConnectionUriPropertiesInner().withProjectId("kahmjedbiucvkhhw") - .withBranchId("pjbweunxcq") - .withDatabaseName("ihufoihp") - .withRoleName("ybxvgn") - .withEndpointId("zpbgkzc") - .withIsPooled(false), + .getConnectionUriWithResponse("pwgoljt", "xnmxsdobygoogxqa", "j", + new ConnectionUriPropertiesInner().withProjectId("azyj") + .withBranchId("csa") + .withDatabaseName("jnosdkv") + .withRoleName("fasgm") + .withEndpointId("rnzpducdaak") + .withIsPooled(true), com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("r", response.projectId()); - Assertions.assertEquals("a", response.branchId()); - Assertions.assertEquals("pucdocf", response.databaseName()); - Assertions.assertEquals("lwgofm", response.roleName()); - Assertions.assertEquals("wrjlvzkl", response.endpointId()); + Assertions.assertEquals("pqdowkppnwyy", response.projectId()); + Assertions.assertEquals("vpctfj", response.branchId()); + Assertions.assertEquals("ffffg", response.databaseName()); + Assertions.assertEquals("hznwhvuldbkk", response.roleName()); + Assertions.assertEquals("jkjigawgaz", response.endpointId()); Assertions.assertTrue(response.isPooled()); } } diff --git a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/ProjectsGetWithResponseMockTests.java b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/ProjectsGetWithResponseMockTests.java index 98f2a1f733ea..db37509aa6d7 100644 --- a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/ProjectsGetWithResponseMockTests.java +++ b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/ProjectsGetWithResponseMockTests.java @@ -22,7 +22,7 @@ public final class ProjectsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"entityId\":\"cdgzseznux\",\"entityName\":\"uairaabmdlqjb\",\"createdAt\":\"pfixlhupmo\",\"provisioningState\":\"Failed\",\"attributes\":[{\"name\":\"dnpxpkcdpr\",\"value\":\"yxelyicghflr\"},{\"name\":\"fss\",\"value\":\"yghsf\"},{\"name\":\"rkbhammgmqfm\",\"value\":\"fgvqcpdw\"}],\"regionId\":\"quxweyslandkd\",\"storage\":119386751526092271,\"pgVersion\":1672179952,\"historyRetention\":1016575602,\"defaultEndpointSettings\":{\"autoscalingLimitMinCu\":64.32770434429936,\"autoscalingLimitMaxCu\":87.51880479756822},\"branch\":{\"entityId\":\"rnquoxso\",\"entityName\":\"reimseob\",\"createdAt\":\"xstcyilbvzm\",\"provisioningState\":\"Succeeded\",\"attributes\":[{\"name\":\"lq\",\"value\":\"zexokjxeb\"},{\"name\":\"vbzinz\",\"value\":\"bwmvogljsvl\"}],\"projectId\":\"idnwceha\",\"parentId\":\"do\",\"roleName\":\"l\",\"databaseName\":\"iomqoqpepiaea\",\"roles\":[{\"entityId\":\"rgdtpeqnacyheqw\",\"entityName\":\"qq\",\"createdAt\":\"jubkhjozfymcwmb\",\"provisioningState\":\"Canceled\",\"attributes\":[{\"name\":\"yvliq\",\"value\":\"ipsejbsvsia\"},{\"name\":\"eswhd\",\"value\":\"zydisnuep\"},{\"name\":\"wyj\",\"value\":\"nldpxottd\"},{\"name\":\"i\",\"value\":\"ocqibz\"}],\"branchId\":\"hweebiph\",\"permissions\":[\"cjwqw\",\"qsratjhd\",\"zybspijhfrzgdkk\",\"gv\"],\"isSuperUser\":true},{\"entityId\":\"susmmorfmzhwi\",\"entityName\":\"zhnijmr\",\"createdAt\":\"r\",\"provisioningState\":\"Failed\",\"attributes\":[{\"name\":\"yttlrcxiv\",\"value\":\"bkut\"},{\"name\":\"umltwjflu\",\"value\":\"ynbpvzlqywauy\"},{\"name\":\"njc\",\"value\":\"hmocgjshg\"}],\"branchId\":\"a\",\"permissions\":[\"vi\",\"qqgglj\"],\"isSuperUser\":false}],\"databases\":[{\"entityId\":\"clrvtzqnrbctbh\",\"entityName\":\"hxpcvrdnyeita\",\"createdAt\":\"qady\",\"provisioningState\":\"Succeeded\",\"attributes\":[{\"name\":\"wriuomzczfkic\",\"value\":\"evsaa\"},{\"name\":\"wspcaxikhfjqebg\",\"value\":\"cx\"}],\"branchId\":\"gzzromv\",\"ownerName\":\"ysemtmesrfsvpin\"},{\"entityId\":\"pat\",\"entityName\":\"diswxspvckojazb\",\"createdAt\":\"spftesubzpv\",\"provisioningState\":\"Canceled\",\"attributes\":[{\"name\":\"ytcovqs\",\"value\":\"usrf\"}],\"branchId\":\"d\",\"ownerName\":\"fxnxml\"},{\"entityId\":\"uoswkjmdih\",\"entityName\":\"yyyzlwhbw\",\"createdAt\":\"nufzr\",\"provisioningState\":\"Succeeded\",\"attributes\":[{\"name\":\"gnnbzrtf\",\"value\":\"edzuub\"},{\"name\":\"tvgj\",\"value\":\"xmtyj\"}],\"branchId\":\"avdpwwobtdphtits\",\"ownerName\":\"ofw\"}],\"endpoints\":[{\"entityId\":\"k\",\"entityName\":\"auwazcgwd\",\"createdAt\":\"iwgy\",\"provisioningState\":\"Failed\",\"attributes\":[{\"name\":\"ok\",\"value\":\"cvgllixdg\"},{\"name\":\"yfgwewqkj\",\"value\":\"xprwpxs\"}],\"projectId\":\"hu\",\"branchId\":\"lcsklt\",\"endpointType\":\"read_write\"}]},\"roles\":[{\"entityId\":\"gzlf\",\"entityName\":\"rdcgu\",\"createdAt\":\"rtmdylperpil\",\"provisioningState\":\"Succeeded\",\"attributes\":[{\"name\":\"czfcmfpfbod\",\"value\":\"tresr\"},{\"name\":\"vtshuvf\",\"value\":\"waivmuqkevzg\"}],\"branchId\":\"panhxmpdxxze\",\"permissions\":[\"zjwotnxlkfhglh\",\"foxqwecrsn\",\"pcs\",\"lqxov\"],\"isSuperUser\":true}],\"databases\":[{\"entityId\":\"kklvzrlrmlccmet\",\"entityName\":\"czivfqbqna\",\"createdAt\":\"sye\",\"provisioningState\":\"Canceled\",\"attributes\":[{\"name\":\"uscplhyvdg\",\"value\":\"lyzkxitds\"},{\"name\":\"ezsvkolrupjov\",\"value\":\"ozsaye\"},{\"name\":\"razwzlpzbt\",\"value\":\"uykykipfsd\"}],\"branchId\":\"pfnocm\",\"ownerName\":\"zacfpztgazw\"}],\"endpoints\":[{\"entityId\":\"gaaokctgkp\",\"entityName\":\"kqzkcyzmff\",\"createdAt\":\"dyfcix\",\"provisioningState\":\"Failed\",\"attributes\":[{\"name\":\"vhoej\",\"value\":\"oiutgwrmkahpq\"},{\"name\":\"azyntacihncogm\",\"value\":\"pnmliq\"}],\"projectId\":\"lbhik\",\"branchId\":\"qgrvg\",\"endpointType\":\"read_only\"},{\"entityId\":\"p\",\"entityName\":\"dtsdfjy\",\"createdAt\":\"socwiqbuout\",\"provisioningState\":\"Succeeded\",\"attributes\":[{\"name\":\"leofj\",\"value\":\"bgbwwz\"},{\"name\":\"dajfwnncfma\",\"value\":\"iqgjjrlhiql\"},{\"name\":\"ixvt\",\"value\":\"ougu\"}],\"projectId\":\"n\",\"branchId\":\"pg\",\"endpointType\":\"read_only\"},{\"entityId\":\"asualapdlndbea\",\"entityName\":\"kixvvlwy\",\"createdAt\":\"bb\",\"provisioningState\":\"Canceled\",\"attributes\":[{\"name\":\"jmspugzfeuzjlj\",\"value\":\"phfky\"},{\"name\":\"zolgjzmicuydocc\",\"value\":\"xshanzb\"}],\"projectId\":\"adh\",\"branchId\":\"tecaa\",\"endpointType\":\"read_write\"}]},\"id\":\"hzniucbda\",\"name\":\"mbwiinjdllwktl\",\"type\":\"pow\"}"; + = "{\"properties\":{\"entityId\":\"l\",\"entityName\":\"lctzeyowmndcovd\",\"createdAt\":\"qauxzan\",\"provisioningState\":\"Canceled\",\"attributes\":[{\"name\":\"ruw\",\"value\":\"udrbcpftxudqyem\"},{\"name\":\"bunaucmcirtn\",\"value\":\"emmjauwcg\"}],\"regionId\":\"fnohaitran\",\"storage\":7588587614389235236,\"pgVersion\":1040664060,\"historyRetention\":1553463796,\"defaultEndpointSettings\":{\"autoscalingLimitMinCu\":42.55249926263288,\"autoscalingLimitMaxCu\":27.41029291177378},\"branch\":{\"entityId\":\"fbngfcocef\",\"entityName\":\"riylfmpztra\",\"createdAt\":\"svhl\",\"provisioningState\":\"Failed\",\"attributes\":[{\"name\":\"regp\",\"value\":\"tmojhvrztnvgyshq\"},{\"name\":\"dgrtwmew\",\"value\":\"zlpykcfazzwjcay\"}],\"projectId\":\"zrransyb\",\"parentId\":\"polwzrghsrlei\",\"roleName\":\"fscjfn\",\"databaseName\":\"wvuagfqwtl\",\"roles\":[{\"entityId\":\"m\",\"entityName\":\"uptrklz\",\"createdAt\":\"jajwolxfsvag\",\"provisioningState\":\"Canceled\",\"attributes\":[{\"name\":\"wl\",\"value\":\"lr\"},{\"name\":\"igt\",\"value\":\"jcvbxqlapsns\"},{\"name\":\"ovyxpavidnie\",\"value\":\"wffcvvye\"},{\"name\":\"slpuxgcbdsva\",\"value\":\"pnptw\"}],\"branchId\":\"kx\",\"permissions\":[\"zwugxyqvnjobfel\"],\"isSuperUser\":true},{\"entityId\":\"uhzzgqlmfaew\",\"entityName\":\"iudjp\",\"createdAt\":\"qhttqhnmhkre\",\"provisioningState\":\"Failed\",\"attributes\":[{\"name\":\"xheq\",\"value\":\"gcruxspinym\"}],\"branchId\":\"gwokmikpazfbmjxu\",\"permissions\":[\"pfdvhaxdv\",\"zaehpphthd\",\"lmv\",\"tatlakfqoi\"],\"isSuperUser\":true},{\"entityId\":\"ksbbvtooxrp\",\"entityName\":\"wp\",\"createdAt\":\"hgjtnhtukfaci\",\"provisioningState\":\"Canceled\",\"attributes\":[{\"name\":\"tumeezbxvqxb\",\"value\":\"uvwc\"},{\"name\":\"asgom\",\"value\":\"mjzwx\"},{\"name\":\"qgo\",\"value\":\"sxpwwztjfmkkh\"}],\"branchId\":\"fred\",\"permissions\":[\"cgrllc\",\"na\",\"vjowazhpabac\"],\"isSuperUser\":false},{\"entityId\":\"otgkwsxnsrqorcg\",\"entityName\":\"mv\",\"createdAt\":\"bxeetqujxcxxqn\",\"provisioningState\":\"Canceled\",\"attributes\":[{\"name\":\"e\",\"value\":\"wqurc\"},{\"name\":\"ojmrvvxwjongzse\",\"value\":\"qqrsil\"},{\"name\":\"chskxxka\",\"value\":\"sbvr\"},{\"name\":\"aqgvto\",\"value\":\"rulfuct\"}],\"branchId\":\"rthcfjzh\",\"permissions\":[\"ubqjro\",\"tvrjeqmtz\"],\"isSuperUser\":true}],\"databases\":[{\"entityId\":\"trx\",\"entityName\":\"xrd\",\"createdAt\":\"bsrwrsnrhpqat\",\"provisioningState\":\"Succeeded\",\"attributes\":[{\"name\":\"yanxkvvcs\",\"value\":\"msvuvdjkqxetq\"},{\"name\":\"mlivrjjxnwx\",\"value\":\"chp\"},{\"name\":\"jxlehzlx\",\"value\":\"gfquwz\"},{\"name\":\"w\",\"value\":\"ibelwcerwkw\"}],\"branchId\":\"jxljtxbusq\",\"ownerName\":\"xxniuisdzhgbd\"},{\"entityId\":\"pagsecnad\",\"entityName\":\"wqrgxfllmqi\",\"createdAt\":\"ezoell\",\"provisioningState\":\"Failed\",\"attributes\":[{\"name\":\"w\",\"value\":\"mtum\"},{\"name\":\"pymdjfuax\",\"value\":\"oqvqpilr\"},{\"name\":\"uncanlduwzorx\",\"value\":\"bm\"},{\"name\":\"aqklxy\",\"value\":\"x\"}],\"branchId\":\"vfqepd\",\"ownerName\":\"ltuubw\"},{\"entityId\":\"pjbowcpj\",\"entityName\":\"uqgixex\",\"createdAt\":\"dfbwljav\",\"provisioningState\":\"Succeeded\",\"attributes\":[{\"name\":\"jddvrgliegftc\",\"value\":\"biiftksdwgdnk\"}],\"branchId\":\"gmwdh\",\"ownerName\":\"buvczldbglzoutb\"},{\"entityId\":\"qgz\",\"entityName\":\"ajclyzgsnorbjg\",\"createdAt\":\"zjotvmrxkhlo\",\"provisioningState\":\"Failed\",\"attributes\":[{\"name\":\"hvhd\",\"value\":\"qayfl\"},{\"name\":\"iyu\",\"value\":\"snuudtelvhyibdr\"},{\"name\":\"rswhbuubpyro\",\"value\":\"tjoxztfw\"}],\"branchId\":\"chvczev\",\"ownerName\":\"nctagfyvrtpqpem\"}],\"endpoints\":[{\"entityId\":\"krepdqhqyhwqwem\",\"entityName\":\"qabckmzeoxin\",\"createdAt\":\"re\",\"provisioningState\":\"Canceled\",\"attributes\":[{\"name\":\"lpuzjpcee\",\"value\":\"nzangprbfaxy\"}],\"projectId\":\"lbciphmsexro\",\"branchId\":\"ndktxfv\",\"endpointType\":\"read_write\"},{\"entityId\":\"eqg\",\"entityName\":\"rietbg\",\"createdAt\":\"xx\",\"provisioningState\":\"Canceled\",\"attributes\":[{\"name\":\"yfwnw\",\"value\":\"iwxeiicrmpep\"},{\"name\":\"ldmaxxijvskwsdgk\",\"value\":\"gyacwrasekwef\"},{\"name\":\"voinwo\",\"value\":\"artwyxqic\"},{\"name\":\"advatdavuqmcb\",\"value\":\"msfobjlquvj\"}],\"projectId\":\"cjumv\",\"branchId\":\"imioyo\",\"endpointType\":\"read_only\"},{\"entityId\":\"miqwnnrac\",\"entityName\":\"bbfqpspklady\",\"createdAt\":\"nhautwukexzgpmnm\",\"provisioningState\":\"Succeeded\",\"attributes\":[{\"name\":\"qilwgdfpfqfpcvs\",\"value\":\"clg\"},{\"name\":\"rvwerfwxbsmtb\",\"value\":\"jj\"},{\"name\":\"h\",\"value\":\"ci\"}],\"projectId\":\"wdv\",\"branchId\":\"brekqhsqhtf\",\"endpointType\":\"read_only\"}]},\"roles\":[{\"entityId\":\"ejuwyqwdqigmghgi\",\"entityName\":\"txlujkhnjcmr\",\"createdAt\":\"fmkhcqtwmlmhjnqt\",\"provisioningState\":\"Failed\",\"attributes\":[{\"name\":\"e\",\"value\":\"vragpokddx\"}],\"branchId\":\"hhkvguavtptbk\",\"permissions\":[\"qynspgbvoffb\",\"kwvdxa\",\"xqokmyrlji\"],\"isSuperUser\":false},{\"entityId\":\"nobrqlpb\",\"entityName\":\"trpzuyudivbxnh\",\"createdAt\":\"eaeonqelwgdh\",\"provisioningState\":\"Canceled\",\"attributes\":[{\"name\":\"tzarogatmoljiy\",\"value\":\"mpinmzvfkneerzzt\"}],\"branchId\":\"nsjulugdybnh\",\"permissions\":[\"elf\",\"hkeizcp\",\"htdm\",\"wjekptycaydbj\"],\"isSuperUser\":false},{\"entityId\":\"mlcfnzhmhsurl\",\"entityName\":\"qkpmmzpstau\",\"createdAt\":\"awi\",\"provisioningState\":\"Canceled\",\"attributes\":[{\"name\":\"sgvvjhvvlrl\",\"value\":\"hewjjmajnkdflqio\"},{\"name\":\"swaeqkzfz\",\"value\":\"xjoshohtotryegpk\"},{\"name\":\"xrmexznlw\",\"value\":\"bfokxkhu\"},{\"name\":\"ze\",\"value\":\"ufgjblcdr\"}],\"branchId\":\"fcemftzgyyky\",\"permissions\":[\"gekdfqnht\",\"wdowrczfjjn\"],\"isSuperUser\":false},{\"entityId\":\"rkkmhmn\",\"entityName\":\"wempdcifrhju\",\"createdAt\":\"sulwzpflusn\",\"provisioningState\":\"Failed\",\"attributes\":[{\"name\":\"gzotfriyrgkoekvz\",\"value\":\"xxyxhighctxbxm\"}],\"branchId\":\"pcqydeykvsk\",\"permissions\":[\"dfrjeizik\",\"qaboohxbms\",\"ycqsxr\"],\"isSuperUser\":true}],\"databases\":[{\"entityId\":\"yqaeohpjhgejk\",\"entityName\":\"hhdau\",\"createdAt\":\"hoo\",\"provisioningState\":\"Failed\",\"attributes\":[{\"name\":\"k\",\"value\":\"xjxjoe\"},{\"name\":\"lqxr\",\"value\":\"dknkobe\"}],\"branchId\":\"mbozom\",\"ownerName\":\"amicbigwcdgz\"},{\"entityId\":\"znuxkeuairaabmdl\",\"entityName\":\"bedpfixlhupmomih\",\"createdAt\":\"dnpxpkcdpr\",\"provisioningState\":\"Succeeded\",\"attributes\":[{\"name\":\"yi\",\"value\":\"ghflrufssjyghsf\"},{\"name\":\"rkbhammgmqfm\",\"value\":\"fgvqcpdw\"},{\"name\":\"gquxweysland\",\"value\":\"dcdjhunh\"}],\"branchId\":\"cgawnrrnquo\",\"ownerName\":\"otire\"}],\"endpoints\":[{\"entityId\":\"obfsxstc\",\"entityName\":\"lbvzm\",\"createdAt\":\"cjzlquzexokjxebj\",\"provisioningState\":\"Succeeded\",\"attributes\":[{\"name\":\"zabwmvog\",\"value\":\"jsvlpg\"}],\"projectId\":\"nwcehaqidoyzl\",\"branchId\":\"iomqoqpepiaea\",\"endpointType\":\"read_only\"}]},\"id\":\"rgdtpeqnacyheqw\",\"name\":\"pqqncju\",\"type\":\"khjoz\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,63 +32,64 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); Project response - = manager.projects().getWithResponse("ektm", "o", "omtzamicb", com.azure.core.util.Context.NONE).getValue(); + = manager.projects().getWithResponse("q", "fut", "dpvozglqj", com.azure.core.util.Context.NONE).getValue(); - Assertions.assertEquals("uairaabmdlqjb", response.properties().entityName()); - Assertions.assertEquals("dnpxpkcdpr", response.properties().attributes().get(0).name()); - Assertions.assertEquals("yxelyicghflr", response.properties().attributes().get(0).value()); - Assertions.assertEquals("quxweyslandkd", response.properties().regionId()); - Assertions.assertEquals(119386751526092271L, response.properties().storage()); - Assertions.assertEquals(1672179952, response.properties().pgVersion()); - Assertions.assertEquals(1016575602, response.properties().historyRetention()); - Assertions.assertEquals(64.32770434429936, + Assertions.assertEquals("lctzeyowmndcovd", response.properties().entityName()); + Assertions.assertEquals("ruw", response.properties().attributes().get(0).name()); + Assertions.assertEquals("udrbcpftxudqyem", response.properties().attributes().get(0).value()); + Assertions.assertEquals("fnohaitran", response.properties().regionId()); + Assertions.assertEquals(7588587614389235236L, response.properties().storage()); + Assertions.assertEquals(1040664060, response.properties().pgVersion()); + Assertions.assertEquals(1553463796, response.properties().historyRetention()); + Assertions.assertEquals(42.55249926263288, response.properties().defaultEndpointSettings().autoscalingLimitMinCu()); - Assertions.assertEquals(87.51880479756822, + Assertions.assertEquals(27.41029291177378, response.properties().defaultEndpointSettings().autoscalingLimitMaxCu()); - Assertions.assertEquals("reimseob", response.properties().branch().entityName()); - Assertions.assertEquals("lq", response.properties().branch().attributes().get(0).name()); - Assertions.assertEquals("zexokjxeb", response.properties().branch().attributes().get(0).value()); - Assertions.assertEquals("idnwceha", response.properties().branch().projectId()); - Assertions.assertEquals("do", response.properties().branch().parentId()); - Assertions.assertEquals("l", response.properties().branch().roleName()); - Assertions.assertEquals("iomqoqpepiaea", response.properties().branch().databaseName()); - Assertions.assertEquals("qq", response.properties().branch().roles().get(0).entityName()); - Assertions.assertEquals("yvliq", response.properties().branch().roles().get(0).attributes().get(0).name()); - Assertions.assertEquals("ipsejbsvsia", - response.properties().branch().roles().get(0).attributes().get(0).value()); - Assertions.assertEquals("hweebiph", response.properties().branch().roles().get(0).branchId()); - Assertions.assertEquals("cjwqw", response.properties().branch().roles().get(0).permissions().get(0)); + Assertions.assertEquals("riylfmpztra", response.properties().branch().entityName()); + Assertions.assertEquals("regp", response.properties().branch().attributes().get(0).name()); + Assertions.assertEquals("tmojhvrztnvgyshq", response.properties().branch().attributes().get(0).value()); + Assertions.assertEquals("zrransyb", response.properties().branch().projectId()); + Assertions.assertEquals("polwzrghsrlei", response.properties().branch().parentId()); + Assertions.assertEquals("fscjfn", response.properties().branch().roleName()); + Assertions.assertEquals("wvuagfqwtl", response.properties().branch().databaseName()); + Assertions.assertEquals("uptrklz", response.properties().branch().roles().get(0).entityName()); + Assertions.assertEquals("wl", response.properties().branch().roles().get(0).attributes().get(0).name()); + Assertions.assertEquals("lr", response.properties().branch().roles().get(0).attributes().get(0).value()); + Assertions.assertEquals("kx", response.properties().branch().roles().get(0).branchId()); + Assertions.assertEquals("zwugxyqvnjobfel", response.properties().branch().roles().get(0).permissions().get(0)); Assertions.assertTrue(response.properties().branch().roles().get(0).isSuperUser()); - Assertions.assertEquals("hxpcvrdnyeita", response.properties().branch().databases().get(0).entityName()); - Assertions.assertEquals("wriuomzczfkic", + Assertions.assertEquals("xrd", response.properties().branch().databases().get(0).entityName()); + Assertions.assertEquals("yanxkvvcs", response.properties().branch().databases().get(0).attributes().get(0).name()); - Assertions.assertEquals("evsaa", response.properties().branch().databases().get(0).attributes().get(0).value()); - Assertions.assertEquals("gzzromv", response.properties().branch().databases().get(0).branchId()); - Assertions.assertEquals("ysemtmesrfsvpin", response.properties().branch().databases().get(0).ownerName()); - Assertions.assertEquals("auwazcgwd", response.properties().branch().endpoints().get(0).entityName()); - Assertions.assertEquals("ok", response.properties().branch().endpoints().get(0).attributes().get(0).name()); - Assertions.assertEquals("cvgllixdg", + Assertions.assertEquals("msvuvdjkqxetq", + response.properties().branch().databases().get(0).attributes().get(0).value()); + Assertions.assertEquals("jxljtxbusq", response.properties().branch().databases().get(0).branchId()); + Assertions.assertEquals("xxniuisdzhgbd", response.properties().branch().databases().get(0).ownerName()); + Assertions.assertEquals("qabckmzeoxin", response.properties().branch().endpoints().get(0).entityName()); + Assertions.assertEquals("lpuzjpcee", + response.properties().branch().endpoints().get(0).attributes().get(0).name()); + Assertions.assertEquals("nzangprbfaxy", response.properties().branch().endpoints().get(0).attributes().get(0).value()); - Assertions.assertEquals("hu", response.properties().branch().endpoints().get(0).projectId()); - Assertions.assertEquals("lcsklt", response.properties().branch().endpoints().get(0).branchId()); + Assertions.assertEquals("lbciphmsexro", response.properties().branch().endpoints().get(0).projectId()); + Assertions.assertEquals("ndktxfv", response.properties().branch().endpoints().get(0).branchId()); Assertions.assertEquals(EndpointType.READ_WRITE, response.properties().branch().endpoints().get(0).endpointType()); - Assertions.assertEquals("rdcgu", response.properties().roles().get(0).entityName()); - Assertions.assertEquals("czfcmfpfbod", response.properties().roles().get(0).attributes().get(0).name()); - Assertions.assertEquals("tresr", response.properties().roles().get(0).attributes().get(0).value()); - Assertions.assertEquals("panhxmpdxxze", response.properties().roles().get(0).branchId()); - Assertions.assertEquals("zjwotnxlkfhglh", response.properties().roles().get(0).permissions().get(0)); - Assertions.assertTrue(response.properties().roles().get(0).isSuperUser()); - Assertions.assertEquals("czivfqbqna", response.properties().databases().get(0).entityName()); - Assertions.assertEquals("uscplhyvdg", response.properties().databases().get(0).attributes().get(0).name()); - Assertions.assertEquals("lyzkxitds", response.properties().databases().get(0).attributes().get(0).value()); - Assertions.assertEquals("pfnocm", response.properties().databases().get(0).branchId()); - Assertions.assertEquals("zacfpztgazw", response.properties().databases().get(0).ownerName()); - Assertions.assertEquals("kqzkcyzmff", response.properties().endpoints().get(0).entityName()); - Assertions.assertEquals("vhoej", response.properties().endpoints().get(0).attributes().get(0).name()); - Assertions.assertEquals("oiutgwrmkahpq", response.properties().endpoints().get(0).attributes().get(0).value()); - Assertions.assertEquals("lbhik", response.properties().endpoints().get(0).projectId()); - Assertions.assertEquals("qgrvg", response.properties().endpoints().get(0).branchId()); + Assertions.assertEquals("txlujkhnjcmr", response.properties().roles().get(0).entityName()); + Assertions.assertEquals("e", response.properties().roles().get(0).attributes().get(0).name()); + Assertions.assertEquals("vragpokddx", response.properties().roles().get(0).attributes().get(0).value()); + Assertions.assertEquals("hhkvguavtptbk", response.properties().roles().get(0).branchId()); + Assertions.assertEquals("qynspgbvoffb", response.properties().roles().get(0).permissions().get(0)); + Assertions.assertFalse(response.properties().roles().get(0).isSuperUser()); + Assertions.assertEquals("hhdau", response.properties().databases().get(0).entityName()); + Assertions.assertEquals("k", response.properties().databases().get(0).attributes().get(0).name()); + Assertions.assertEquals("xjxjoe", response.properties().databases().get(0).attributes().get(0).value()); + Assertions.assertEquals("mbozom", response.properties().databases().get(0).branchId()); + Assertions.assertEquals("amicbigwcdgz", response.properties().databases().get(0).ownerName()); + Assertions.assertEquals("lbvzm", response.properties().endpoints().get(0).entityName()); + Assertions.assertEquals("zabwmvog", response.properties().endpoints().get(0).attributes().get(0).name()); + Assertions.assertEquals("jsvlpg", response.properties().endpoints().get(0).attributes().get(0).value()); + Assertions.assertEquals("nwcehaqidoyzl", response.properties().endpoints().get(0).projectId()); + Assertions.assertEquals("iomqoqpepiaea", response.properties().endpoints().get(0).branchId()); Assertions.assertEquals(EndpointType.READ_ONLY, response.properties().endpoints().get(0).endpointType()); } } diff --git a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/ProjectsListMockTests.java b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/ProjectsListMockTests.java index dca3c0382de1..e516b50c6eed 100644 --- a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/ProjectsListMockTests.java +++ b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/src/test/java/com/azure/resourcemanager/neonpostgres/generated/ProjectsListMockTests.java @@ -23,7 +23,7 @@ public final class ProjectsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"entityId\":\"okvjgbzsxebrslt\",\"entityName\":\"yhcdjwsuoardnag\",\"createdAt\":\"pufpbpgnrholhu\",\"provisioningState\":\"Failed\",\"attributes\":[{\"name\":\"iplkysolsyjprxs\",\"value\":\"whdmcvhtbbz\"},{\"name\":\"hfvhuwzbxpcqz\",\"value\":\"ihotjecohmxv\"},{\"name\":\"lrrskap\",\"value\":\"xwieexuyade\"}],\"regionId\":\"tfo\",\"storage\":47887958579734245,\"pgVersion\":935611244,\"historyRetention\":424856717,\"defaultEndpointSettings\":{\"autoscalingLimitMinCu\":98.68591392968551,\"autoscalingLimitMaxCu\":2.367622336840902},\"branch\":{\"entityId\":\"xzznnui\",\"entityName\":\"rsejegprkj\",\"createdAt\":\"wrjmwv\",\"provisioningState\":\"Succeeded\",\"attributes\":[{\"name\":\"kxxi\",\"value\":\"wgxql\"},{\"name\":\"ekotjgxi\",\"value\":\"qfkyfhiwvjaqu\"},{\"name\":\"by\",\"value\":\"nvskpaj\"}],\"projectId\":\"geumexm\",\"parentId\":\"xcbccwkqmt\",\"roleName\":\"p\",\"databaseName\":\"iscr\",\"roles\":[{\"entityId\":\"ftr\",\"entityName\":\"ejdaahuqimld\",\"createdAt\":\"lfxlmuifmuadj\",\"provisioningState\":\"Canceled\",\"attributes\":[{\"name\":\"skiioshjgczetybn\",\"value\":\"gztlcgc\"},{\"name\":\"j\",\"value\":\"hfjv\"},{\"name\":\"ywjzebecuvlbefvw\",\"value\":\"ljkxpylrwoxz\"}],\"branchId\":\"psyxjije\",\"permissions\":[\"vrbkerdkdkgaw\",\"wjxildfkcefeyg\"],\"isSuperUser\":false},{\"entityId\":\"oisfmnaybdjn\",\"entityName\":\"mentqo\",\"createdAt\":\"why\",\"provisioningState\":\"Failed\",\"attributes\":[{\"name\":\"lwivqt\",\"value\":\"wlhlsycoybajasq\"},{\"name\":\"bfajcywhjqwmchq\",\"value\":\"htfxcpupuki\"},{\"name\":\"mjzpwdlvwtiwsm\",\"value\":\"sa\"},{\"name\":\"nhqnampp\",\"value\":\"ltassaekewna\"}],\"branchId\":\"ajbk\",\"permissions\":[\"cyizy\",\"dcvxodkrvfsxxby\",\"e\"],\"isSuperUser\":true},{\"entityId\":\"gecpwgoljtzx\",\"entityName\":\"xsdobygoogxqapjx\",\"createdAt\":\"zyjfuc\",\"provisioningState\":\"Succeeded\",\"attributes\":[{\"name\":\"nosdkvi\",\"value\":\"fasgm\"},{\"name\":\"trnzpducdaaktu\",\"value\":\"ktz\"}],\"branchId\":\"imyfpqdo\",\"permissions\":[\"pnw\",\"ytfvpctfji\",\"ffffg\",\"uhznwhvuldbk\"],\"isSuperUser\":false}],\"databases\":[{\"entityId\":\"igaw\",\"entityName\":\"zmxjqif\",\"createdAt\":\"jjsbcmlzaahzbhur\",\"provisioningState\":\"Canceled\",\"attributes\":[{\"name\":\"lirh\",\"value\":\"mojusuz\"},{\"name\":\"fjzc\",\"value\":\"aaxoialahfxwcc\"},{\"name\":\"kdxkuk\",\"value\":\"kczynuhhoqeqsh\"},{\"name\":\"vl\",\"value\":\"q\"}],\"branchId\":\"yrqolnthbbnkgz\",\"ownerName\":\"wdrnzkj\"}],\"endpoints\":[{\"entityId\":\"eyjncjmlfuy\",\"entityName\":\"bpfiddhlrufz\",\"createdAt\":\"yjmqrf\",\"provisioningState\":\"Succeeded\",\"attributes\":[{\"name\":\"selqkrsazrhxud\",\"value\":\"qmdtffi\"},{\"name\":\"jmr\",\"value\":\"khmwdmd\"}],\"projectId\":\"yqixokwtjawhv\",\"branchId\":\"nqf\",\"endpointType\":\"read_only\"},{\"entityId\":\"cvmyolcaymjchtv\",\"entityName\":\"vlaqdnzyzawa\",\"createdAt\":\"wqkokbczothymg\",\"provisioningState\":\"Failed\",\"attributes\":[{\"name\":\"snwgwimaa\",\"value\":\"eakhtmhobcya\"}],\"projectId\":\"fvqtvkhgvoo\",\"branchId\":\"kfnaoaqymhc\",\"endpointType\":\"read_write\"}]},\"roles\":[{\"entityId\":\"wyrnskbyh\",\"entityName\":\"hczygxvhajpxe\",\"createdAt\":\"qnwhscozawmvg\",\"provisioningState\":\"Succeeded\",\"attributes\":[{\"name\":\"npwirfljf\",\"value\":\"wxqouoxudnmc\"},{\"name\":\"aprhknqiijgencdg\",\"value\":\"oqueqihkkyowltj\"},{\"name\":\"uwhldxwhieproqks\",\"value\":\"fxmcvprstvk\"}],\"branchId\":\"b\",\"permissions\":[\"dyotnplfacqoccq\",\"qxwetjtd\",\"hutfdoadtxopge\"],\"isSuperUser\":false},{\"entityId\":\"k\",\"entityName\":\"zgssz\",\"createdAt\":\"ctkbbxuha\",\"provisioningState\":\"Failed\",\"attributes\":[{\"name\":\"ncclabvoyngsuxxc\",\"value\":\"bmyqjog\"},{\"name\":\"dsaidjanormovdxx\",\"value\":\"rntu\"}],\"branchId\":\"oilunwemhdee\",\"permissions\":[\"lkyozdsfzj\",\"egrhrh\"],\"isSuperUser\":false},{\"entityId\":\"jtv\",\"entityName\":\"nxvgjb\",\"createdAt\":\"obpnjodf\",\"provisioningState\":\"Succeeded\",\"attributes\":[{\"name\":\"wmtqsmoxsaz\",\"value\":\"xej\"}],\"branchId\":\"ecywn\",\"permissions\":[\"zzaczsinqbdn\",\"dbbo\"],\"isSuperUser\":false},{\"entityId\":\"rmkjmyitrchwudlx\",\"entityName\":\"ihtpmnoejhql\",\"createdAt\":\"sibz\",\"provisioningState\":\"Succeeded\",\"attributes\":[{\"name\":\"xkyd\",\"value\":\"mypgfqvmty\"},{\"name\":\"hl\",\"value\":\"kxp\"}],\"branchId\":\"pewpyj\",\"permissions\":[\"ampqcrzgeuq\",\"b\"],\"isSuperUser\":false}],\"databases\":[{\"entityId\":\"aujegqdtadra\",\"entityName\":\"ddhjkr\",\"createdAt\":\"izyh\",\"provisioningState\":\"Canceled\",\"attributes\":[{\"name\":\"qsktxqf\",\"value\":\"jbqggweeiwdhdm\"},{\"name\":\"cgbfzuscstun\",\"value\":\"lhxd\"}],\"branchId\":\"klciichgjsysm\",\"ownerName\":\"o\"}],\"endpoints\":[{\"entityId\":\"f\",\"entityName\":\"sifcuvbdujgc\",\"createdAt\":\"vecb\",\"provisioningState\":\"Canceled\",\"attributes\":[{\"name\":\"dxrizagb\",\"value\":\"giarksykpgdqxw\"},{\"name\":\"b\",\"value\":\"rwiqrxhacl\"},{\"name\":\"dosqkptjqg\",\"value\":\"ifmmainwh\"},{\"name\":\"d\",\"value\":\"kp\"}],\"projectId\":\"wuntobuiz\",\"branchId\":\"zelwgvydjufbnkl\",\"endpointType\":\"read_only\"},{\"entityId\":\"peg\",\"entityName\":\"dabalfdxaglzfytl\",\"createdAt\":\"lqhopxouvmrs\",\"provisioningState\":\"Succeeded\",\"attributes\":[{\"name\":\"y\",\"value\":\"pzkgxfxfmyrqsd\"},{\"name\":\"pokszanmhwgpt\",\"value\":\"rdiuwkirksk\"},{\"name\":\"ztsdetjygow\",\"value\":\"fcqpol\"},{\"name\":\"kg\",\"value\":\"sdgzyy\"}],\"projectId\":\"oxlvocptvdxxheig\",\"branchId\":\"ilwzghj\",\"endpointType\":\"read_write\"},{\"entityId\":\"abzzbwaybfmdafb\",\"entityName\":\"mqtnap\",\"createdAt\":\"ojxrjnbsconxavi\",\"provisioningState\":\"Canceled\",\"attributes\":[{\"name\":\"hbjizqfsgnwdx\",\"value\":\"edpqlrfbo\"}],\"projectId\":\"ipmlnfyzavf\",\"branchId\":\"ypi\",\"endpointType\":\"read_write\"},{\"entityId\":\"pdjtaqh\",\"entityName\":\"q\",\"createdAt\":\"pdgonjhxs\",\"provisioningState\":\"Canceled\",\"attributes\":[{\"name\":\"pczqulptkbvcp\",\"value\":\"tzhigqqbtim\"},{\"name\":\"kjblornsihqh\",\"value\":\"dsmusuaawjakxwj\"},{\"name\":\"fczmnn\",\"value\":\"ixyxvqbanosjt\"}],\"projectId\":\"rnbg\",\"branchId\":\"m\",\"endpointType\":\"read_write\"}]},\"id\":\"gm\",\"name\":\"nltwmpftmfoeajog\",\"type\":\"yxwe\"}]}"; + = "{\"value\":[{\"properties\":{\"entityId\":\"disnuepywyjln\",\"entityName\":\"pxottd\",\"createdAt\":\"aocqibzjih\",\"provisioningState\":\"Succeeded\",\"attributes\":[{\"name\":\"ph\",\"value\":\"yv\"},{\"name\":\"jw\",\"value\":\"w\"},{\"name\":\"qsratjhd\",\"value\":\"zybspijhfrzgdkk\"}],\"regionId\":\"v\",\"storage\":1532180759590076345,\"pgVersion\":1402758121,\"historyRetention\":313271072,\"defaultEndpointSettings\":{\"autoscalingLimitMinCu\":67.08368890829829,\"autoscalingLimitMaxCu\":17.210906246412183},\"branch\":{\"entityId\":\"wilzzhnijmriprlk\",\"entityName\":\"eyttlrcxiv\",\"createdAt\":\"kutpu\",\"provisioningState\":\"Succeeded\",\"attributes\":[{\"name\":\"fluxynbpvz\",\"value\":\"qywauyqnjc\"}],\"projectId\":\"mocgjshg\",\"parentId\":\"a\",\"roleName\":\"wvixq\",\"databaseName\":\"gljkybsj\",\"roles\":[{\"entityId\":\"vtzqnrbctbhp\",\"entityName\":\"xpc\",\"createdAt\":\"dnyeita\",\"provisioningState\":\"Succeeded\",\"attributes\":[{\"name\":\"y\",\"value\":\"zjahwriuomz\"},{\"name\":\"zfkiceevsaaxwsp\",\"value\":\"axikhfjqebglcxk\"},{\"name\":\"gzzromv\",\"value\":\"g\"}],\"branchId\":\"emtm\",\"permissions\":[\"fsvpink\"],\"isSuperUser\":true},{\"entityId\":\"qtdiswxspvckoj\",\"entityName\":\"bbg\",\"createdAt\":\"ft\",\"provisioningState\":\"Succeeded\",\"attributes\":[{\"name\":\"pvpvd\",\"value\":\"lyt\"},{\"name\":\"ovqseusrfjbdx\",\"value\":\"fxnxml\"},{\"name\":\"muoswkjmdih\",\"value\":\"cy\"}],\"branchId\":\"zlwhbwzjnufzrfgm\",\"permissions\":[\"nn\",\"zrtftedzuubjt\"],\"isSuperUser\":true}],\"databases\":[{\"entityId\":\"tyjjvavdpwwobt\",\"entityName\":\"htitsffofwan\",\"createdAt\":\"k\",\"provisioningState\":\"Canceled\",\"attributes\":[{\"name\":\"azcg\",\"value\":\"dfriwgybj\"}],\"branchId\":\"zokscvg\",\"ownerName\":\"ixdgbyfgwewqkj\"},{\"entityId\":\"prwpxsoohu\",\"entityName\":\"lcsklt\",\"createdAt\":\"uugggzlfbgrd\",\"provisioningState\":\"Succeeded\",\"attributes\":[{\"name\":\"rtmdylperpil\",\"value\":\"tjzgczfcm\"},{\"name\":\"pfb\",\"value\":\"detres\"},{\"name\":\"gvtshu\",\"value\":\"ft\"},{\"name\":\"ai\",\"value\":\"muqkevzgjypanhx\"}],\"branchId\":\"dxxzetwwzjwotn\",\"ownerName\":\"kf\"}],\"endpoints\":[{\"entityId\":\"rfo\",\"entityName\":\"wecr\",\"createdAt\":\"hpcselqxovp\",\"provisioningState\":\"Succeeded\",\"attributes\":[{\"name\":\"kklvzrlrmlccmet\",\"value\":\"scz\"},{\"name\":\"vfqbqna\",\"value\":\"dsyenzsieuscpl\"},{\"name\":\"yvdgxlyzk\",\"value\":\"itdshezsvkolru\"}],\"projectId\":\"ovmozsayebraz\",\"branchId\":\"lpzbtzuykykipf\",\"endpointType\":\"read_only\"},{\"entityId\":\"pfnocm\",\"entityName\":\"zacfpztgazw\",\"createdAt\":\"ejgaaokct\",\"provisioningState\":\"Failed\",\"attributes\":[{\"name\":\"kqzkcyzmff\",\"value\":\"gdyfcixrhlcqvhoe\"},{\"name\":\"goiutgw\",\"value\":\"mkahpqha\"},{\"name\":\"yntacihnco\",\"value\":\"mip\"},{\"name\":\"mliqmvlb\",\"value\":\"i\"}],\"projectId\":\"aqgrv\",\"branchId\":\"omxp\",\"endpointType\":\"read_only\"}]},\"roles\":[{\"entityId\":\"fjyi\",\"entityName\":\"ocwiqbuoutmpyzgl\",\"createdAt\":\"f\",\"provisioningState\":\"Failed\",\"attributes\":[{\"name\":\"wwzvdaj\",\"value\":\"wnncfmaciqg\"},{\"name\":\"jrlhiqlwixvtboug\",\"value\":\"xtndopgjttbasua\"},{\"name\":\"ap\",\"value\":\"lndbeaqbkixv\"}],\"branchId\":\"wy\",\"permissions\":[\"bfqvzfjmspu\"],\"isSuperUser\":true},{\"entityId\":\"uzjljm\",\"entityName\":\"fkyezolgjzm\",\"createdAt\":\"uydoccnx\",\"provisioningState\":\"Canceled\",\"attributes\":[{\"name\":\"bui\",\"value\":\"dh\"},{\"name\":\"atecaa\",\"value\":\"sdohz\"},{\"name\":\"iucbda\",\"value\":\"mbwiinjdllwktl\"},{\"name\":\"pow\",\"value\":\"vvqxua\"}],\"branchId\":\"cqwulynkgfcfd\",\"permissions\":[\"si\",\"xxtclhuulri\",\"byokvjgbzsxe\",\"rsltt\"],\"isSuperUser\":true},{\"entityId\":\"djws\",\"entityName\":\"ardnagttpufpbpgn\",\"createdAt\":\"olhujbfwxiplkyso\",\"provisioningState\":\"Canceled\",\"attributes\":[{\"name\":\"rxslwhdmcv\",\"value\":\"tbbzj\"}],\"branchId\":\"vhuw\",\"permissions\":[\"pcqzg\"],\"isSuperUser\":true}],\"databases\":[{\"entityId\":\"cohm\",\"entityName\":\"vlrrskapbxwieexu\",\"createdAt\":\"derltfokyksyim\",\"provisioningState\":\"Failed\",\"attributes\":[{\"name\":\"vkcxzznn\",\"value\":\"i\"}],\"branchId\":\"rsejegprkj\",\"ownerName\":\"wrjmwv\"},{\"entityId\":\"tu\",\"entityName\":\"xximwgxq\",\"createdAt\":\"ekotjgxi\",\"provisioningState\":\"Failed\",\"attributes\":[{\"name\":\"fh\",\"value\":\"wvjaq\"},{\"name\":\"pbyynvskpajbm\",\"value\":\"eumexmjbxc\"}],\"branchId\":\"cwkqmtxape\",\"ownerName\":\"scrpilgftrqrej\"}],\"endpoints\":[{\"entityId\":\"uqimldahlfxl\",\"entityName\":\"ifmuadjnfsncsk\",\"createdAt\":\"oshjgcze\",\"provisioningState\":\"Succeeded\",\"attributes\":[{\"name\":\"gztlcgc\",\"value\":\"j\"},{\"name\":\"hfjv\",\"value\":\"ywjzebecuvlbefvw\"},{\"name\":\"ljkxpylrwoxz\",\"value\":\"wpsyxjij\"}],\"projectId\":\"pdvrbkerdkdkga\",\"branchId\":\"wjxildfkcefeyg\",\"endpointType\":\"read_only\"},{\"entityId\":\"oisfmnaybdjn\",\"entityName\":\"mentqo\",\"createdAt\":\"why\",\"provisioningState\":\"Failed\",\"attributes\":[{\"name\":\"lwivqt\",\"value\":\"wlhlsycoybajasq\"},{\"name\":\"bfajcywhjqwmchq\",\"value\":\"htfxcpupuki\"},{\"name\":\"mjzpwdlvwtiwsm\",\"value\":\"sa\"},{\"name\":\"nhqnampp\",\"value\":\"ltassaekewna\"}],\"projectId\":\"ajbk\",\"branchId\":\"lcyizyddcvxo\",\"endpointType\":\"read_write\"}]},\"id\":\"fsxxby\",\"name\":\"e\",\"type\":\"qlvge\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,81 +33,86 @@ public void testList() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.projects().list("si", "xxtclhuulri", com.azure.core.util.Context.NONE); + = manager.projects().list("ipsejbsvsia", "eswhd", com.azure.core.util.Context.NONE); - Assertions.assertEquals("yhcdjwsuoardnag", response.iterator().next().properties().entityName()); - Assertions.assertEquals("iplkysolsyjprxs", response.iterator().next().properties().attributes().get(0).name()); - Assertions.assertEquals("whdmcvhtbbz", response.iterator().next().properties().attributes().get(0).value()); - Assertions.assertEquals("tfo", response.iterator().next().properties().regionId()); - Assertions.assertEquals(47887958579734245L, response.iterator().next().properties().storage()); - Assertions.assertEquals(935611244, response.iterator().next().properties().pgVersion()); - Assertions.assertEquals(424856717, response.iterator().next().properties().historyRetention()); - Assertions.assertEquals(98.68591392968551, + Assertions.assertEquals("pxottd", response.iterator().next().properties().entityName()); + Assertions.assertEquals("ph", response.iterator().next().properties().attributes().get(0).name()); + Assertions.assertEquals("yv", response.iterator().next().properties().attributes().get(0).value()); + Assertions.assertEquals("v", response.iterator().next().properties().regionId()); + Assertions.assertEquals(1532180759590076345L, response.iterator().next().properties().storage()); + Assertions.assertEquals(1402758121, response.iterator().next().properties().pgVersion()); + Assertions.assertEquals(313271072, response.iterator().next().properties().historyRetention()); + Assertions.assertEquals(67.08368890829829, response.iterator().next().properties().defaultEndpointSettings().autoscalingLimitMinCu()); - Assertions.assertEquals(2.367622336840902, + Assertions.assertEquals(17.210906246412183, response.iterator().next().properties().defaultEndpointSettings().autoscalingLimitMaxCu()); - Assertions.assertEquals("rsejegprkj", response.iterator().next().properties().branch().entityName()); - Assertions.assertEquals("kxxi", response.iterator().next().properties().branch().attributes().get(0).name()); - Assertions.assertEquals("wgxql", response.iterator().next().properties().branch().attributes().get(0).value()); - Assertions.assertEquals("geumexm", response.iterator().next().properties().branch().projectId()); - Assertions.assertEquals("xcbccwkqmt", response.iterator().next().properties().branch().parentId()); - Assertions.assertEquals("p", response.iterator().next().properties().branch().roleName()); - Assertions.assertEquals("iscr", response.iterator().next().properties().branch().databaseName()); - Assertions.assertEquals("ejdaahuqimld", - response.iterator().next().properties().branch().roles().get(0).entityName()); - Assertions.assertEquals("skiioshjgczetybn", + Assertions.assertEquals("eyttlrcxiv", response.iterator().next().properties().branch().entityName()); + Assertions.assertEquals("fluxynbpvz", + response.iterator().next().properties().branch().attributes().get(0).name()); + Assertions.assertEquals("qywauyqnjc", + response.iterator().next().properties().branch().attributes().get(0).value()); + Assertions.assertEquals("mocgjshg", response.iterator().next().properties().branch().projectId()); + Assertions.assertEquals("a", response.iterator().next().properties().branch().parentId()); + Assertions.assertEquals("wvixq", response.iterator().next().properties().branch().roleName()); + Assertions.assertEquals("gljkybsj", response.iterator().next().properties().branch().databaseName()); + Assertions.assertEquals("xpc", response.iterator().next().properties().branch().roles().get(0).entityName()); + Assertions.assertEquals("y", response.iterator().next().properties().branch().roles().get(0).attributes().get(0).name()); - Assertions.assertEquals("gztlcgc", + Assertions.assertEquals("zjahwriuomz", response.iterator().next().properties().branch().roles().get(0).attributes().get(0).value()); - Assertions.assertEquals("psyxjije", response.iterator().next().properties().branch().roles().get(0).branchId()); - Assertions.assertEquals("vrbkerdkdkgaw", + Assertions.assertEquals("emtm", response.iterator().next().properties().branch().roles().get(0).branchId()); + Assertions.assertEquals("fsvpink", response.iterator().next().properties().branch().roles().get(0).permissions().get(0)); - Assertions.assertFalse(response.iterator().next().properties().branch().roles().get(0).isSuperUser()); - Assertions.assertEquals("zmxjqif", + Assertions.assertTrue(response.iterator().next().properties().branch().roles().get(0).isSuperUser()); + Assertions.assertEquals("htitsffofwan", response.iterator().next().properties().branch().databases().get(0).entityName()); - Assertions.assertEquals("lirh", + Assertions.assertEquals("azcg", response.iterator().next().properties().branch().databases().get(0).attributes().get(0).name()); - Assertions.assertEquals("mojusuz", + Assertions.assertEquals("dfriwgybj", response.iterator().next().properties().branch().databases().get(0).attributes().get(0).value()); - Assertions.assertEquals("yrqolnthbbnkgz", + Assertions.assertEquals("zokscvg", response.iterator().next().properties().branch().databases().get(0).branchId()); - Assertions.assertEquals("wdrnzkj", + Assertions.assertEquals("ixdgbyfgwewqkj", response.iterator().next().properties().branch().databases().get(0).ownerName()); - Assertions.assertEquals("bpfiddhlrufz", + Assertions.assertEquals("wecr", response.iterator().next().properties().branch().endpoints().get(0).entityName()); - Assertions.assertEquals("selqkrsazrhxud", + Assertions.assertEquals("kklvzrlrmlccmet", response.iterator().next().properties().branch().endpoints().get(0).attributes().get(0).name()); - Assertions.assertEquals("qmdtffi", + Assertions.assertEquals("scz", response.iterator().next().properties().branch().endpoints().get(0).attributes().get(0).value()); - Assertions.assertEquals("yqixokwtjawhv", + Assertions.assertEquals("ovmozsayebraz", response.iterator().next().properties().branch().endpoints().get(0).projectId()); - Assertions.assertEquals("nqf", response.iterator().next().properties().branch().endpoints().get(0).branchId()); + Assertions.assertEquals("lpzbtzuykykipf", + response.iterator().next().properties().branch().endpoints().get(0).branchId()); Assertions.assertEquals(EndpointType.READ_ONLY, response.iterator().next().properties().branch().endpoints().get(0).endpointType()); - Assertions.assertEquals("hczygxvhajpxe", response.iterator().next().properties().roles().get(0).entityName()); - Assertions.assertEquals("npwirfljf", + Assertions.assertEquals("ocwiqbuoutmpyzgl", + response.iterator().next().properties().roles().get(0).entityName()); + Assertions.assertEquals("wwzvdaj", response.iterator().next().properties().roles().get(0).attributes().get(0).name()); - Assertions.assertEquals("wxqouoxudnmc", + Assertions.assertEquals("wnncfmaciqg", response.iterator().next().properties().roles().get(0).attributes().get(0).value()); - Assertions.assertEquals("b", response.iterator().next().properties().roles().get(0).branchId()); - Assertions.assertEquals("dyotnplfacqoccq", + Assertions.assertEquals("wy", response.iterator().next().properties().roles().get(0).branchId()); + Assertions.assertEquals("bfqvzfjmspu", response.iterator().next().properties().roles().get(0).permissions().get(0)); - Assertions.assertFalse(response.iterator().next().properties().roles().get(0).isSuperUser()); - Assertions.assertEquals("ddhjkr", response.iterator().next().properties().databases().get(0).entityName()); - Assertions.assertEquals("qsktxqf", + Assertions.assertTrue(response.iterator().next().properties().roles().get(0).isSuperUser()); + Assertions.assertEquals("vlrrskapbxwieexu", + response.iterator().next().properties().databases().get(0).entityName()); + Assertions.assertEquals("vkcxzznn", response.iterator().next().properties().databases().get(0).attributes().get(0).name()); - Assertions.assertEquals("jbqggweeiwdhdm", + Assertions.assertEquals("i", response.iterator().next().properties().databases().get(0).attributes().get(0).value()); - Assertions.assertEquals("klciichgjsysm", response.iterator().next().properties().databases().get(0).branchId()); - Assertions.assertEquals("o", response.iterator().next().properties().databases().get(0).ownerName()); - Assertions.assertEquals("sifcuvbdujgc", + Assertions.assertEquals("rsejegprkj", response.iterator().next().properties().databases().get(0).branchId()); + Assertions.assertEquals("wrjmwv", response.iterator().next().properties().databases().get(0).ownerName()); + Assertions.assertEquals("ifmuadjnfsncsk", response.iterator().next().properties().endpoints().get(0).entityName()); - Assertions.assertEquals("dxrizagb", + Assertions.assertEquals("gztlcgc", response.iterator().next().properties().endpoints().get(0).attributes().get(0).name()); - Assertions.assertEquals("giarksykpgdqxw", + Assertions.assertEquals("j", response.iterator().next().properties().endpoints().get(0).attributes().get(0).value()); - Assertions.assertEquals("wuntobuiz", response.iterator().next().properties().endpoints().get(0).projectId()); - Assertions.assertEquals("zelwgvydjufbnkl", + Assertions.assertEquals("pdvrbkerdkdkga", + response.iterator().next().properties().endpoints().get(0).projectId()); + Assertions.assertEquals("wjxildfkcefeyg", response.iterator().next().properties().endpoints().get(0).branchId()); Assertions.assertEquals(EndpointType.READ_ONLY, response.iterator().next().properties().endpoints().get(0).endpointType()); diff --git a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/tsp-location.yaml b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/tsp-location.yaml index 6ebe2593606c..c745b44e3c35 100644 --- a/sdk/neonpostgres/azure-resourcemanager-neonpostgres/tsp-location.yaml +++ b/sdk/neonpostgres/azure-resourcemanager-neonpostgres/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/liftrneon/Neon.Postgres.Management -commit: eff267fb01bbba8fd39a5bea039fcdc2f3cebeb6 +commit: 9990ef08cbc4199a0ebea96403a23de493df11d7 repo: Azure/azure-rest-api-specs additionalDirectories: