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