diff --git a/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/CHANGELOG.md b/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/CHANGELOG.md
index c98aaabefa15c..1f5b01ffd8b39 100644
--- a/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/CHANGELOG.md
+++ b/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/CHANGELOG.md
@@ -1,7 +1,8 @@
# Release History
-## 1.0.0-beta.2 (Unreleased)
+## 1.0.0-beta.1 (2022-06-10)
+- Azure Resource Manager DelegatedNetwork client library for Java. This package contains Microsoft Azure SDK for DelegatedNetwork Management SDK. DNC web api provides way to create, get and delete dnc controller. Package tag package-2021-03-15. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
## 1.0.0-beta.1 (2021-03-26)
diff --git a/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/README.md b/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/README.md
index f1d0fdec13d66..c1d0c825ff971 100644
--- a/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/README.md
+++ b/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/README.md
@@ -32,7 +32,7 @@ Various documentation is available to help you get started
com.azure.resourcemanagerazure-resourcemanager-delegatednetwork
- 1.0.0-beta.1
+ 1.0.0-beta.2
```
[//]: # ({x-version-update-end})
@@ -74,6 +74,9 @@ See [API design][design] for general introduction on design and key concepts on
## Examples
+[Code snippets and samples](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/SAMPLE.md)
+
+
## Troubleshooting
## Next steps
diff --git a/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/SAMPLE.md b/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/SAMPLE.md
new file mode 100644
index 0000000000000..d2eb1231b9de3
--- /dev/null
+++ b/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/SAMPLE.md
@@ -0,0 +1,544 @@
+# Code snippets and samples
+
+
+## Controller
+
+- [Create](#controller_create)
+- [Delete](#controller_delete)
+- [GetByResourceGroup](#controller_getbyresourcegroup)
+- [Patch](#controller_patch)
+
+## DelegatedNetwork
+
+- [List](#delegatednetwork_list)
+- [ListByResourceGroup](#delegatednetwork_listbyresourcegroup)
+
+## DelegatedSubnetService
+
+- [Delete](#delegatedsubnetservice_delete)
+- [GetByResourceGroup](#delegatedsubnetservice_getbyresourcegroup)
+- [List](#delegatedsubnetservice_list)
+- [ListByResourceGroup](#delegatedsubnetservice_listbyresourcegroup)
+- [PatchDetails](#delegatedsubnetservice_patchdetails)
+- [PutDetails](#delegatedsubnetservice_putdetails)
+
+## Operations
+
+- [List](#operations_list)
+
+## OrchestratorInstanceService
+
+- [Create](#orchestratorinstanceservice_create)
+- [Delete](#orchestratorinstanceservice_delete)
+- [GetByResourceGroup](#orchestratorinstanceservice_getbyresourcegroup)
+- [List](#orchestratorinstanceservice_list)
+- [ListByResourceGroup](#orchestratorinstanceservice_listbyresourcegroup)
+- [Patch](#orchestratorinstanceservice_patch)
+### Controller_Create
+
+```java
+/** Samples for Controller Create. */
+public final class ControllerCreateSamples {
+ /*
+ * x-ms-original-file: specification/dnc/resource-manager/Microsoft.DelegatedNetwork/stable/2021-03-15/examples/putController.json
+ */
+ /**
+ * Sample code: Create controller.
+ *
+ * @param manager Entry point to DelegatedNetworkManager.
+ */
+ public static void createController(com.azure.resourcemanager.delegatednetwork.DelegatedNetworkManager manager) {
+ manager
+ .controllers()
+ .define("testcontroller")
+ .withRegion("West US")
+ .withExistingResourceGroup("TestRG")
+ .create();
+ }
+}
+```
+
+### Controller_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Controller Delete. */
+public final class ControllerDeleteSamples {
+ /*
+ * x-ms-original-file: specification/dnc/resource-manager/Microsoft.DelegatedNetwork/stable/2021-03-15/examples/deleteController.json
+ */
+ /**
+ * Sample code: Delete controller.
+ *
+ * @param manager Entry point to DelegatedNetworkManager.
+ */
+ public static void deleteController(com.azure.resourcemanager.delegatednetwork.DelegatedNetworkManager manager) {
+ manager.controllers().delete("TestRG", "testcontroller", Context.NONE);
+ }
+}
+```
+
+### Controller_GetByResourceGroup
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Controller GetByResourceGroup. */
+public final class ControllerGetByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/dnc/resource-manager/Microsoft.DelegatedNetwork/stable/2021-03-15/examples/getController.json
+ */
+ /**
+ * Sample code: Get details of a controller.
+ *
+ * @param manager Entry point to DelegatedNetworkManager.
+ */
+ public static void getDetailsOfAController(
+ com.azure.resourcemanager.delegatednetwork.DelegatedNetworkManager manager) {
+ manager.controllers().getByResourceGroupWithResponse("TestRG", "testcontroller", Context.NONE);
+ }
+}
+```
+
+### Controller_Patch
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.delegatednetwork.models.DelegatedController;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for Controller Patch. */
+public final class ControllerPatchSamples {
+ /*
+ * x-ms-original-file: specification/dnc/resource-manager/Microsoft.DelegatedNetwork/stable/2021-03-15/examples/patchController.json
+ */
+ /**
+ * Sample code: update controller.
+ *
+ * @param manager Entry point to DelegatedNetworkManager.
+ */
+ public static void updateController(com.azure.resourcemanager.delegatednetwork.DelegatedNetworkManager manager) {
+ DelegatedController resource =
+ manager.controllers().getByResourceGroupWithResponse("TestRG", "testcontroller", Context.NONE).getValue();
+ resource.update().withTags(mapOf("key", "value")).apply();
+ }
+
+ @SuppressWarnings("unchecked")
+ private static Map mapOf(Object... inputs) {
+ Map map = new HashMap<>();
+ for (int i = 0; i < inputs.length; i += 2) {
+ String key = (String) inputs[i];
+ T value = (T) inputs[i + 1];
+ map.put(key, value);
+ }
+ return map;
+ }
+}
+```
+
+### DelegatedNetwork_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for DelegatedNetwork List. */
+public final class DelegatedNetworkListSamples {
+ /*
+ * x-ms-original-file: specification/dnc/resource-manager/Microsoft.DelegatedNetwork/stable/2021-03-15/examples/controllerListBySub.json
+ */
+ /**
+ * Sample code: Get DelegatedController resources by subscription.
+ *
+ * @param manager Entry point to DelegatedNetworkManager.
+ */
+ public static void getDelegatedControllerResourcesBySubscription(
+ com.azure.resourcemanager.delegatednetwork.DelegatedNetworkManager manager) {
+ manager.delegatedNetworks().list(Context.NONE);
+ }
+}
+```
+
+### DelegatedNetwork_ListByResourceGroup
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for DelegatedNetwork ListByResourceGroup. */
+public final class DelegatedNetworkListByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/dnc/resource-manager/Microsoft.DelegatedNetwork/stable/2021-03-15/examples/controllerListByRG.json
+ */
+ /**
+ * Sample code: Get DelegatedNetwork resources by resource group.
+ *
+ * @param manager Entry point to DelegatedNetworkManager.
+ */
+ public static void getDelegatedNetworkResourcesByResourceGroup(
+ com.azure.resourcemanager.delegatednetwork.DelegatedNetworkManager manager) {
+ manager.delegatedNetworks().listByResourceGroup("testRG", Context.NONE);
+ }
+}
+```
+
+### DelegatedSubnetService_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for DelegatedSubnetService Delete. */
+public final class DelegatedSubnetServiceDeleteSamples {
+ /*
+ * x-ms-original-file: specification/dnc/resource-manager/Microsoft.DelegatedNetwork/stable/2021-03-15/examples/deleteDelegatedSubnet.json
+ */
+ /**
+ * Sample code: delete delegated subnet.
+ *
+ * @param manager Entry point to DelegatedNetworkManager.
+ */
+ public static void deleteDelegatedSubnet(
+ com.azure.resourcemanager.delegatednetwork.DelegatedNetworkManager manager) {
+ manager.delegatedSubnetServices().delete("TestRG", "delegated1", null, Context.NONE);
+ }
+}
+```
+
+### DelegatedSubnetService_GetByResourceGroup
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for DelegatedSubnetService GetByResourceGroup. */
+public final class DelegatedSubnetServiceGetByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/dnc/resource-manager/Microsoft.DelegatedNetwork/stable/2021-03-15/examples/getDelegatedSubnet.json
+ */
+ /**
+ * Sample code: Get details of a delegated subnet.
+ *
+ * @param manager Entry point to DelegatedNetworkManager.
+ */
+ public static void getDetailsOfADelegatedSubnet(
+ com.azure.resourcemanager.delegatednetwork.DelegatedNetworkManager manager) {
+ manager.delegatedSubnetServices().getByResourceGroupWithResponse("TestRG", "delegated1", Context.NONE);
+ }
+}
+```
+
+### DelegatedSubnetService_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for DelegatedSubnetService List. */
+public final class DelegatedSubnetServiceListSamples {
+ /*
+ * x-ms-original-file: specification/dnc/resource-manager/Microsoft.DelegatedNetwork/stable/2021-03-15/examples/delegatedSubnetListBySub.json
+ */
+ /**
+ * Sample code: Get DelegatedSubnets resources by subscription.
+ *
+ * @param manager Entry point to DelegatedNetworkManager.
+ */
+ public static void getDelegatedSubnetsResourcesBySubscription(
+ com.azure.resourcemanager.delegatednetwork.DelegatedNetworkManager manager) {
+ manager.delegatedSubnetServices().list(Context.NONE);
+ }
+}
+```
+
+### DelegatedSubnetService_ListByResourceGroup
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for DelegatedSubnetService ListByResourceGroup. */
+public final class DelegatedSubnetServiceListByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/dnc/resource-manager/Microsoft.DelegatedNetwork/stable/2021-03-15/examples/delegatedSubnetListByRG.json
+ */
+ /**
+ * Sample code: Get DelegatedSubnets resources by resource group.
+ *
+ * @param manager Entry point to DelegatedNetworkManager.
+ */
+ public static void getDelegatedSubnetsResourcesByResourceGroup(
+ com.azure.resourcemanager.delegatednetwork.DelegatedNetworkManager manager) {
+ manager.delegatedSubnetServices().listByResourceGroup("testRG", Context.NONE);
+ }
+}
+```
+
+### DelegatedSubnetService_PatchDetails
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.delegatednetwork.models.DelegatedSubnet;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for DelegatedSubnetService PatchDetails. */
+public final class DelegatedSubnetServicePatchDetailsSamples {
+ /*
+ * x-ms-original-file: specification/dnc/resource-manager/Microsoft.DelegatedNetwork/stable/2021-03-15/examples/patchDelegatedSubnet.json
+ */
+ /**
+ * Sample code: patch delegated subnet.
+ *
+ * @param manager Entry point to DelegatedNetworkManager.
+ */
+ public static void patchDelegatedSubnet(
+ com.azure.resourcemanager.delegatednetwork.DelegatedNetworkManager manager) {
+ DelegatedSubnet resource =
+ manager
+ .delegatedSubnetServices()
+ .getByResourceGroupWithResponse("TestRG", "delegated1", Context.NONE)
+ .getValue();
+ resource.update().withTags(mapOf("key", "value")).apply();
+ }
+
+ @SuppressWarnings("unchecked")
+ private static Map mapOf(Object... inputs) {
+ Map map = new HashMap<>();
+ for (int i = 0; i < inputs.length; i += 2) {
+ String key = (String) inputs[i];
+ T value = (T) inputs[i + 1];
+ map.put(key, value);
+ }
+ return map;
+ }
+}
+```
+
+### DelegatedSubnetService_PutDetails
+
+```java
+import com.azure.resourcemanager.delegatednetwork.models.ControllerDetails;
+import com.azure.resourcemanager.delegatednetwork.models.SubnetDetails;
+
+/** Samples for DelegatedSubnetService PutDetails. */
+public final class DelegatedSubnetServicePutDetailsSamples {
+ /*
+ * x-ms-original-file: specification/dnc/resource-manager/Microsoft.DelegatedNetwork/stable/2021-03-15/examples/putDelegatedSubnet.json
+ */
+ /**
+ * Sample code: put delegated subnet.
+ *
+ * @param manager Entry point to DelegatedNetworkManager.
+ */
+ public static void putDelegatedSubnet(com.azure.resourcemanager.delegatednetwork.DelegatedNetworkManager manager) {
+ manager
+ .delegatedSubnetServices()
+ .define("delegated1")
+ .withRegion("West US")
+ .withExistingResourceGroup("TestRG")
+ .withSubnetDetails(
+ new SubnetDetails()
+ .withId(
+ "/subscriptions/613192d7-503f-477a-9cfe-4efc3ee2bd60/resourceGroups/TestRG/providers/Microsoft.Network/virtualNetworks/testvnet/subnets/testsubnet"))
+ .withControllerDetails(
+ new ControllerDetails()
+ .withId(
+ "/subscriptions/613192d7-503f-477a-9cfe-4efc3ee2bd60/resourceGroups/TestRG/providers/Microsoft.DelegatedNetwork/controller/dnctestcontroller"))
+ .create();
+ }
+}
+```
+
+### Operations_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Operations List. */
+public final class OperationsListSamples {
+ /*
+ * x-ms-original-file: specification/dnc/resource-manager/Microsoft.DelegatedNetwork/stable/2021-03-15/examples/delegatedNetworkOperationsList.json
+ */
+ /**
+ * Sample code: Get available operations.
+ *
+ * @param manager Entry point to DelegatedNetworkManager.
+ */
+ public static void getAvailableOperations(
+ com.azure.resourcemanager.delegatednetwork.DelegatedNetworkManager manager) {
+ manager.operations().list(Context.NONE);
+ }
+}
+```
+
+### OrchestratorInstanceService_Create
+
+```java
+import com.azure.resourcemanager.delegatednetwork.models.ControllerDetails;
+import com.azure.resourcemanager.delegatednetwork.models.OrchestratorIdentity;
+import com.azure.resourcemanager.delegatednetwork.models.OrchestratorKind;
+import com.azure.resourcemanager.delegatednetwork.models.OrchestratorResourceProperties;
+import com.azure.resourcemanager.delegatednetwork.models.ResourceIdentityType;
+
+/** Samples for OrchestratorInstanceService Create. */
+public final class OrchestratorInstanceServiceCreateSamples {
+ /*
+ * x-ms-original-file: specification/dnc/resource-manager/Microsoft.DelegatedNetwork/stable/2021-03-15/examples/putOrchestrator.json
+ */
+ /**
+ * Sample code: Create orchestrator instance.
+ *
+ * @param manager Entry point to DelegatedNetworkManager.
+ */
+ public static void createOrchestratorInstance(
+ com.azure.resourcemanager.delegatednetwork.DelegatedNetworkManager manager) {
+ manager
+ .orchestratorInstanceServices()
+ .define("testk8s1")
+ .withRegion("West US")
+ .withExistingResourceGroup("TestRG")
+ .withKind(OrchestratorKind.KUBERNETES)
+ .withIdentity(new OrchestratorIdentity().withType(ResourceIdentityType.SYSTEM_ASSIGNED))
+ .withProperties(
+ new OrchestratorResourceProperties()
+ .withOrchestratorAppId("546192d7-503f-477a-9cfe-4efc3ee2b6e1")
+ .withOrchestratorTenantId("da6192d7-503f-477a-9cfe-4efc3ee2b6c3")
+ .withClusterRootCA("ddsadsad344mfdsfdl")
+ .withApiServerEndpoint("https://testk8s.cloudapp.net")
+ .withPrivateLinkResourceId(
+ "/subscriptions/613192d7-503f-477a-9cfe-4efc3ee2bd60/resourceGroups/TestRG/providers/Microsoft.Network/privateLinkServices/plresource1")
+ .withControllerDetails(
+ new ControllerDetails()
+ .withId(
+ "/subscriptions/613192d7-503f-477a-9cfe-4efc3ee2bd60/resourceGroups/TestRG/providers/Microsoft.DelegatedNetwork/controller/testcontroller")))
+ .create();
+ }
+}
+```
+
+### OrchestratorInstanceService_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for OrchestratorInstanceService Delete. */
+public final class OrchestratorInstanceServiceDeleteSamples {
+ /*
+ * x-ms-original-file: specification/dnc/resource-manager/Microsoft.DelegatedNetwork/stable/2021-03-15/examples/deleteOrchestrator.json
+ */
+ /**
+ * Sample code: Delete Orchestrator Instance.
+ *
+ * @param manager Entry point to DelegatedNetworkManager.
+ */
+ public static void deleteOrchestratorInstance(
+ com.azure.resourcemanager.delegatednetwork.DelegatedNetworkManager manager) {
+ manager.orchestratorInstanceServices().delete("TestRG", "k8stest1", null, Context.NONE);
+ }
+}
+```
+
+### OrchestratorInstanceService_GetByResourceGroup
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for OrchestratorInstanceService GetByResourceGroup. */
+public final class OrchestratorInstanceServiceGetByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/dnc/resource-manager/Microsoft.DelegatedNetwork/stable/2021-03-15/examples/getOrchestrator.json
+ */
+ /**
+ * Sample code: Get details of a orchestratorInstance.
+ *
+ * @param manager Entry point to DelegatedNetworkManager.
+ */
+ public static void getDetailsOfAOrchestratorInstance(
+ com.azure.resourcemanager.delegatednetwork.DelegatedNetworkManager manager) {
+ manager.orchestratorInstanceServices().getByResourceGroupWithResponse("TestRG", "testk8s1", Context.NONE);
+ }
+}
+```
+
+### OrchestratorInstanceService_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for OrchestratorInstanceService List. */
+public final class OrchestratorInstanceServiceListSamples {
+ /*
+ * x-ms-original-file: specification/dnc/resource-manager/Microsoft.DelegatedNetwork/stable/2021-03-15/examples/orchestratorInstanceListBySub.json
+ */
+ /**
+ * Sample code: Get orchestratorInstance resources by subscription.
+ *
+ * @param manager Entry point to DelegatedNetworkManager.
+ */
+ public static void getOrchestratorInstanceResourcesBySubscription(
+ com.azure.resourcemanager.delegatednetwork.DelegatedNetworkManager manager) {
+ manager.orchestratorInstanceServices().list(Context.NONE);
+ }
+}
+```
+
+### OrchestratorInstanceService_ListByResourceGroup
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for OrchestratorInstanceService ListByResourceGroup. */
+public final class OrchestratorInstanceServiceListByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/dnc/resource-manager/Microsoft.DelegatedNetwork/stable/2021-03-15/examples/orchestratorInstanceListByRG.json
+ */
+ /**
+ * Sample code: Get OrchestratorInstance resources by resource group.
+ *
+ * @param manager Entry point to DelegatedNetworkManager.
+ */
+ public static void getOrchestratorInstanceResourcesByResourceGroup(
+ com.azure.resourcemanager.delegatednetwork.DelegatedNetworkManager manager) {
+ manager.orchestratorInstanceServices().listByResourceGroup("testRG", Context.NONE);
+ }
+}
+```
+
+### OrchestratorInstanceService_Patch
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.delegatednetwork.models.Orchestrator;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for OrchestratorInstanceService Patch. */
+public final class OrchestratorInstanceServicePatchSamples {
+ /*
+ * x-ms-original-file: specification/dnc/resource-manager/Microsoft.DelegatedNetwork/stable/2021-03-15/examples/patchOrchestrator.json
+ */
+ /**
+ * Sample code: update Orchestrator Instance.
+ *
+ * @param manager Entry point to DelegatedNetworkManager.
+ */
+ public static void updateOrchestratorInstance(
+ com.azure.resourcemanager.delegatednetwork.DelegatedNetworkManager manager) {
+ Orchestrator resource =
+ manager
+ .orchestratorInstanceServices()
+ .getByResourceGroupWithResponse("TestRG", "testk8s1", Context.NONE)
+ .getValue();
+ resource.update().withTags(mapOf("key", "value")).apply();
+ }
+
+ @SuppressWarnings("unchecked")
+ private static Map mapOf(Object... inputs) {
+ Map map = new HashMap<>();
+ for (int i = 0; i < inputs.length; i += 2) {
+ String key = (String) inputs[i];
+ T value = (T) inputs[i + 1];
+ map.put(key, value);
+ }
+ return map;
+ }
+}
+```
+
diff --git a/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/pom.xml b/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/pom.xml
index 54f46475c948f..2d85fc127becb 100644
--- a/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/pom.xml
+++ b/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/pom.xml
@@ -1,55 +1,55 @@
- 4.0.0
-
- com.azure
- azure-client-sdk-parent
- 1.7.0
- ../../parents/azure-client-sdk-parent
-
+ 4.0.0
+
+ com.azure
+ azure-client-sdk-parent
+ 1.7.0
+ ../../parents/azure-client-sdk-parent
+
- com.azure.resourcemanager
- azure-resourcemanager-delegatednetwork
- 1.0.0-beta.2
- jar
+ com.azure.resourcemanager
+ azure-resourcemanager-delegatednetwork
+ 1.0.0-beta.2
+ jar
- Microsoft Azure SDK for DelegatedNetwork Management
- This package contains Microsoft Azure SDK for DelegatedNetwork Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. DNC web api provides way to create, get and delete dnc controller. Package tag package-2021-03-15.
- https://github.com/Azure/azure-sdk-for-java
+ Microsoft Azure SDK for DelegatedNetwork Management
+ This package contains Microsoft Azure SDK for DelegatedNetwork Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. DNC web api provides way to create, get and delete dnc controller. Package tag package-2021-03-15.
+ https://github.com/Azure/azure-sdk-for-java
-
-
- The MIT License (MIT)
- http://opensource.org/licenses/MIT
- repo
-
-
+
+
+ The MIT License (MIT)
+ http://opensource.org/licenses/MIT
+ repo
+
+
-
- https://github.com/Azure/azure-sdk-for-java
- scm:git:git@github.com:Azure/azure-sdk-for-java.git
- scm:git:git@github.com:Azure/azure-sdk-for-java.git
- HEAD
-
-
-
- microsoft
- Microsoft
-
-
-
- UTF-8
- true
-
-
-
- com.azure
- azure-core
- 1.29.1
-
-
- com.azure
- azure-core-management
- 1.6.2
-
-
+
+ https://github.com/Azure/azure-sdk-for-java
+ scm:git:git@github.com:Azure/azure-sdk-for-java.git
+ scm:git:git@github.com:Azure/azure-sdk-for-java.git
+ HEAD
+
+
+
+ microsoft
+ Microsoft
+
+
+
+ UTF-8
+ true
+
+
+
+ com.azure
+ azure-core
+ 1.29.1
+
+
+ com.azure
+ azure-core-management
+ 1.6.2
+
+
diff --git a/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/DelegatedNetworkManager.java b/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/DelegatedNetworkManager.java
index 11a2ce3389f29..f1a6711144477 100644
--- a/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/DelegatedNetworkManager.java
+++ b/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/DelegatedNetworkManager.java
@@ -8,15 +8,18 @@
import com.azure.core.http.HttpClient;
import com.azure.core.http.HttpPipeline;
import com.azure.core.http.HttpPipelineBuilder;
+import com.azure.core.http.HttpPipelinePosition;
import com.azure.core.http.policy.AddDatePolicy;
-import com.azure.core.http.policy.BearerTokenAuthenticationPolicy;
+import com.azure.core.http.policy.AddHeadersFromContextPolicy;
import com.azure.core.http.policy.HttpLogOptions;
import com.azure.core.http.policy.HttpLoggingPolicy;
import com.azure.core.http.policy.HttpPipelinePolicy;
import com.azure.core.http.policy.HttpPolicyProviders;
import com.azure.core.http.policy.RequestIdPolicy;
+import com.azure.core.http.policy.RetryOptions;
import com.azure.core.http.policy.RetryPolicy;
import com.azure.core.http.policy.UserAgentPolicy;
+import com.azure.core.management.http.policy.ArmChallengeAuthenticationPolicy;
import com.azure.core.management.profile.AzureProfile;
import com.azure.core.util.Configuration;
import com.azure.core.util.logging.ClientLogger;
@@ -37,6 +40,7 @@
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
+import java.util.stream.Collectors;
/** Entry point to DelegatedNetworkManager. DNC web api provides way to create, get and delete dnc controller. */
public final class DelegatedNetworkManager {
@@ -77,6 +81,19 @@ public static DelegatedNetworkManager authenticate(TokenCredential credential, A
return configure().authenticate(credential, profile);
}
+ /**
+ * Creates an instance of DelegatedNetwork service API entry point.
+ *
+ * @param httpPipeline the {@link HttpPipeline} configured with Azure authentication credential.
+ * @param profile the Azure profile for client.
+ * @return the DelegatedNetwork service API instance.
+ */
+ public static DelegatedNetworkManager authenticate(HttpPipeline httpPipeline, AzureProfile profile) {
+ Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null.");
+ Objects.requireNonNull(profile, "'profile' cannot be null.");
+ return new DelegatedNetworkManager(httpPipeline, profile, null);
+ }
+
/**
* Gets a Configurable instance that can be used to create DelegatedNetworkManager with optional configuration.
*
@@ -88,12 +105,14 @@ public static Configurable configure() {
/** The Configurable allowing configurations to be set. */
public static final class Configurable {
- private final ClientLogger logger = new ClientLogger(Configurable.class);
+ private static final ClientLogger LOGGER = new ClientLogger(Configurable.class);
private HttpClient httpClient;
private HttpLogOptions httpLogOptions;
private final List policies = new ArrayList<>();
+ private final List scopes = new ArrayList<>();
private RetryPolicy retryPolicy;
+ private RetryOptions retryOptions;
private Duration defaultPollInterval;
private Configurable() {
@@ -132,6 +151,17 @@ public Configurable withPolicy(HttpPipelinePolicy policy) {
return this;
}
+ /**
+ * Adds the scope to permission sets.
+ *
+ * @param scope the scope.
+ * @return the configurable object itself.
+ */
+ public Configurable withScope(String scope) {
+ this.scopes.add(Objects.requireNonNull(scope, "'scope' cannot be null."));
+ return this;
+ }
+
/**
* Sets the retry policy to the HTTP pipeline.
*
@@ -143,6 +173,19 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) {
return this;
}
+ /**
+ * Sets the retry options for the HTTP pipeline retry policy.
+ *
+ *
This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}.
+ *
+ * @param retryOptions the retry options for the HTTP pipeline retry policy.
+ * @return the configurable object itself.
+ */
+ public Configurable withRetryOptions(RetryOptions retryOptions) {
+ this.retryOptions = Objects.requireNonNull(retryOptions, "'retryOptions' cannot be null.");
+ return this;
+ }
+
/**
* Sets the default poll interval, used when service does not provide "Retry-After" header.
*
@@ -150,9 +193,11 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) {
* @return the configurable object itself.
*/
public Configurable withDefaultPollInterval(Duration defaultPollInterval) {
- this.defaultPollInterval = Objects.requireNonNull(defaultPollInterval, "'retryPolicy' cannot be null.");
+ this.defaultPollInterval =
+ Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null.");
if (this.defaultPollInterval.isNegative()) {
- throw logger.logExceptionAsError(new IllegalArgumentException("'httpPipeline' cannot be negative"));
+ throw LOGGER
+ .logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative"));
}
return this;
}
@@ -188,19 +233,38 @@ public DelegatedNetworkManager authenticate(TokenCredential credential, AzurePro
userAgentBuilder.append(" (auto-generated)");
}
+ if (scopes.isEmpty()) {
+ scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default");
+ }
if (retryPolicy == null) {
- retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS);
+ if (retryOptions != null) {
+ retryPolicy = new RetryPolicy(retryOptions);
+ } else {
+ retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS);
+ }
}
List policies = new ArrayList<>();
policies.add(new UserAgentPolicy(userAgentBuilder.toString()));
+ policies.add(new AddHeadersFromContextPolicy());
policies.add(new RequestIdPolicy());
+ policies
+ .addAll(
+ this
+ .policies
+ .stream()
+ .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL)
+ .collect(Collectors.toList()));
HttpPolicyProviders.addBeforeRetryPolicies(policies);
policies.add(retryPolicy);
policies.add(new AddDatePolicy());
+ policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0])));
policies
- .add(
- new BearerTokenAuthenticationPolicy(
- credential, profile.getEnvironment().getManagementEndpoint() + "/.default"));
+ .addAll(
+ this
+ .policies
+ .stream()
+ .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY)
+ .collect(Collectors.toList()));
HttpPolicyProviders.addAfterRetryPolicies(policies);
policies.add(new HttpLoggingPolicy(httpLogOptions));
HttpPipeline httpPipeline =
@@ -212,7 +276,11 @@ public DelegatedNetworkManager authenticate(TokenCredential credential, AzurePro
}
}
- /** @return Resource collection API of Controllers. */
+ /**
+ * Gets the resource collection API of Controllers. It manages DelegatedController.
+ *
+ * @return Resource collection API of Controllers.
+ */
public Controllers controllers() {
if (this.controllers == null) {
this.controllers = new ControllersImpl(clientObject.getControllers(), this);
@@ -220,7 +288,11 @@ public Controllers controllers() {
return controllers;
}
- /** @return Resource collection API of DelegatedNetworks. */
+ /**
+ * Gets the resource collection API of DelegatedNetworks.
+ *
+ * @return Resource collection API of DelegatedNetworks.
+ */
public DelegatedNetworks delegatedNetworks() {
if (this.delegatedNetworks == null) {
this.delegatedNetworks = new DelegatedNetworksImpl(clientObject.getDelegatedNetworks(), this);
@@ -228,7 +300,11 @@ public DelegatedNetworks delegatedNetworks() {
return delegatedNetworks;
}
- /** @return Resource collection API of OrchestratorInstanceServices. */
+ /**
+ * Gets the resource collection API of OrchestratorInstanceServices. It manages Orchestrator.
+ *
+ * @return Resource collection API of OrchestratorInstanceServices.
+ */
public OrchestratorInstanceServices orchestratorInstanceServices() {
if (this.orchestratorInstanceServices == null) {
this.orchestratorInstanceServices =
@@ -237,7 +313,11 @@ public OrchestratorInstanceServices orchestratorInstanceServices() {
return orchestratorInstanceServices;
}
- /** @return Resource collection API of DelegatedSubnetServices. */
+ /**
+ * Gets the resource collection API of DelegatedSubnetServices. It manages DelegatedSubnet.
+ *
+ * @return Resource collection API of DelegatedSubnetServices.
+ */
public DelegatedSubnetServices delegatedSubnetServices() {
if (this.delegatedSubnetServices == null) {
this.delegatedSubnetServices =
@@ -246,7 +326,11 @@ public DelegatedSubnetServices delegatedSubnetServices() {
return delegatedSubnetServices;
}
- /** @return Resource collection API of Operations. */
+ /**
+ * Gets the resource collection API of Operations.
+ *
+ * @return Resource collection API of Operations.
+ */
public Operations operations() {
if (this.operations == null) {
this.operations = new OperationsImpl(clientObject.getOperations(), this);
diff --git a/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/fluent/ControllersClient.java b/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/fluent/ControllersClient.java
index 04ecd03a98473..95683c5c5ac6a 100644
--- a/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/fluent/ControllersClient.java
+++ b/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/fluent/ControllersClient.java
@@ -37,7 +37,7 @@ public interface ControllersClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return details about the specified dnc controller.
+ * @return details about the specified dnc controller along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response getByResourceGroupWithResponse(
@@ -52,9 +52,9 @@ Response getByResourceGroupWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return represents an instance of a DNC controller.
+ * @return the {@link SyncPoller} for polling of represents an instance of a DNC controller.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, DelegatedControllerInner> beginCreate(
String resourceGroupName, String resourceName, DelegatedControllerInner parameters);
@@ -68,9 +68,9 @@ SyncPoller, DelegatedControllerInner> begin
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return represents an instance of a DNC controller.
+ * @return the {@link SyncPoller} for polling of represents an instance of a DNC controller.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, DelegatedControllerInner> beginCreate(
String resourceGroupName, String resourceName, DelegatedControllerInner parameters, Context context);
@@ -112,9 +112,9 @@ DelegatedControllerInner create(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName);
/**
@@ -126,9 +126,9 @@ DelegatedControllerInner create(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName, Context context);
/**
@@ -181,7 +181,7 @@ DelegatedControllerInner patch(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return represents an instance of a DNC controller.
+ * @return represents an instance of a DNC controller along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response patchWithResponse(
diff --git a/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/fluent/DelegatedNetworksClient.java b/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/fluent/DelegatedNetworksClient.java
index d718696a04715..40a4654b557a8 100644
--- a/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/fluent/DelegatedNetworksClient.java
+++ b/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/fluent/DelegatedNetworksClient.java
@@ -17,7 +17,7 @@ public interface DelegatedNetworksClient {
*
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return all the delegatedController resources in a subscription.
+ * @return all the delegatedController resources in a subscription as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list();
@@ -29,7 +29,7 @@ public interface DelegatedNetworksClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return all the delegatedController resources in a subscription.
+ * @return all the delegatedController resources in a subscription as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(Context context);
@@ -41,7 +41,8 @@ public interface DelegatedNetworksClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return all the delegatedController resources in a resource group.
+ * @return all the delegatedController resources in a resource group as paginated response with {@link
+ * PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByResourceGroup(String resourceGroupName);
@@ -54,7 +55,8 @@ public interface DelegatedNetworksClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return all the delegatedController resources in a resource group.
+ * @return all the delegatedController resources in a resource group as paginated response with {@link
+ * PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByResourceGroup(String resourceGroupName, Context context);
diff --git a/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/fluent/DelegatedSubnetServicesClient.java b/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/fluent/DelegatedSubnetServicesClient.java
index cc4fb5dea2586..cbb23834946b2 100644
--- a/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/fluent/DelegatedSubnetServicesClient.java
+++ b/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/fluent/DelegatedSubnetServicesClient.java
@@ -38,7 +38,7 @@ public interface DelegatedSubnetServicesClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return details about the specified dnc DelegatedSubnet Link.
+ * @return details about the specified dnc DelegatedSubnet Link along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response getByResourceGroupWithResponse(
@@ -53,9 +53,9 @@ Response getByResourceGroupWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return represents an instance of a orchestrator.
+ * @return the {@link SyncPoller} for polling of represents an instance of a orchestrator.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, DelegatedSubnetInner> beginPutDetails(
String resourceGroupName, String resourceName, DelegatedSubnetInner parameters);
@@ -69,9 +69,9 @@ SyncPoller, DelegatedSubnetInner> beginPutDetai
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return represents an instance of a orchestrator.
+ * @return the {@link SyncPoller} for polling of represents an instance of a orchestrator.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, DelegatedSubnetInner> beginPutDetails(
String resourceGroupName, String resourceName, DelegatedSubnetInner parameters, Context context);
@@ -114,9 +114,9 @@ DelegatedSubnetInner putDetails(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return represents an instance of a orchestrator.
+ * @return the {@link SyncPoller} for polling of represents an instance of a orchestrator.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, DelegatedSubnetInner> beginPatchDetails(
String resourceGroupName, String resourceName, ResourceUpdateParameters parameters);
@@ -130,9 +130,9 @@ SyncPoller, DelegatedSubnetInner> beginPatchDet
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return represents an instance of a orchestrator.
+ * @return the {@link SyncPoller} for polling of represents an instance of a orchestrator.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, DelegatedSubnetInner> beginPatchDetails(
String resourceGroupName, String resourceName, ResourceUpdateParameters parameters, Context context);
@@ -176,9 +176,9 @@ DelegatedSubnetInner patchDetails(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName, Boolean forceDelete);
/**
@@ -191,9 +191,9 @@ DelegatedSubnetInner patchDetails(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginDelete(
String resourceGroupName, String resourceName, Boolean forceDelete, Context context);
@@ -241,7 +241,7 @@ SyncPoller, Void> beginDelete(
*
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return all the DelegatedSubnets resources in a subscription.
+ * @return all the DelegatedSubnets resources in a subscription as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list();
@@ -253,7 +253,7 @@ SyncPoller, Void> beginDelete(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return all the DelegatedSubnets resources in a subscription.
+ * @return all the DelegatedSubnets resources in a subscription as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(Context context);
@@ -265,7 +265,7 @@ SyncPoller, Void> beginDelete(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return all the DelegatedSubnets resources in a resource group.
+ * @return all the DelegatedSubnets resources in a resource group as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByResourceGroup(String resourceGroupName);
@@ -278,7 +278,7 @@ SyncPoller, Void> beginDelete(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return all the DelegatedSubnets resources in a resource group.
+ * @return all the DelegatedSubnets resources in a resource group as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByResourceGroup(String resourceGroupName, Context context);
diff --git a/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/fluent/OperationsClient.java b/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/fluent/OperationsClient.java
index 62fb59247fa1d..3ade9c13af1a5 100644
--- a/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/fluent/OperationsClient.java
+++ b/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/fluent/OperationsClient.java
@@ -17,7 +17,8 @@ public interface OperationsClient {
*
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a list of REST API operations supported by an Azure Resource Provider.
+ * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with {@link
+ * PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list();
@@ -29,7 +30,8 @@ public interface OperationsClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a list of REST API operations supported by an Azure Resource Provider.
+ * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with {@link
+ * PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(Context context);
diff --git a/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/fluent/OrchestratorInstanceServicesClient.java b/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/fluent/OrchestratorInstanceServicesClient.java
index 5754145b96159..85557e692db13 100644
--- a/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/fluent/OrchestratorInstanceServicesClient.java
+++ b/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/fluent/OrchestratorInstanceServicesClient.java
@@ -38,7 +38,7 @@ public interface OrchestratorInstanceServicesClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return details about the orchestrator instance.
+ * @return details about the orchestrator instance along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response getByResourceGroupWithResponse(
@@ -53,9 +53,9 @@ Response getByResourceGroupWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return represents an instance of a orchestrator.
+ * @return the {@link SyncPoller} for polling of represents an instance of a orchestrator.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, OrchestratorInner> beginCreate(
String resourceGroupName, String resourceName, OrchestratorInner parameters);
@@ -69,9 +69,9 @@ SyncPoller, OrchestratorInner> beginCreate(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return represents an instance of a orchestrator.
+ * @return the {@link SyncPoller} for polling of represents an instance of a orchestrator.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, OrchestratorInner> beginCreate(
String resourceGroupName, String resourceName, OrchestratorInner parameters, Context context);
@@ -110,27 +110,43 @@ OrchestratorInner create(
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param resourceName The name of the resource. It must be a minimum of 3 characters, and a maximum of 63.
+ * @param forceDelete Force delete resource.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName);
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName, Boolean forceDelete);
/**
* Deletes the Orchestrator Instance.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param resourceName The name of the resource. It must be a minimum of 3 characters, and a maximum of 63.
+ * @param forceDelete Force delete resource.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(
+ String resourceGroupName, String resourceName, Boolean forceDelete, Context context);
+
+ /**
+ * Deletes the Orchestrator Instance.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param resourceName The name of the resource. It must be a minimum of 3 characters, and a maximum of 63.
+ * @param forceDelete Force delete resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName, Context context);
+ void delete(String resourceGroupName, String resourceName, Boolean forceDelete);
/**
* Deletes the Orchestrator Instance.
@@ -149,13 +165,14 @@ OrchestratorInner create(
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param resourceName The name of the resource. It must be a minimum of 3 characters, and a maximum of 63.
+ * @param forceDelete Force delete resource.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- void delete(String resourceGroupName, String resourceName, Context context);
+ void delete(String resourceGroupName, String resourceName, Boolean forceDelete, Context context);
/**
* Update Orchestrator Instance.
@@ -182,7 +199,7 @@ OrchestratorInner patch(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return represents an instance of a orchestrator.
+ * @return represents an instance of a orchestrator along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response patchWithResponse(
@@ -196,7 +213,8 @@ Response patchWithResponse(
*
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return all the orchestratorInstance resources in a subscription.
+ * @return all the orchestratorInstance resources in a subscription as paginated response with {@link
+ * PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list();
@@ -208,7 +226,8 @@ Response patchWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return all the orchestratorInstance resources in a subscription.
+ * @return all the orchestratorInstance resources in a subscription as paginated response with {@link
+ * PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(Context context);
@@ -220,7 +239,8 @@ Response patchWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return all the OrchestratorInstances resources in a resource group.
+ * @return all the OrchestratorInstances resources in a resource group as paginated response with {@link
+ * PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByResourceGroup(String resourceGroupName);
@@ -233,7 +253,8 @@ Response patchWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return all the OrchestratorInstances resources in a resource group.
+ * @return all the OrchestratorInstances resources in a resource group as paginated response with {@link
+ * PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByResourceGroup(String resourceGroupName, Context context);
diff --git a/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/fluent/models/DelegatedControllerInner.java b/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/fluent/models/DelegatedControllerInner.java
index 0caf85444ff84..850a2c49ea431 100644
--- a/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/fluent/models/DelegatedControllerInner.java
+++ b/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/fluent/models/DelegatedControllerInner.java
@@ -4,95 +4,28 @@
package com.azure.resourcemanager.delegatednetwork.fluent.models;
-import com.azure.core.annotation.Immutable;
-import com.azure.core.annotation.JsonFlatten;
-import com.azure.core.util.logging.ClientLogger;
+import com.azure.core.annotation.Fluent;
import com.azure.resourcemanager.delegatednetwork.models.ControllerResource;
-import com.azure.resourcemanager.delegatednetwork.models.ControllerState;
-import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.azure.resourcemanager.delegatednetwork.models.DelegatedControllerProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Map;
/** Represents an instance of a DNC controller. */
-@JsonFlatten
-@Immutable
-public class DelegatedControllerInner extends ControllerResource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(DelegatedControllerInner.class);
-
+@Fluent
+public final class DelegatedControllerInner extends ControllerResource {
/*
- * Resource guid.
- */
- @JsonProperty(value = "properties.resourceGuid", access = JsonProperty.Access.WRITE_ONLY)
- private String resourceGuid;
-
- /*
- * The current state of dnc controller resource.
- */
- @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY)
- private ControllerState provisioningState;
-
- /*
- * dnc application id should be used by customer to authenticate with dnc
- * gateway.
- */
- @JsonProperty(value = "properties.dncAppId", access = JsonProperty.Access.WRITE_ONLY)
- private String dncAppId;
-
- /*
- * tenant id of dnc application id
- */
- @JsonProperty(value = "properties.dncTenantId", access = JsonProperty.Access.WRITE_ONLY)
- private String dncTenantId;
-
- /*
- * dnc endpoint url that customers can use to connect to
- */
- @JsonProperty(value = "properties.dncEndpoint", access = JsonProperty.Access.WRITE_ONLY)
- private String dncEndpoint;
-
- /**
- * Get the resourceGuid property: Resource guid.
- *
- * @return the resourceGuid value.
+ * Properties of the provision operation request.
*/
- public String resourceGuid() {
- return this.resourceGuid;
- }
-
- /**
- * Get the provisioningState property: The current state of dnc controller resource.
- *
- * @return the provisioningState value.
- */
- public ControllerState provisioningState() {
- return this.provisioningState;
- }
-
- /**
- * Get the dncAppId property: dnc application id should be used by customer to authenticate with dnc gateway.
- *
- * @return the dncAppId value.
- */
- public String dncAppId() {
- return this.dncAppId;
- }
-
- /**
- * Get the dncTenantId property: tenant id of dnc application id.
- *
- * @return the dncTenantId value.
- */
- public String dncTenantId() {
- return this.dncTenantId;
- }
+ @JsonProperty(value = "properties", access = JsonProperty.Access.WRITE_ONLY)
+ private DelegatedControllerProperties properties;
/**
- * Get the dncEndpoint property: dnc endpoint url that customers can use to connect to.
+ * Get the properties property: Properties of the provision operation request.
*
- * @return the dncEndpoint value.
+ * @return the properties value.
*/
- public String dncEndpoint() {
- return this.dncEndpoint;
+ public DelegatedControllerProperties properties() {
+ return this.properties;
}
/** {@inheritDoc} */
@@ -117,5 +50,8 @@ public DelegatedControllerInner withTags(Map tags) {
@Override
public void validate() {
super.validate();
+ if (properties() != null) {
+ properties().validate();
+ }
}
}
diff --git a/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/fluent/models/DelegatedSubnetInner.java b/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/fluent/models/DelegatedSubnetInner.java
index f1d158e5da6d4..e5327423cc00c 100644
--- a/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/fluent/models/DelegatedSubnetInner.java
+++ b/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/fluent/models/DelegatedSubnetInner.java
@@ -5,45 +5,44 @@
package com.azure.resourcemanager.delegatednetwork.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.annotation.JsonFlatten;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.delegatednetwork.models.ControllerDetails;
import com.azure.resourcemanager.delegatednetwork.models.DelegatedSubnetResource;
import com.azure.resourcemanager.delegatednetwork.models.DelegatedSubnetState;
import com.azure.resourcemanager.delegatednetwork.models.SubnetDetails;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Map;
/** Represents an instance of a orchestrator. */
-@JsonFlatten
@Fluent
-public class DelegatedSubnetInner extends DelegatedSubnetResource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(DelegatedSubnetInner.class);
-
+public final class DelegatedSubnetInner extends DelegatedSubnetResource {
/*
- * Resource guid.
+ * Properties of the provision operation request.
*/
- @JsonProperty(value = "properties.resourceGuid", access = JsonProperty.Access.WRITE_ONLY)
- private String resourceGuid;
+ @JsonProperty(value = "properties")
+ private DelegatedSubnetProperties innerProperties;
- /*
- * The current state of dnc delegated subnet resource.
+ /**
+ * Get the innerProperties property: Properties of the provision operation request.
+ *
+ * @return the innerProperties value.
*/
- @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY)
- private DelegatedSubnetState provisioningState;
+ private DelegatedSubnetProperties innerProperties() {
+ return this.innerProperties;
+ }
- /*
- * subnet details
- */
- @JsonProperty(value = "properties.subnetDetails")
- private SubnetDetails subnetDetails;
+ /** {@inheritDoc} */
+ @Override
+ public DelegatedSubnetInner withLocation(String location) {
+ super.withLocation(location);
+ return this;
+ }
- /*
- * Properties of the controller.
- */
- @JsonProperty(value = "properties.controllerDetails")
- private ControllerDetails controllerDetails;
+ /** {@inheritDoc} */
+ @Override
+ public DelegatedSubnetInner withTags(Map tags) {
+ super.withTags(tags);
+ return this;
+ }
/**
* Get the resourceGuid property: Resource guid.
@@ -51,7 +50,7 @@ public class DelegatedSubnetInner extends DelegatedSubnetResource {
* @return the resourceGuid value.
*/
public String resourceGuid() {
- return this.resourceGuid;
+ return this.innerProperties() == null ? null : this.innerProperties().resourceGuid();
}
/**
@@ -60,7 +59,7 @@ public String resourceGuid() {
* @return the provisioningState value.
*/
public DelegatedSubnetState provisioningState() {
- return this.provisioningState;
+ return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
}
/**
@@ -69,7 +68,7 @@ public DelegatedSubnetState provisioningState() {
* @return the subnetDetails value.
*/
public SubnetDetails subnetDetails() {
- return this.subnetDetails;
+ return this.innerProperties() == null ? null : this.innerProperties().subnetDetails();
}
/**
@@ -79,7 +78,10 @@ public SubnetDetails subnetDetails() {
* @return the DelegatedSubnetInner object itself.
*/
public DelegatedSubnetInner withSubnetDetails(SubnetDetails subnetDetails) {
- this.subnetDetails = subnetDetails;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new DelegatedSubnetProperties();
+ }
+ this.innerProperties().withSubnetDetails(subnetDetails);
return this;
}
@@ -89,7 +91,7 @@ public DelegatedSubnetInner withSubnetDetails(SubnetDetails subnetDetails) {
* @return the controllerDetails value.
*/
public ControllerDetails controllerDetails() {
- return this.controllerDetails;
+ return this.innerProperties() == null ? null : this.innerProperties().controllerDetails();
}
/**
@@ -99,21 +101,10 @@ public ControllerDetails controllerDetails() {
* @return the DelegatedSubnetInner object itself.
*/
public DelegatedSubnetInner withControllerDetails(ControllerDetails controllerDetails) {
- this.controllerDetails = controllerDetails;
- return this;
- }
-
- /** {@inheritDoc} */
- @Override
- public DelegatedSubnetInner withLocation(String location) {
- super.withLocation(location);
- return this;
- }
-
- /** {@inheritDoc} */
- @Override
- public DelegatedSubnetInner withTags(Map tags) {
- super.withTags(tags);
+ if (this.innerProperties() == null) {
+ this.innerProperties = new DelegatedSubnetProperties();
+ }
+ this.innerProperties().withControllerDetails(controllerDetails);
return this;
}
@@ -125,11 +116,8 @@ public DelegatedSubnetInner withTags(Map tags) {
@Override
public void validate() {
super.validate();
- if (subnetDetails() != null) {
- subnetDetails().validate();
- }
- if (controllerDetails() != null) {
- controllerDetails().validate();
+ if (innerProperties() != null) {
+ innerProperties().validate();
}
}
}
diff --git a/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/fluent/models/DelegatedSubnetProperties.java b/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/fluent/models/DelegatedSubnetProperties.java
new file mode 100644
index 0000000000000..1c44a0ca040e8
--- /dev/null
+++ b/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/fluent/models/DelegatedSubnetProperties.java
@@ -0,0 +1,111 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.delegatednetwork.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.resourcemanager.delegatednetwork.models.ControllerDetails;
+import com.azure.resourcemanager.delegatednetwork.models.DelegatedSubnetState;
+import com.azure.resourcemanager.delegatednetwork.models.SubnetDetails;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Properties of delegated subnet. */
+@Fluent
+public final class DelegatedSubnetProperties {
+ /*
+ * Resource guid.
+ */
+ @JsonProperty(value = "resourceGuid", access = JsonProperty.Access.WRITE_ONLY)
+ private String resourceGuid;
+
+ /*
+ * The current state of dnc delegated subnet resource.
+ */
+ @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY)
+ private DelegatedSubnetState provisioningState;
+
+ /*
+ * subnet details
+ */
+ @JsonProperty(value = "subnetDetails")
+ private SubnetDetails subnetDetails;
+
+ /*
+ * Properties of the controller.
+ */
+ @JsonProperty(value = "controllerDetails")
+ private ControllerDetails controllerDetails;
+
+ /**
+ * Get the resourceGuid property: Resource guid.
+ *
+ * @return the resourceGuid value.
+ */
+ public String resourceGuid() {
+ return this.resourceGuid;
+ }
+
+ /**
+ * Get the provisioningState property: The current state of dnc delegated subnet resource.
+ *
+ * @return the provisioningState value.
+ */
+ public DelegatedSubnetState provisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * Get the subnetDetails property: subnet details.
+ *
+ * @return the subnetDetails value.
+ */
+ public SubnetDetails subnetDetails() {
+ return this.subnetDetails;
+ }
+
+ /**
+ * Set the subnetDetails property: subnet details.
+ *
+ * @param subnetDetails the subnetDetails value to set.
+ * @return the DelegatedSubnetProperties object itself.
+ */
+ public DelegatedSubnetProperties withSubnetDetails(SubnetDetails subnetDetails) {
+ this.subnetDetails = subnetDetails;
+ return this;
+ }
+
+ /**
+ * Get the controllerDetails property: Properties of the controller.
+ *
+ * @return the controllerDetails value.
+ */
+ public ControllerDetails controllerDetails() {
+ return this.controllerDetails;
+ }
+
+ /**
+ * Set the controllerDetails property: Properties of the controller.
+ *
+ * @param controllerDetails the controllerDetails value to set.
+ * @return the DelegatedSubnetProperties object itself.
+ */
+ public DelegatedSubnetProperties withControllerDetails(ControllerDetails controllerDetails) {
+ this.controllerDetails = controllerDetails;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (subnetDetails() != null) {
+ subnetDetails().validate();
+ }
+ if (controllerDetails() != null) {
+ controllerDetails().validate();
+ }
+ }
+}
diff --git a/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/fluent/models/OperationInner.java b/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/fluent/models/OperationInner.java
index 210cba6c929a8..bd47c0fa2e49a 100644
--- a/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/fluent/models/OperationInner.java
+++ b/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/fluent/models/OperationInner.java
@@ -5,18 +5,14 @@
package com.azure.resourcemanager.delegatednetwork.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.delegatednetwork.models.ActionType;
import com.azure.resourcemanager.delegatednetwork.models.OperationDisplay;
import com.azure.resourcemanager.delegatednetwork.models.Origin;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
-/** Details of a REST API operation, returned from the Resource Provider Operations API. */
+/** REST API Operation Details of a REST API operation, returned from the Resource Provider Operations API. */
@Fluent
public final class OperationInner {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationInner.class);
-
/*
* The name of the operation, as per Resource-Based Access Control (RBAC).
* Examples: "Microsoft.Compute/virtualMachines/write",
diff --git a/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/fluent/models/OrchestratorInner.java b/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/fluent/models/OrchestratorInner.java
index 0c92f1200f070..41d782726c4c4 100644
--- a/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/fluent/models/OrchestratorInner.java
+++ b/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/fluent/models/OrchestratorInner.java
@@ -5,212 +5,39 @@
package com.azure.resourcemanager.delegatednetwork.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.annotation.JsonFlatten;
-import com.azure.core.util.logging.ClientLogger;
-import com.azure.resourcemanager.delegatednetwork.models.ControllerDetails;
import com.azure.resourcemanager.delegatednetwork.models.OrchestratorIdentity;
-import com.azure.resourcemanager.delegatednetwork.models.OrchestratorInstanceState;
import com.azure.resourcemanager.delegatednetwork.models.OrchestratorKind;
import com.azure.resourcemanager.delegatednetwork.models.OrchestratorResource;
-import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.azure.resourcemanager.delegatednetwork.models.OrchestratorResourceProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Map;
/** Represents an instance of a orchestrator. */
-@JsonFlatten
@Fluent
-public class OrchestratorInner extends OrchestratorResource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(OrchestratorInner.class);
-
- /*
- * Resource guid.
- */
- @JsonProperty(value = "properties.resourceGuid", access = JsonProperty.Access.WRITE_ONLY)
- private String resourceGuid;
-
- /*
- * The current state of orchestratorInstance resource.
- */
- @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY)
- private OrchestratorInstanceState provisioningState;
-
- /*
- * AAD ID used with apiserver
- */
- @JsonProperty(value = "properties.orchestratorAppId")
- private String orchestratorAppId;
-
+public final class OrchestratorInner extends OrchestratorResource {
/*
- * TenantID of server App ID
- */
- @JsonProperty(value = "properties.orchestratorTenantId")
- private String orchestratorTenantId;
-
- /*
- * RootCA certificate of kubernetes cluster base64 encoded
- */
- @JsonProperty(value = "properties.clusterRootCA")
- private String clusterRootCA;
-
- /*
- * K8s APIServer url. Either one of apiServerEndpoint or
- * privateLinkResourceId can be specified
- */
- @JsonProperty(value = "properties.apiServerEndpoint")
- private String apiServerEndpoint;
-
- /*
- * private link arm resource id. Either one of apiServerEndpoint or
- * privateLinkResourceId can be specified
- */
- @JsonProperty(value = "properties.privateLinkResourceId")
- private String privateLinkResourceId;
-
- /*
- * Properties of the controller.
- */
- @JsonProperty(value = "properties.controllerDetails")
- private ControllerDetails controllerDetails;
-
- /**
- * Get the resourceGuid property: Resource guid.
- *
- * @return the resourceGuid value.
- */
- public String resourceGuid() {
- return this.resourceGuid;
- }
-
- /**
- * Get the provisioningState property: The current state of orchestratorInstance resource.
- *
- * @return the provisioningState value.
- */
- public OrchestratorInstanceState provisioningState() {
- return this.provisioningState;
- }
-
- /**
- * Get the orchestratorAppId property: AAD ID used with apiserver.
- *
- * @return the orchestratorAppId value.
- */
- public String orchestratorAppId() {
- return this.orchestratorAppId;
- }
-
- /**
- * Set the orchestratorAppId property: AAD ID used with apiserver.
- *
- * @param orchestratorAppId the orchestratorAppId value to set.
- * @return the OrchestratorInner object itself.
- */
- public OrchestratorInner withOrchestratorAppId(String orchestratorAppId) {
- this.orchestratorAppId = orchestratorAppId;
- return this;
- }
-
- /**
- * Get the orchestratorTenantId property: TenantID of server App ID.
- *
- * @return the orchestratorTenantId value.
- */
- public String orchestratorTenantId() {
- return this.orchestratorTenantId;
- }
-
- /**
- * Set the orchestratorTenantId property: TenantID of server App ID.
- *
- * @param orchestratorTenantId the orchestratorTenantId value to set.
- * @return the OrchestratorInner object itself.
- */
- public OrchestratorInner withOrchestratorTenantId(String orchestratorTenantId) {
- this.orchestratorTenantId = orchestratorTenantId;
- return this;
- }
-
- /**
- * Get the clusterRootCA property: RootCA certificate of kubernetes cluster base64 encoded.
- *
- * @return the clusterRootCA value.
- */
- public String clusterRootCA() {
- return this.clusterRootCA;
- }
-
- /**
- * Set the clusterRootCA property: RootCA certificate of kubernetes cluster base64 encoded.
- *
- * @param clusterRootCA the clusterRootCA value to set.
- * @return the OrchestratorInner object itself.
- */
- public OrchestratorInner withClusterRootCA(String clusterRootCA) {
- this.clusterRootCA = clusterRootCA;
- return this;
- }
-
- /**
- * Get the apiServerEndpoint property: K8s APIServer url. Either one of apiServerEndpoint or privateLinkResourceId
- * can be specified.
- *
- * @return the apiServerEndpoint value.
- */
- public String apiServerEndpoint() {
- return this.apiServerEndpoint;
- }
-
- /**
- * Set the apiServerEndpoint property: K8s APIServer url. Either one of apiServerEndpoint or privateLinkResourceId
- * can be specified.
- *
- * @param apiServerEndpoint the apiServerEndpoint value to set.
- * @return the OrchestratorInner object itself.
+ * Properties of the provision operation request.
*/
- public OrchestratorInner withApiServerEndpoint(String apiServerEndpoint) {
- this.apiServerEndpoint = apiServerEndpoint;
- return this;
- }
-
- /**
- * Get the privateLinkResourceId property: private link arm resource id. Either one of apiServerEndpoint or
- * privateLinkResourceId can be specified.
- *
- * @return the privateLinkResourceId value.
- */
- public String privateLinkResourceId() {
- return this.privateLinkResourceId;
- }
-
- /**
- * Set the privateLinkResourceId property: private link arm resource id. Either one of apiServerEndpoint or
- * privateLinkResourceId can be specified.
- *
- * @param privateLinkResourceId the privateLinkResourceId value to set.
- * @return the OrchestratorInner object itself.
- */
- public OrchestratorInner withPrivateLinkResourceId(String privateLinkResourceId) {
- this.privateLinkResourceId = privateLinkResourceId;
- return this;
- }
+ @JsonProperty(value = "properties")
+ private OrchestratorResourceProperties properties;
/**
- * Get the controllerDetails property: Properties of the controller.
+ * Get the properties property: Properties of the provision operation request.
*
- * @return the controllerDetails value.
+ * @return the properties value.
*/
- public ControllerDetails controllerDetails() {
- return this.controllerDetails;
+ public OrchestratorResourceProperties properties() {
+ return this.properties;
}
/**
- * Set the controllerDetails property: Properties of the controller.
+ * Set the properties property: Properties of the provision operation request.
*
- * @param controllerDetails the controllerDetails value to set.
+ * @param properties the properties value to set.
* @return the OrchestratorInner object itself.
*/
- public OrchestratorInner withControllerDetails(ControllerDetails controllerDetails) {
- this.controllerDetails = controllerDetails;
+ public OrchestratorInner withProperties(OrchestratorResourceProperties properties) {
+ this.properties = properties;
return this;
}
@@ -250,8 +77,8 @@ public OrchestratorInner withTags(Map tags) {
@Override
public void validate() {
super.validate();
- if (controllerDetails() != null) {
- controllerDetails().validate();
+ if (properties() != null) {
+ properties().validate();
}
}
}
diff --git a/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/implementation/ControllersClientImpl.java b/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/implementation/ControllersClientImpl.java
index aa85281364412..1f835f5f1cc82 100644
--- a/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/implementation/ControllersClientImpl.java
+++ b/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/implementation/ControllersClientImpl.java
@@ -26,7 +26,6 @@
import com.azure.core.management.polling.PollResult;
import com.azure.core.util.Context;
import com.azure.core.util.FluxUtil;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.core.util.polling.PollerFlux;
import com.azure.core.util.polling.SyncPoller;
import com.azure.resourcemanager.delegatednetwork.fluent.ControllersClient;
@@ -38,8 +37,6 @@
/** An instance of this class provides access to all the operations defined in ControllersClient. */
public final class ControllersClientImpl implements ControllersClient {
- private final ClientLogger logger = new ClientLogger(ControllersClientImpl.class);
-
/** The proxy service used to perform REST calls. */
private final ControllersService service;
@@ -134,7 +131,8 @@ Mono> patch(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return details about the specified dnc controller.
+ * @return details about the specified dnc controller along with {@link Response} on successful completion of {@link
+ * Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> getByResourceGroupWithResponseAsync(
@@ -183,7 +181,8 @@ private Mono> getByResourceGroupWithResponseA
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return details about the specified dnc controller.
+ * @return details about the specified dnc controller along with {@link Response} on successful completion of {@link
+ * Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> getByResourceGroupWithResponseAsync(
@@ -228,19 +227,12 @@ private Mono> getByResourceGroupWithResponseA
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return details about the specified dnc controller.
+ * @return details about the specified dnc controller on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono getByResourceGroupAsync(String resourceGroupName, String resourceName) {
return getByResourceGroupWithResponseAsync(resourceGroupName, resourceName)
- .flatMap(
- (Response res) -> {
- if (res.getValue() != null) {
- return Mono.just(res.getValue());
- } else {
- return Mono.empty();
- }
- });
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
}
/**
@@ -267,7 +259,7 @@ public DelegatedControllerInner getByResourceGroup(String resourceGroupName, Str
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return details about the specified dnc controller.
+ * @return details about the specified dnc controller along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Response getByResourceGroupWithResponse(
@@ -284,7 +276,8 @@ public Response getByResourceGroupWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return represents an instance of a DNC controller.
+ * @return represents an instance of a DNC controller along with {@link Response} on successful completion of {@link
+ * Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono>> createWithResponseAsync(
@@ -340,7 +333,8 @@ private Mono>> createWithResponseAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return represents an instance of a DNC controller.
+ * @return represents an instance of a DNC controller along with {@link Response} on successful completion of {@link
+ * Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono>> createWithResponseAsync(
@@ -392,9 +386,9 @@ private Mono>> createWithResponseAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return represents an instance of a DNC controller.
+ * @return the {@link PollerFlux} for polling of represents an instance of a DNC controller.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, DelegatedControllerInner> beginCreateAsync(
String resourceGroupName, String resourceName, DelegatedControllerInner parameters) {
Mono>> mono = createWithResponseAsync(resourceGroupName, resourceName, parameters);
@@ -405,7 +399,7 @@ private PollerFlux, DelegatedControllerInne
this.client.getHttpPipeline(),
DelegatedControllerInner.class,
DelegatedControllerInner.class,
- Context.NONE);
+ this.client.getContext());
}
/**
@@ -418,9 +412,9 @@ private PollerFlux, DelegatedControllerInne
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return represents an instance of a DNC controller.
+ * @return the {@link PollerFlux} for polling of represents an instance of a DNC controller.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, DelegatedControllerInner> beginCreateAsync(
String resourceGroupName, String resourceName, DelegatedControllerInner parameters, Context context) {
context = this.client.mergeContext(context);
@@ -445,9 +439,9 @@ private PollerFlux, DelegatedControllerInne
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return represents an instance of a DNC controller.
+ * @return the {@link SyncPoller} for polling of represents an instance of a DNC controller.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, DelegatedControllerInner> beginCreate(
String resourceGroupName, String resourceName, DelegatedControllerInner parameters) {
return beginCreateAsync(resourceGroupName, resourceName, parameters).getSyncPoller();
@@ -463,9 +457,9 @@ public SyncPoller, DelegatedControllerInner
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return represents an instance of a DNC controller.
+ * @return the {@link SyncPoller} for polling of represents an instance of a DNC controller.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, DelegatedControllerInner> beginCreate(
String resourceGroupName, String resourceName, DelegatedControllerInner parameters, Context context) {
return beginCreateAsync(resourceGroupName, resourceName, parameters, context).getSyncPoller();
@@ -480,7 +474,7 @@ public SyncPoller, DelegatedControllerInner
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return represents an instance of a DNC controller.
+ * @return represents an instance of a DNC controller on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono createAsync(
@@ -500,7 +494,7 @@ private Mono createAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return represents an instance of a DNC controller.
+ * @return represents an instance of a DNC controller on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono createAsync(
@@ -553,7 +547,7 @@ public DelegatedControllerInner create(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
+ * @return the {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono>> deleteWithResponseAsync(String resourceGroupName, String resourceName) {
@@ -601,7 +595,7 @@ private Mono>> deleteWithResponseAsync(String resource
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
+ * @return the {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono>> deleteWithResponseAsync(
@@ -646,14 +640,15 @@ private Mono>> deleteWithResponseAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
+ * @return the {@link PollerFlux} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String resourceName) {
Mono>> mono = deleteWithResponseAsync(resourceGroupName, resourceName);
return this
.client
- .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE);
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext());
}
/**
@@ -665,9 +660,9 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
+ * @return the {@link PollerFlux} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, Void> beginDeleteAsync(
String resourceGroupName, String resourceName, Context context) {
context = this.client.mergeContext(context);
@@ -685,9 +680,9 @@ private PollerFlux, Void> beginDeleteAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName) {
return beginDeleteAsync(resourceGroupName, resourceName).getSyncPoller();
}
@@ -701,9 +696,9 @@ public SyncPoller, Void> beginDelete(String resourceGroupName,
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, Void> beginDelete(
String resourceGroupName, String resourceName, Context context) {
return beginDeleteAsync(resourceGroupName, resourceName, context).getSyncPoller();
@@ -717,7 +712,7 @@ public SyncPoller, Void> beginDelete(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
+ * @return A {@link Mono} that completes when a successful response is received.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono deleteAsync(String resourceGroupName, String resourceName) {
@@ -733,7 +728,7 @@ private Mono deleteAsync(String resourceGroupName, String resourceName) {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
+ * @return A {@link Mono} that completes when a successful response is received.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono deleteAsync(String resourceGroupName, String resourceName, Context context) {
@@ -780,7 +775,8 @@ public void delete(String resourceGroupName, String resourceName, Context contex
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return represents an instance of a DNC controller.
+ * @return represents an instance of a DNC controller along with {@link Response} on successful completion of {@link
+ * Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> patchWithResponseAsync(
@@ -836,7 +832,8 @@ private Mono> patchWithResponseAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return represents an instance of a DNC controller.
+ * @return represents an instance of a DNC controller along with {@link Response} on successful completion of {@link
+ * Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> patchWithResponseAsync(
@@ -888,20 +885,13 @@ private Mono> patchWithResponseAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return represents an instance of a DNC controller.
+ * @return represents an instance of a DNC controller on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono patchAsync(
String resourceGroupName, String resourceName, ControllerResourceUpdateParameters parameters) {
return patchWithResponseAsync(resourceGroupName, resourceName, parameters)
- .flatMap(
- (Response res) -> {
- if (res.getValue() != null) {
- return Mono.just(res.getValue());
- } else {
- return Mono.empty();
- }
- });
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
}
/**
@@ -931,7 +921,7 @@ public DelegatedControllerInner patch(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return represents an instance of a DNC controller.
+ * @return represents an instance of a DNC controller along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Response patchWithResponse(
diff --git a/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/implementation/ControllersImpl.java b/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/implementation/ControllersImpl.java
index ce7c789a246b9..1131af6bc9039 100644
--- a/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/implementation/ControllersImpl.java
+++ b/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/implementation/ControllersImpl.java
@@ -12,10 +12,9 @@
import com.azure.resourcemanager.delegatednetwork.fluent.models.DelegatedControllerInner;
import com.azure.resourcemanager.delegatednetwork.models.Controllers;
import com.azure.resourcemanager.delegatednetwork.models.DelegatedController;
-import com.fasterxml.jackson.annotation.JsonIgnore;
public final class ControllersImpl implements Controllers {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(ControllersImpl.class);
+ private static final ClientLogger LOGGER = new ClientLogger(ControllersImpl.class);
private final ControllersClient innerClient;
@@ -63,7 +62,7 @@ public void delete(String resourceGroupName, String resourceName, Context contex
public DelegatedController getById(String id) {
String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String
@@ -71,7 +70,7 @@ public DelegatedController getById(String id) {
}
String resourceName = Utils.getValueFromIdByName(id, "controller");
if (resourceName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'controller'.", id)));
@@ -82,7 +81,7 @@ public DelegatedController getById(String id) {
public Response getByIdWithResponse(String id, Context context) {
String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String
@@ -90,7 +89,7 @@ public Response getByIdWithResponse(String id, Context cont
}
String resourceName = Utils.getValueFromIdByName(id, "controller");
if (resourceName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'controller'.", id)));
@@ -101,7 +100,7 @@ public Response getByIdWithResponse(String id, Context cont
public void deleteById(String id) {
String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String
@@ -109,7 +108,7 @@ public void deleteById(String id) {
}
String resourceName = Utils.getValueFromIdByName(id, "controller");
if (resourceName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'controller'.", id)));
@@ -120,7 +119,7 @@ public void deleteById(String id) {
public void deleteByIdWithResponse(String id, Context context) {
String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String
@@ -128,7 +127,7 @@ public void deleteByIdWithResponse(String id, Context context) {
}
String resourceName = Utils.getValueFromIdByName(id, "controller");
if (resourceName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'controller'.", id)));
diff --git a/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/implementation/DelegatedControllerImpl.java b/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/implementation/DelegatedControllerImpl.java
index b80b43b13394a..cabb4534c3174 100644
--- a/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/implementation/DelegatedControllerImpl.java
+++ b/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/implementation/DelegatedControllerImpl.java
@@ -8,8 +8,8 @@
import com.azure.core.util.Context;
import com.azure.resourcemanager.delegatednetwork.fluent.models.DelegatedControllerInner;
import com.azure.resourcemanager.delegatednetwork.models.ControllerResourceUpdateParameters;
-import com.azure.resourcemanager.delegatednetwork.models.ControllerState;
import com.azure.resourcemanager.delegatednetwork.models.DelegatedController;
+import com.azure.resourcemanager.delegatednetwork.models.DelegatedControllerProperties;
import java.util.Collections;
import java.util.Map;
@@ -44,24 +44,8 @@ public Map tags() {
}
}
- public String resourceGuid() {
- return this.innerModel().resourceGuid();
- }
-
- public ControllerState provisioningState() {
- return this.innerModel().provisioningState();
- }
-
- public String dncAppId() {
- return this.innerModel().dncAppId();
- }
-
- public String dncTenantId() {
- return this.innerModel().dncTenantId();
- }
-
- public String dncEndpoint() {
- return this.innerModel().dncEndpoint();
+ public DelegatedControllerProperties properties() {
+ return this.innerModel().properties();
}
public Region region() {
@@ -72,6 +56,10 @@ public String regionName() {
return this.location();
}
+ public String resourceGroupName() {
+ return resourceGroupName;
+ }
+
public DelegatedControllerInner innerModel() {
return this.innerObject;
}
diff --git a/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/implementation/DelegatedNetworksClientImpl.java b/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/implementation/DelegatedNetworksClientImpl.java
index b0e7d5449eaf1..d6dfaae036a2d 100644
--- a/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/implementation/DelegatedNetworksClientImpl.java
+++ b/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/implementation/DelegatedNetworksClientImpl.java
@@ -25,7 +25,6 @@
import com.azure.core.management.exception.ManagementException;
import com.azure.core.util.Context;
import com.azure.core.util.FluxUtil;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.delegatednetwork.fluent.DelegatedNetworksClient;
import com.azure.resourcemanager.delegatednetwork.fluent.models.DelegatedControllerInner;
import com.azure.resourcemanager.delegatednetwork.models.DelegatedControllers;
@@ -33,8 +32,6 @@
/** An instance of this class provides access to all the operations defined in DelegatedNetworksClient. */
public final class DelegatedNetworksClientImpl implements DelegatedNetworksClient {
- private final ClientLogger logger = new ClientLogger(DelegatedNetworksClientImpl.class);
-
/** The proxy service used to perform REST calls. */
private final DelegatedNetworksService service;
@@ -110,7 +107,8 @@ Mono> listByResourceGroupNext(
*
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return all the delegatedController resources in a subscription.
+ * @return all the delegatedController resources in a subscription along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listSinglePageAsync() {
@@ -156,7 +154,8 @@ private Mono> listSinglePageAsync() {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return all the delegatedController resources in a subscription.
+ * @return all the delegatedController resources in a subscription along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listSinglePageAsync(Context context) {
@@ -197,7 +196,7 @@ private Mono> listSinglePageAsync(Contex
*
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return all the delegatedController resources in a subscription.
+ * @return all the delegatedController resources in a subscription as paginated response with {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listAsync() {
@@ -212,7 +211,7 @@ private PagedFlux listAsync() {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return all the delegatedController resources in a subscription.
+ * @return all the delegatedController resources in a subscription as paginated response with {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listAsync(Context context) {
@@ -225,7 +224,7 @@ private PagedFlux listAsync(Context context) {
*
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return all the delegatedController resources in a subscription.
+ * @return all the delegatedController resources in a subscription as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable list() {
@@ -239,7 +238,7 @@ public PagedIterable list() {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return all the delegatedController resources in a subscription.
+ * @return all the delegatedController resources in a subscription as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable list(Context context) {
@@ -253,7 +252,8 @@ public PagedIterable list(Context context) {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return all the delegatedController resources in a resource group.
+ * @return all the delegatedController resources in a resource group along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) {
@@ -305,7 +305,8 @@ private Mono> listByResourceGroupSingleP
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return all the delegatedController resources in a resource group.
+ * @return all the delegatedController resources in a resource group along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listByResourceGroupSinglePageAsync(
@@ -354,7 +355,7 @@ private Mono> listByResourceGroupSingleP
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return all the delegatedController resources in a resource group.
+ * @return all the delegatedController resources in a resource group as paginated response with {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listByResourceGroupAsync(String resourceGroupName) {
@@ -371,7 +372,7 @@ private PagedFlux listByResourceGroupAsync(String reso
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return all the delegatedController resources in a resource group.
+ * @return all the delegatedController resources in a resource group as paginated response with {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) {
@@ -387,7 +388,8 @@ private PagedFlux listByResourceGroupAsync(String reso
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return all the delegatedController resources in a resource group.
+ * @return all the delegatedController resources in a resource group as paginated response with {@link
+ * PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable listByResourceGroup(String resourceGroupName) {
@@ -402,7 +404,8 @@ public PagedIterable listByResourceGroup(String resour
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return all the delegatedController resources in a resource group.
+ * @return all the delegatedController resources in a resource group as paginated response with {@link
+ * PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable listByResourceGroup(String resourceGroupName, Context context) {
@@ -416,7 +419,8 @@ public PagedIterable listByResourceGroup(String resour
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return an array of Delegated controller resources.
+ * @return an array of Delegated controller resources along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) {
@@ -453,7 +457,8 @@ private Mono> listBySubscriptionNextSing
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return an array of Delegated controller resources.
+ * @return an array of Delegated controller resources along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listBySubscriptionNextSinglePageAsync(
@@ -489,7 +494,8 @@ private Mono> listBySubscriptionNextSing
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return an array of Delegated controller resources.
+ * @return an array of Delegated controller resources along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) {
@@ -526,7 +532,8 @@ private Mono> listByResourceGroupNextSin
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return an array of Delegated controller resources.
+ * @return an array of Delegated controller resources along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listByResourceGroupNextSinglePageAsync(
diff --git a/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/implementation/DelegatedNetworksImpl.java b/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/implementation/DelegatedNetworksImpl.java
index d6c8be1c779bb..7c4d25c806278 100644
--- a/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/implementation/DelegatedNetworksImpl.java
+++ b/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/implementation/DelegatedNetworksImpl.java
@@ -11,10 +11,9 @@
import com.azure.resourcemanager.delegatednetwork.fluent.models.DelegatedControllerInner;
import com.azure.resourcemanager.delegatednetwork.models.DelegatedController;
import com.azure.resourcemanager.delegatednetwork.models.DelegatedNetworks;
-import com.fasterxml.jackson.annotation.JsonIgnore;
public final class DelegatedNetworksImpl implements DelegatedNetworks {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(DelegatedNetworksImpl.class);
+ private static final ClientLogger LOGGER = new ClientLogger(DelegatedNetworksImpl.class);
private final DelegatedNetworksClient innerClient;
diff --git a/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/implementation/DelegatedSubnetImpl.java b/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/implementation/DelegatedSubnetImpl.java
index d022d165867fb..416eec2496ddf 100644
--- a/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/implementation/DelegatedSubnetImpl.java
+++ b/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/implementation/DelegatedSubnetImpl.java
@@ -69,6 +69,10 @@ public String regionName() {
return this.location();
}
+ public String resourceGroupName() {
+ return resourceGroupName;
+ }
+
public DelegatedSubnetInner innerModel() {
return this.innerObject;
}
diff --git a/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/implementation/DelegatedSubnetServicesClientImpl.java b/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/implementation/DelegatedSubnetServicesClientImpl.java
index 3f5e760f435d3..0be5c6c4a5a77 100644
--- a/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/implementation/DelegatedSubnetServicesClientImpl.java
+++ b/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/implementation/DelegatedSubnetServicesClientImpl.java
@@ -30,7 +30,6 @@
import com.azure.core.management.polling.PollResult;
import com.azure.core.util.Context;
import com.azure.core.util.FluxUtil;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.core.util.polling.PollerFlux;
import com.azure.core.util.polling.SyncPoller;
import com.azure.resourcemanager.delegatednetwork.fluent.DelegatedSubnetServicesClient;
@@ -43,8 +42,6 @@
/** An instance of this class provides access to all the operations defined in DelegatedSubnetServicesClient. */
public final class DelegatedSubnetServicesClientImpl implements DelegatedSubnetServicesClient {
- private final ClientLogger logger = new ClientLogger(DelegatedSubnetServicesClientImpl.class);
-
/** The proxy service used to perform REST calls. */
private final DelegatedSubnetServicesService service;
@@ -187,7 +184,8 @@ Mono> listByResourceGroupNext(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return details about the specified dnc DelegatedSubnet Link.
+ * @return details about the specified dnc DelegatedSubnet Link along with {@link Response} on successful completion
+ * of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> getByResourceGroupWithResponseAsync(
@@ -236,7 +234,8 @@ private Mono> getByResourceGroupWithResponseAsync
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return details about the specified dnc DelegatedSubnet Link.
+ * @return details about the specified dnc DelegatedSubnet Link along with {@link Response} on successful completion
+ * of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> getByResourceGroupWithResponseAsync(
@@ -281,19 +280,12 @@ private Mono> getByResourceGroupWithResponseAsync
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return details about the specified dnc DelegatedSubnet Link.
+ * @return details about the specified dnc DelegatedSubnet Link on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono getByResourceGroupAsync(String resourceGroupName, String resourceName) {
return getByResourceGroupWithResponseAsync(resourceGroupName, resourceName)
- .flatMap(
- (Response res) -> {
- if (res.getValue() != null) {
- return Mono.just(res.getValue());
- } else {
- return Mono.empty();
- }
- });
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
}
/**
@@ -320,7 +312,7 @@ public DelegatedSubnetInner getByResourceGroup(String resourceGroupName, String
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return details about the specified dnc DelegatedSubnet Link.
+ * @return details about the specified dnc DelegatedSubnet Link along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Response getByResourceGroupWithResponse(
@@ -337,7 +329,8 @@ public Response getByResourceGroupWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return represents an instance of a orchestrator.
+ * @return represents an instance of a orchestrator along with {@link Response} on successful completion of {@link
+ * Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono>> putDetailsWithResponseAsync(
@@ -393,7 +386,8 @@ private Mono>> putDetailsWithResponseAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return represents an instance of a orchestrator.
+ * @return represents an instance of a orchestrator along with {@link Response} on successful completion of {@link
+ * Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono>> putDetailsWithResponseAsync(
@@ -445,9 +439,9 @@ private Mono>> putDetailsWithResponseAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return represents an instance of a orchestrator.
+ * @return the {@link PollerFlux} for polling of represents an instance of a orchestrator.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, DelegatedSubnetInner> beginPutDetailsAsync(
String resourceGroupName, String resourceName, DelegatedSubnetInner parameters) {
Mono>> mono =
@@ -459,7 +453,7 @@ private PollerFlux, DelegatedSubnetInner> begin
this.client.getHttpPipeline(),
DelegatedSubnetInner.class,
DelegatedSubnetInner.class,
- Context.NONE);
+ this.client.getContext());
}
/**
@@ -472,9 +466,9 @@ private PollerFlux, DelegatedSubnetInner> begin
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return represents an instance of a orchestrator.
+ * @return the {@link PollerFlux} for polling of represents an instance of a orchestrator.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, DelegatedSubnetInner> beginPutDetailsAsync(
String resourceGroupName, String resourceName, DelegatedSubnetInner parameters, Context context) {
context = this.client.mergeContext(context);
@@ -495,9 +489,9 @@ private PollerFlux, DelegatedSubnetInner> begin
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return represents an instance of a orchestrator.
+ * @return the {@link SyncPoller} for polling of represents an instance of a orchestrator.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, DelegatedSubnetInner> beginPutDetails(
String resourceGroupName, String resourceName, DelegatedSubnetInner parameters) {
return beginPutDetailsAsync(resourceGroupName, resourceName, parameters).getSyncPoller();
@@ -513,9 +507,9 @@ public SyncPoller, DelegatedSubnetInner> beginP
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return represents an instance of a orchestrator.
+ * @return the {@link SyncPoller} for polling of represents an instance of a orchestrator.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, DelegatedSubnetInner> beginPutDetails(
String resourceGroupName, String resourceName, DelegatedSubnetInner parameters, Context context) {
return beginPutDetailsAsync(resourceGroupName, resourceName, parameters, context).getSyncPoller();
@@ -530,7 +524,7 @@ public SyncPoller, DelegatedSubnetInner> beginP
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return represents an instance of a orchestrator.
+ * @return represents an instance of a orchestrator on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono putDetailsAsync(
@@ -550,7 +544,7 @@ private Mono putDetailsAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return represents an instance of a orchestrator.
+ * @return represents an instance of a orchestrator on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono putDetailsAsync(
@@ -604,7 +598,8 @@ public DelegatedSubnetInner putDetails(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return represents an instance of a orchestrator.
+ * @return represents an instance of a orchestrator along with {@link Response} on successful completion of {@link
+ * Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono>> patchDetailsWithResponseAsync(
@@ -660,7 +655,8 @@ private Mono>> patchDetailsWithResponseAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return represents an instance of a orchestrator.
+ * @return represents an instance of a orchestrator along with {@link Response} on successful completion of {@link
+ * Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono>> patchDetailsWithResponseAsync(
@@ -712,9 +708,9 @@ private Mono>> patchDetailsWithResponseAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return represents an instance of a orchestrator.
+ * @return the {@link PollerFlux} for polling of represents an instance of a orchestrator.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, DelegatedSubnetInner> beginPatchDetailsAsync(
String resourceGroupName, String resourceName, ResourceUpdateParameters parameters) {
Mono>> mono =
@@ -726,7 +722,7 @@ private PollerFlux, DelegatedSubnetInner> begin
this.client.getHttpPipeline(),
DelegatedSubnetInner.class,
DelegatedSubnetInner.class,
- Context.NONE);
+ this.client.getContext());
}
/**
@@ -739,9 +735,9 @@ private PollerFlux, DelegatedSubnetInner> begin
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return represents an instance of a orchestrator.
+ * @return the {@link PollerFlux} for polling of represents an instance of a orchestrator.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, DelegatedSubnetInner> beginPatchDetailsAsync(
String resourceGroupName, String resourceName, ResourceUpdateParameters parameters, Context context) {
context = this.client.mergeContext(context);
@@ -762,9 +758,9 @@ private PollerFlux, DelegatedSubnetInner> begin
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return represents an instance of a orchestrator.
+ * @return the {@link SyncPoller} for polling of represents an instance of a orchestrator.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, DelegatedSubnetInner> beginPatchDetails(
String resourceGroupName, String resourceName, ResourceUpdateParameters parameters) {
return beginPatchDetailsAsync(resourceGroupName, resourceName, parameters).getSyncPoller();
@@ -780,9 +776,9 @@ public SyncPoller, DelegatedSubnetInner> beginP
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return represents an instance of a orchestrator.
+ * @return the {@link SyncPoller} for polling of represents an instance of a orchestrator.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, DelegatedSubnetInner> beginPatchDetails(
String resourceGroupName, String resourceName, ResourceUpdateParameters parameters, Context context) {
return beginPatchDetailsAsync(resourceGroupName, resourceName, parameters, context).getSyncPoller();
@@ -797,7 +793,7 @@ public SyncPoller, DelegatedSubnetInner> beginP
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return represents an instance of a orchestrator.
+ * @return represents an instance of a orchestrator on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono patchDetailsAsync(
@@ -817,7 +813,7 @@ private Mono patchDetailsAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return represents an instance of a orchestrator.
+ * @return represents an instance of a orchestrator on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono patchDetailsAsync(
@@ -871,7 +867,7 @@ public DelegatedSubnetInner patchDetails(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
+ * @return the {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono>> deleteWithResponseAsync(
@@ -922,7 +918,7 @@ private Mono>> deleteWithResponseAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
+ * @return the {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono>> deleteWithResponseAsync(
@@ -969,15 +965,16 @@ private Mono>> deleteWithResponseAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
+ * @return the {@link PollerFlux} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, Void> beginDeleteAsync(
String resourceGroupName, String resourceName, Boolean forceDelete) {
Mono>> mono = deleteWithResponseAsync(resourceGroupName, resourceName, forceDelete);
return this
.client
- .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE);
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext());
}
/**
@@ -990,9 +987,9 @@ private PollerFlux, Void> beginDeleteAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
+ * @return the {@link PollerFlux} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, Void> beginDeleteAsync(
String resourceGroupName, String resourceName, Boolean forceDelete, Context context) {
context = this.client.mergeContext(context);
@@ -1012,9 +1009,9 @@ private PollerFlux, Void> beginDeleteAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, Void> beginDelete(
String resourceGroupName, String resourceName, Boolean forceDelete) {
return beginDeleteAsync(resourceGroupName, resourceName, forceDelete).getSyncPoller();
@@ -1030,9 +1027,9 @@ public SyncPoller, Void> beginDelete(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, Void> beginDelete(
String resourceGroupName, String resourceName, Boolean forceDelete, Context context) {
return beginDeleteAsync(resourceGroupName, resourceName, forceDelete, context).getSyncPoller();
@@ -1047,7 +1044,7 @@ public SyncPoller, Void> beginDelete(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
+ * @return A {@link Mono} that completes when a successful response is received.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono deleteAsync(String resourceGroupName, String resourceName, Boolean forceDelete) {
@@ -1064,7 +1061,7 @@ private Mono deleteAsync(String resourceGroupName, String resourceName, Bo
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
+ * @return A {@link Mono} that completes when a successful response is received.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono deleteAsync(String resourceGroupName, String resourceName) {
@@ -1084,7 +1081,7 @@ private Mono deleteAsync(String resourceGroupName, String resourceName) {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
+ * @return A {@link Mono} that completes when a successful response is received.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono deleteAsync(
@@ -1145,7 +1142,8 @@ public void delete(String resourceGroupName, String resourceName, Boolean forceD
*
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return all the DelegatedSubnets resources in a subscription.
+ * @return all the DelegatedSubnets resources in a subscription along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listSinglePageAsync() {
@@ -1191,7 +1189,8 @@ private Mono> listSinglePageAsync() {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return all the DelegatedSubnets resources in a subscription.
+ * @return all the DelegatedSubnets resources in a subscription along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listSinglePageAsync(Context context) {
@@ -1232,7 +1231,7 @@ private Mono> listSinglePageAsync(Context co
*
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return all the DelegatedSubnets resources in a subscription.
+ * @return all the DelegatedSubnets resources in a subscription as paginated response with {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listAsync() {
@@ -1247,7 +1246,7 @@ private PagedFlux listAsync() {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return all the DelegatedSubnets resources in a subscription.
+ * @return all the DelegatedSubnets resources in a subscription as paginated response with {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listAsync(Context context) {
@@ -1260,7 +1259,7 @@ private PagedFlux listAsync(Context context) {
*
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return all the DelegatedSubnets resources in a subscription.
+ * @return all the DelegatedSubnets resources in a subscription as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable list() {
@@ -1274,7 +1273,7 @@ public PagedIterable list() {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return all the DelegatedSubnets resources in a subscription.
+ * @return all the DelegatedSubnets resources in a subscription as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable list(Context context) {
@@ -1288,7 +1287,8 @@ public PagedIterable list(Context context) {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return all the DelegatedSubnets resources in a resource group.
+ * @return all the DelegatedSubnets resources in a resource group along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) {
@@ -1340,7 +1340,8 @@ private Mono> listByResourceGroupSinglePageA
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return all the DelegatedSubnets resources in a resource group.
+ * @return all the DelegatedSubnets resources in a resource group along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listByResourceGroupSinglePageAsync(
@@ -1389,7 +1390,7 @@ private Mono> listByResourceGroupSinglePageA
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return all the DelegatedSubnets resources in a resource group.
+ * @return all the DelegatedSubnets resources in a resource group as paginated response with {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listByResourceGroupAsync(String resourceGroupName) {
@@ -1406,7 +1407,7 @@ private PagedFlux listByResourceGroupAsync(String resource
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return all the DelegatedSubnets resources in a resource group.
+ * @return all the DelegatedSubnets resources in a resource group as paginated response with {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) {
@@ -1422,7 +1423,7 @@ private PagedFlux listByResourceGroupAsync(String resource
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return all the DelegatedSubnets resources in a resource group.
+ * @return all the DelegatedSubnets resources in a resource group as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable listByResourceGroup(String resourceGroupName) {
@@ -1437,7 +1438,7 @@ public PagedIterable listByResourceGroup(String resourceGr
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return all the DelegatedSubnets resources in a resource group.
+ * @return all the DelegatedSubnets resources in a resource group as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable listByResourceGroup(String resourceGroupName, Context context) {
@@ -1451,7 +1452,8 @@ public PagedIterable listByResourceGroup(String resourceGr
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return an array of DelegatedSubnet resources.
+ * @return an array of DelegatedSubnet resources along with {@link PagedResponse} on successful completion of {@link
+ * Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) {
@@ -1488,7 +1490,8 @@ private Mono> listBySubscriptionNextSinglePa
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return an array of DelegatedSubnet resources.
+ * @return an array of DelegatedSubnet resources along with {@link PagedResponse} on successful completion of {@link
+ * Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listBySubscriptionNextSinglePageAsync(
@@ -1524,7 +1527,8 @@ private Mono> listBySubscriptionNextSinglePa
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return an array of DelegatedSubnet resources.
+ * @return an array of DelegatedSubnet resources along with {@link PagedResponse} on successful completion of {@link
+ * Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) {
@@ -1561,7 +1565,8 @@ private Mono> listByResourceGroupNextSingleP
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return an array of DelegatedSubnet resources.
+ * @return an array of DelegatedSubnet resources along with {@link PagedResponse} on successful completion of {@link
+ * Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listByResourceGroupNextSinglePageAsync(
diff --git a/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/implementation/DelegatedSubnetServicesImpl.java b/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/implementation/DelegatedSubnetServicesImpl.java
index b72a9c2ee1bef..13929369d7468 100644
--- a/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/implementation/DelegatedSubnetServicesImpl.java
+++ b/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/implementation/DelegatedSubnetServicesImpl.java
@@ -13,10 +13,9 @@
import com.azure.resourcemanager.delegatednetwork.fluent.models.DelegatedSubnetInner;
import com.azure.resourcemanager.delegatednetwork.models.DelegatedSubnet;
import com.azure.resourcemanager.delegatednetwork.models.DelegatedSubnetServices;
-import com.fasterxml.jackson.annotation.JsonIgnore;
public final class DelegatedSubnetServicesImpl implements DelegatedSubnetServices {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(DelegatedSubnetServicesImpl.class);
+ private static final ClientLogger LOGGER = new ClientLogger(DelegatedSubnetServicesImpl.class);
private final DelegatedSubnetServicesClient innerClient;
@@ -89,7 +88,7 @@ public PagedIterable listByResourceGroup(String resourceGroupNa
public DelegatedSubnet getById(String id) {
String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String
@@ -97,7 +96,7 @@ public DelegatedSubnet getById(String id) {
}
String resourceName = Utils.getValueFromIdByName(id, "delegatedSubnets");
if (resourceName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String
@@ -110,7 +109,7 @@ public DelegatedSubnet getById(String id) {
public Response getByIdWithResponse(String id, Context context) {
String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String
@@ -118,7 +117,7 @@ public Response getByIdWithResponse(String id, Context context)
}
String resourceName = Utils.getValueFromIdByName(id, "delegatedSubnets");
if (resourceName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String
@@ -131,7 +130,7 @@ public Response getByIdWithResponse(String id, Context context)
public void deleteById(String id) {
String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String
@@ -139,7 +138,7 @@ public void deleteById(String id) {
}
String resourceName = Utils.getValueFromIdByName(id, "delegatedSubnets");
if (resourceName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String
@@ -153,7 +152,7 @@ public void deleteById(String id) {
public void deleteByIdWithResponse(String id, Boolean forceDelete, Context context) {
String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String
@@ -161,7 +160,7 @@ public void deleteByIdWithResponse(String id, Boolean forceDelete, Context conte
}
String resourceName = Utils.getValueFromIdByName(id, "delegatedSubnets");
if (resourceName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String
diff --git a/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/implementation/DncBuilder.java b/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/implementation/DncBuilder.java
index 343aef48cb85f..f47b7c423ab4c 100644
--- a/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/implementation/DncBuilder.java
+++ b/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/implementation/DncBuilder.java
@@ -7,7 +7,6 @@
import com.azure.core.annotation.ServiceClientBuilder;
import com.azure.core.http.HttpPipeline;
import com.azure.core.http.HttpPipelineBuilder;
-import com.azure.core.http.policy.CookiePolicy;
import com.azure.core.http.policy.RetryPolicy;
import com.azure.core.http.policy.UserAgentPolicy;
import com.azure.core.management.AzureEnvironment;
@@ -67,34 +66,34 @@ public DncBuilder environment(AzureEnvironment environment) {
}
/*
- * The default poll interval for long-running operation
+ * The HTTP pipeline to send requests through
*/
- private Duration defaultPollInterval;
+ private HttpPipeline pipeline;
/**
- * Sets The default poll interval for long-running operation.
+ * Sets The HTTP pipeline to send requests through.
*
- * @param defaultPollInterval the defaultPollInterval value.
+ * @param pipeline the pipeline value.
* @return the DncBuilder.
*/
- public DncBuilder defaultPollInterval(Duration defaultPollInterval) {
- this.defaultPollInterval = defaultPollInterval;
+ public DncBuilder pipeline(HttpPipeline pipeline) {
+ this.pipeline = pipeline;
return this;
}
/*
- * The HTTP pipeline to send requests through
+ * The default poll interval for long-running operation
*/
- private HttpPipeline pipeline;
+ private Duration defaultPollInterval;
/**
- * Sets The HTTP pipeline to send requests through.
+ * Sets The default poll interval for long-running operation.
*
- * @param pipeline the pipeline value.
+ * @param defaultPollInterval the defaultPollInterval value.
* @return the DncBuilder.
*/
- public DncBuilder pipeline(HttpPipeline pipeline) {
- this.pipeline = pipeline;
+ public DncBuilder defaultPollInterval(Duration defaultPollInterval) {
+ this.defaultPollInterval = defaultPollInterval;
return this;
}
@@ -126,15 +125,12 @@ public DncImpl buildClient() {
if (environment == null) {
this.environment = AzureEnvironment.AZURE;
}
+ if (pipeline == null) {
+ this.pipeline = new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build();
+ }
if (defaultPollInterval == null) {
this.defaultPollInterval = Duration.ofSeconds(30);
}
- if (pipeline == null) {
- this.pipeline =
- new HttpPipelineBuilder()
- .policies(new UserAgentPolicy(), new RetryPolicy(), new CookiePolicy())
- .build();
- }
if (serializerAdapter == null) {
this.serializerAdapter = SerializerFactory.createDefaultManagementSerializerAdapter();
}
diff --git a/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/implementation/DncImpl.java b/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/implementation/DncImpl.java
index 4103986e2dce2..51588370b7985 100644
--- a/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/implementation/DncImpl.java
+++ b/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/implementation/DncImpl.java
@@ -15,6 +15,7 @@
import com.azure.core.management.polling.PollResult;
import com.azure.core.management.polling.PollerFactory;
import com.azure.core.util.Context;
+import com.azure.core.util.CoreUtils;
import com.azure.core.util.logging.ClientLogger;
import com.azure.core.util.polling.AsyncPollResponse;
import com.azure.core.util.polling.LongRunningOperationStatus;
@@ -33,15 +34,12 @@
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import java.time.Duration;
-import java.util.Map;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
/** Initializes a new instance of the DncImpl type. */
@ServiceClient(builder = DncBuilder.class)
public final class DncImpl implements Dnc {
- private final ClientLogger logger = new ClientLogger(DncImpl.class);
-
/** The ID of the target subscription. */
private final String subscriptionId;
@@ -220,10 +218,7 @@ public Context getContext() {
* @return the merged context.
*/
public Context mergeContext(Context context) {
- for (Map.Entry