diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/CHANGELOG.md b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/CHANGELOG.md
index 7c9638cae4706..44617d38cc02c 100644
--- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/CHANGELOG.md
+++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/CHANGELOG.md
@@ -1,7 +1,8 @@
# Release History
-## 1.0.0-beta.2 (Unreleased)
+## 1.0.0-beta.1 (2022-03-14)
+- Azure Resource Manager AzureStackHci client library for Java. This package contains Microsoft Azure SDK for AzureStackHci Management SDK. Azure Stack HCI management service. Package tag package-2022-01. 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-04-12)
diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/README.md b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/README.md
index 70d752936ae75..6f4d73978e4be 100644
--- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/README.md
+++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/README.md
@@ -2,7 +2,7 @@
Azure Resource Manager AzureStackHci client library for Java.
-This package contains Microsoft Azure SDK for AzureStackHci Management SDK. Azure Stack HCI management service. Package tag package-2020-10. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
+This package contains Microsoft Azure SDK for AzureStackHci Management SDK. Azure Stack HCI management service. Package tag package-2022-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
## We'd love to hear your feedback
@@ -32,7 +32,7 @@ Various documentation is available to help you get started
com.azure.resourcemanager
azure-resourcemanager-azurestackhci
- 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/azurestackhci/azure-resourcemanager-azurestackhci/SAMPLE.md)
+
+
## Troubleshooting
## Next steps
diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/SAMPLE.md b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/SAMPLE.md
new file mode 100644
index 0000000000000..4b71efad09f21
--- /dev/null
+++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/SAMPLE.md
@@ -0,0 +1,441 @@
+# Code snippets and samples
+
+
+## ArcSettings
+
+- [Create](#arcsettings_create)
+- [Delete](#arcsettings_delete)
+- [Get](#arcsettings_get)
+- [ListByCluster](#arcsettings_listbycluster)
+
+## Clusters
+
+- [Create](#clusters_create)
+- [Delete](#clusters_delete)
+- [GetByResourceGroup](#clusters_getbyresourcegroup)
+- [List](#clusters_list)
+- [ListByResourceGroup](#clusters_listbyresourcegroup)
+- [Update](#clusters_update)
+
+## Extensions
+
+- [Create](#extensions_create)
+- [Delete](#extensions_delete)
+- [Get](#extensions_get)
+- [ListByArcSetting](#extensions_listbyarcsetting)
+- [Update](#extensions_update)
+
+## Operations
+
+- [List](#operations_list)
+### ArcSettings_Create
+
+```java
+/** Samples for ArcSettings Create. */
+public final class ArcSettingsCreateSamples {
+ /*
+ * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2022-01-01/examples/PutArcSetting.json
+ */
+ /**
+ * Sample code: Create ArcSetting.
+ *
+ * @param manager Entry point to AzureStackHciManager.
+ */
+ public static void createArcSetting(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) {
+ manager.arcSettings().define("default").withExistingCluster("test-rg", "myCluster").create();
+ }
+}
+```
+
+### ArcSettings_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ArcSettings Delete. */
+public final class ArcSettingsDeleteSamples {
+ /*
+ * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2022-01-01/examples/DeleteArcSetting.json
+ */
+ /**
+ * Sample code: Delete ArcSetting.
+ *
+ * @param manager Entry point to AzureStackHciManager.
+ */
+ public static void deleteArcSetting(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) {
+ manager.arcSettings().delete("test-rg", "myCluster", "default", Context.NONE);
+ }
+}
+```
+
+### ArcSettings_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ArcSettings Get. */
+public final class ArcSettingsGetSamples {
+ /*
+ * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2022-01-01/examples/GetArcSetting.json
+ */
+ /**
+ * Sample code: Get ArcSetting.
+ *
+ * @param manager Entry point to AzureStackHciManager.
+ */
+ public static void getArcSetting(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) {
+ manager.arcSettings().getWithResponse("test-rg", "myCluster", "default", Context.NONE);
+ }
+}
+```
+
+### ArcSettings_ListByCluster
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ArcSettings ListByCluster. */
+public final class ArcSettingsListByClusterSamples {
+ /*
+ * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2022-01-01/examples/ListArcSettingsByCluster.json
+ */
+ /**
+ * Sample code: List ArcSetting resources by HCI Cluster.
+ *
+ * @param manager Entry point to AzureStackHciManager.
+ */
+ public static void listArcSettingResourcesByHCICluster(
+ com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) {
+ manager.arcSettings().listByCluster("test-rg", "myCluster", Context.NONE);
+ }
+}
+```
+
+### Clusters_Create
+
+```java
+/** Samples for Clusters Create. */
+public final class ClustersCreateSamples {
+ /*
+ * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2022-01-01/examples/CreateCluster.json
+ */
+ /**
+ * Sample code: Create cluster.
+ *
+ * @param manager Entry point to AzureStackHciManager.
+ */
+ public static void createCluster(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) {
+ manager
+ .clusters()
+ .define("myCluster")
+ .withRegion("East US")
+ .withExistingResourceGroup("test-rg")
+ .withCloudManagementEndpoint("https://98294836-31be-4668-aeae-698667faf99b.waconazure.com")
+ .withAadClientId("24a6e53d-04e5-44d2-b7cc-1b732a847dfc")
+ .withAadTenantId("7e589cc1-a8b6-4dff-91bd-5ec0fa18db94")
+ .create();
+ }
+}
+```
+
+### Clusters_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Clusters Delete. */
+public final class ClustersDeleteSamples {
+ /*
+ * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2022-01-01/examples/DeleteCluster.json
+ */
+ /**
+ * Sample code: Delete cluster.
+ *
+ * @param manager Entry point to AzureStackHciManager.
+ */
+ public static void deleteCluster(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) {
+ manager.clusters().deleteWithResponse("test-rg", "myCluster", Context.NONE);
+ }
+}
+```
+
+### Clusters_GetByResourceGroup
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Clusters GetByResourceGroup. */
+public final class ClustersGetByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2022-01-01/examples/GetCluster.json
+ */
+ /**
+ * Sample code: Get cluster.
+ *
+ * @param manager Entry point to AzureStackHciManager.
+ */
+ public static void getCluster(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) {
+ manager.clusters().getByResourceGroupWithResponse("test-rg", "myCluster", Context.NONE);
+ }
+}
+```
+
+### Clusters_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Clusters List. */
+public final class ClustersListSamples {
+ /*
+ * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2022-01-01/examples/ListClustersBySubscription.json
+ */
+ /**
+ * Sample code: List clusters in a given subscription.
+ *
+ * @param manager Entry point to AzureStackHciManager.
+ */
+ public static void listClustersInAGivenSubscription(
+ com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) {
+ manager.clusters().list(Context.NONE);
+ }
+}
+```
+
+### Clusters_ListByResourceGroup
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Clusters ListByResourceGroup. */
+public final class ClustersListByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2022-01-01/examples/ListClustersByResourceGroup.json
+ */
+ /**
+ * Sample code: List clusters in a given resource group.
+ *
+ * @param manager Entry point to AzureStackHciManager.
+ */
+ public static void listClustersInAGivenResourceGroup(
+ com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) {
+ manager.clusters().listByResourceGroup("test-rg", Context.NONE);
+ }
+}
+```
+
+### Clusters_Update
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.azurestackhci.models.Cluster;
+import com.azure.resourcemanager.azurestackhci.models.ClusterDesiredProperties;
+import com.azure.resourcemanager.azurestackhci.models.DiagnosticLevel;
+import com.azure.resourcemanager.azurestackhci.models.WindowsServerSubscription;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for Clusters Update. */
+public final class ClustersUpdateSamples {
+ /*
+ * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2022-01-01/examples/UpdateCluster.json
+ */
+ /**
+ * Sample code: Update cluster.
+ *
+ * @param manager Entry point to AzureStackHciManager.
+ */
+ public static void updateCluster(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) {
+ Cluster resource =
+ manager.clusters().getByResourceGroupWithResponse("test-rg", "myCluster", Context.NONE).getValue();
+ resource
+ .update()
+ .withTags(mapOf("tag1", "value1", "tag2", "value2"))
+ .withCloudManagementEndpoint("https://98294836-31be-4668-aeae-698667faf99b.waconazure.com")
+ .withDesiredProperties(
+ new ClusterDesiredProperties()
+ .withWindowsServerSubscription(WindowsServerSubscription.ENABLED)
+ .withDiagnosticLevel(DiagnosticLevel.BASIC))
+ .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;
+ }
+}
+```
+
+### Extensions_Create
+
+```java
+import com.azure.core.management.serializer.SerializerFactory;
+import com.azure.core.util.serializer.SerializerEncoding;
+import java.io.IOException;
+
+/** Samples for Extensions Create. */
+public final class ExtensionsCreateSamples {
+ /*
+ * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2022-01-01/examples/PutExtension.json
+ */
+ /**
+ * Sample code: Create Arc Extension.
+ *
+ * @param manager Entry point to AzureStackHciManager.
+ */
+ public static void createArcExtension(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager)
+ throws IOException {
+ manager
+ .extensions()
+ .define("MicrosoftMonitoringAgent")
+ .withExistingArcSetting("test-rg", "myCluster", "default")
+ .withPublisher("Microsoft.Compute")
+ .withTypePropertiesType("MicrosoftMonitoringAgent")
+ .withTypeHandlerVersion("1.10")
+ .withSettings(
+ SerializerFactory
+ .createDefaultManagementSerializerAdapter()
+ .deserialize("{\"workspaceId\":\"xx\"}", Object.class, SerializerEncoding.JSON))
+ .withProtectedSettings(
+ SerializerFactory
+ .createDefaultManagementSerializerAdapter()
+ .deserialize("{\"workspaceKey\":\"xx\"}", Object.class, SerializerEncoding.JSON))
+ .create();
+ }
+}
+```
+
+### Extensions_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Extensions Delete. */
+public final class ExtensionsDeleteSamples {
+ /*
+ * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2022-01-01/examples/DeleteExtension.json
+ */
+ /**
+ * Sample code: Delete Arc Extension.
+ *
+ * @param manager Entry point to AzureStackHciManager.
+ */
+ public static void deleteArcExtension(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) {
+ manager.extensions().delete("test-rg", "myCluster", "default", "MicrosoftMonitoringAgent", Context.NONE);
+ }
+}
+```
+
+### Extensions_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Extensions Get. */
+public final class ExtensionsGetSamples {
+ /*
+ * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2022-01-01/examples/GetExtension.json
+ */
+ /**
+ * Sample code: Get ArcSettings Extension.
+ *
+ * @param manager Entry point to AzureStackHciManager.
+ */
+ public static void getArcSettingsExtension(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) {
+ manager
+ .extensions()
+ .getWithResponse("test-rg", "myCluster", "default", "MicrosoftMonitoringAgent", Context.NONE);
+ }
+}
+```
+
+### Extensions_ListByArcSetting
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Extensions ListByArcSetting. */
+public final class ExtensionsListByArcSettingSamples {
+ /*
+ * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2022-01-01/examples/ListExtensionsByArcSetting.json
+ */
+ /**
+ * Sample code: List Extensions under ArcSetting resource.
+ *
+ * @param manager Entry point to AzureStackHciManager.
+ */
+ public static void listExtensionsUnderArcSettingResource(
+ com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) {
+ manager.extensions().listByArcSetting("test-rg", "myCluster", "default", Context.NONE);
+ }
+}
+```
+
+### Extensions_Update
+
+```java
+import com.azure.core.management.serializer.SerializerFactory;
+import com.azure.core.util.Context;
+import com.azure.core.util.serializer.SerializerEncoding;
+import com.azure.resourcemanager.azurestackhci.models.Extension;
+import java.io.IOException;
+
+/** Samples for Extensions Update. */
+public final class ExtensionsUpdateSamples {
+ /*
+ * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2022-01-01/examples/PatchExtension.json
+ */
+ /**
+ * Sample code: Update Arc Extension.
+ *
+ * @param manager Entry point to AzureStackHciManager.
+ */
+ public static void updateArcExtension(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager)
+ throws IOException {
+ Extension resource =
+ manager
+ .extensions()
+ .getWithResponse("test-rg", "myCluster", "default", "MicrosoftMonitoringAgent", Context.NONE)
+ .getValue();
+ resource
+ .update()
+ .withPublisher("Microsoft.Compute")
+ .withTypePropertiesType("MicrosoftMonitoringAgent")
+ .withTypeHandlerVersion("1.10")
+ .withSettings(
+ SerializerFactory
+ .createDefaultManagementSerializerAdapter()
+ .deserialize("{\"workspaceId\":\"xx\"}", Object.class, SerializerEncoding.JSON))
+ .apply();
+ }
+}
+```
+
+### Operations_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Operations List. */
+public final class OperationsListSamples {
+ /*
+ * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2022-01-01/examples/ListOperations.json
+ */
+ /**
+ * Sample code: List operations available with the Microsoft.AzureStackHCI provider.
+ *
+ * @param manager Entry point to AzureStackHciManager.
+ */
+ public static void listOperationsAvailableWithTheMicrosoftAzureStackHCIProvider(
+ com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) {
+ manager.operations().listWithResponse(Context.NONE);
+ }
+}
+```
+
diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/pom.xml b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/pom.xml
index 7ead6ca264d40..9f50f2c6b44db 100644
--- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/pom.xml
+++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/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-azurestackhci
- 1.0.0-beta.2
- jar
+ com.azure.resourcemanager
+ azure-resourcemanager-azurestackhci
+ 1.0.0-beta.2
+ jar
- Microsoft Azure SDK for AzureStackHci Management
- This package contains Microsoft Azure SDK for AzureStackHci Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Azure Stack HCI management service. Package tag package-2020-10.
- https://github.com/Azure/azure-sdk-for-java
+ Microsoft Azure SDK for AzureStackHci Management
+ This package contains Microsoft Azure SDK for AzureStackHci Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Azure Stack HCI management service. Package tag package-2022-01.
+ 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.26.0
-
-
- com.azure
- azure-core-management
- 1.5.3
-
-
+
+ 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.26.0
+
+
+ com.azure
+ azure-core-management
+ 1.5.3
+
+
diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/AzureStackHciManager.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/AzureStackHciManager.java
index 3e48e353084b4..2a3ecb18f4b62 100644
--- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/AzureStackHciManager.java
+++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/AzureStackHciManager.java
@@ -8,8 +8,8 @@
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.HttpLogOptions;
import com.azure.core.http.policy.HttpLoggingPolicy;
import com.azure.core.http.policy.HttpPipelinePolicy;
@@ -17,27 +17,37 @@
import com.azure.core.http.policy.RequestIdPolicy;
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;
import com.azure.resourcemanager.azurestackhci.fluent.AzureStackHciClient;
+import com.azure.resourcemanager.azurestackhci.implementation.ArcSettingsImpl;
import com.azure.resourcemanager.azurestackhci.implementation.AzureStackHciClientBuilder;
import com.azure.resourcemanager.azurestackhci.implementation.ClustersImpl;
+import com.azure.resourcemanager.azurestackhci.implementation.ExtensionsImpl;
import com.azure.resourcemanager.azurestackhci.implementation.OperationsImpl;
+import com.azure.resourcemanager.azurestackhci.models.ArcSettings;
import com.azure.resourcemanager.azurestackhci.models.Clusters;
+import com.azure.resourcemanager.azurestackhci.models.Extensions;
import com.azure.resourcemanager.azurestackhci.models.Operations;
import java.time.Duration;
import java.time.temporal.ChronoUnit;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
+import java.util.stream.Collectors;
/** Entry point to AzureStackHciManager. Azure Stack HCI management service. */
public final class AzureStackHciManager {
- private Operations operations;
+ private ArcSettings arcSettings;
private Clusters clusters;
+ private Extensions extensions;
+
+ private Operations operations;
+
private final AzureStackHciClient clientObject;
private AzureStackHciManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) {
@@ -76,11 +86,12 @@ 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 Duration defaultPollInterval;
@@ -120,6 +131,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.
*
@@ -138,9 +160,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;
}
@@ -176,20 +200,33 @@ public AzureStackHciManager authenticate(TokenCredential credential, AzureProfil
userAgentBuilder.append(" (auto-generated)");
}
+ if (scopes.isEmpty()) {
+ scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default");
+ }
if (retryPolicy == null) {
retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS);
}
List policies = new ArrayList<>();
policies.add(new UserAgentPolicy(userAgentBuilder.toString()));
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"));
- policies.addAll(this.policies);
+ .addAll(
+ this
+ .policies
+ .stream()
+ .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY)
+ .collect(Collectors.toList()));
HttpPolicyProviders.addAfterRetryPolicies(policies);
policies.add(new HttpLoggingPolicy(httpLogOptions));
HttpPipeline httpPipeline =
@@ -201,12 +238,12 @@ public AzureStackHciManager authenticate(TokenCredential credential, AzureProfil
}
}
- /** @return Resource collection API of Operations. */
- public Operations operations() {
- if (this.operations == null) {
- this.operations = new OperationsImpl(clientObject.getOperations(), this);
+ /** @return Resource collection API of ArcSettings. */
+ public ArcSettings arcSettings() {
+ if (this.arcSettings == null) {
+ this.arcSettings = new ArcSettingsImpl(clientObject.getArcSettings(), this);
}
- return operations;
+ return arcSettings;
}
/** @return Resource collection API of Clusters. */
@@ -217,6 +254,22 @@ public Clusters clusters() {
return clusters;
}
+ /** @return Resource collection API of Extensions. */
+ public Extensions extensions() {
+ if (this.extensions == null) {
+ this.extensions = new ExtensionsImpl(clientObject.getExtensions(), this);
+ }
+ return extensions;
+ }
+
+ /** @return Resource collection API of Operations. */
+ public Operations operations() {
+ if (this.operations == null) {
+ this.operations = new OperationsImpl(clientObject.getOperations(), this);
+ }
+ return operations;
+ }
+
/**
* @return Wrapped service client AzureStackHciClient providing direct access to the underlying auto-generated API
* implementation, based on Azure REST API.
diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/ArcSettingsClient.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/ArcSettingsClient.java
new file mode 100644
index 0000000000000..054a33bb28724
--- /dev/null
+++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/ArcSettingsClient.java
@@ -0,0 +1,168 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurestackhci.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.azurestackhci.fluent.models.ArcSettingInner;
+
+/** An instance of this class provides access to all the operations defined in ArcSettingsClient. */
+public interface ArcSettingsClient {
+ /**
+ * Get ArcSetting resources of HCI Cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return arcSetting resources of HCI Cluster as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByCluster(String resourceGroupName, String clusterName);
+
+ /**
+ * Get ArcSetting resources of HCI Cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return arcSetting resources of HCI Cluster as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByCluster(String resourceGroupName, String clusterName, Context context);
+
+ /**
+ * Get ArcSetting resource details of HCI Cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return arcSetting resource details of HCI Cluster.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ArcSettingInner get(String resourceGroupName, String clusterName, String arcSettingName);
+
+ /**
+ * Get ArcSetting resource details of HCI Cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information.
+ * @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 arcSetting resource details of HCI Cluster along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String resourceGroupName, String clusterName, String arcSettingName, Context context);
+
+ /**
+ * Create ArcSetting for HCI cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information.
+ * @param arcSetting Parameters supplied to the Create ArcSetting resource for this HCI cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return arcSetting details.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ArcSettingInner create(
+ String resourceGroupName, String clusterName, String arcSettingName, ArcSettingInner arcSetting);
+
+ /**
+ * Create ArcSetting for HCI cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information.
+ * @param arcSetting Parameters supplied to the Create ArcSetting resource for this HCI cluster.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return arcSetting details along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response createWithResponse(
+ String resourceGroupName,
+ String clusterName,
+ String arcSettingName,
+ ArcSettingInner arcSetting,
+ Context context);
+
+ /**
+ * Delete ArcSetting resource details of HCI Cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, String arcSettingName);
+
+ /**
+ * Delete ArcSetting resource details of HCI Cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(
+ String resourceGroupName, String clusterName, String arcSettingName, Context context);
+
+ /**
+ * Delete ArcSetting resource details of HCI Cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.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 clusterName, String arcSettingName);
+
+ /**
+ * Delete ArcSetting resource details of HCI Cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information.
+ * @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 clusterName, String arcSettingName, Context context);
+}
diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/AzureStackHciClient.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/AzureStackHciClient.java
index 277e14ea65dbb..bb51fe0bea47c 100644
--- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/AzureStackHciClient.java
+++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/AzureStackHciClient.java
@@ -45,11 +45,11 @@ public interface AzureStackHciClient {
Duration getDefaultPollInterval();
/**
- * Gets the OperationsClient object to access its operations.
+ * Gets the ArcSettingsClient object to access its operations.
*
- * @return the OperationsClient object.
+ * @return the ArcSettingsClient object.
*/
- OperationsClient getOperations();
+ ArcSettingsClient getArcSettings();
/**
* Gets the ClustersClient object to access its operations.
@@ -57,4 +57,18 @@ public interface AzureStackHciClient {
* @return the ClustersClient object.
*/
ClustersClient getClusters();
+
+ /**
+ * Gets the ExtensionsClient object to access its operations.
+ *
+ * @return the ExtensionsClient object.
+ */
+ ExtensionsClient getExtensions();
+
+ /**
+ * Gets the OperationsClient object to access its operations.
+ *
+ * @return the OperationsClient object.
+ */
+ OperationsClient getOperations();
}
diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/ClustersClient.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/ClustersClient.java
index b1023e2021f41..c68684543ff8f 100644
--- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/ClustersClient.java
+++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/ClustersClient.java
@@ -10,7 +10,7 @@
import com.azure.core.http.rest.Response;
import com.azure.core.util.Context;
import com.azure.resourcemanager.azurestackhci.fluent.models.ClusterInner;
-import com.azure.resourcemanager.azurestackhci.models.ClusterUpdate;
+import com.azure.resourcemanager.azurestackhci.models.ClusterPatch;
/** An instance of this class provides access to all the operations defined in ClustersClient. */
public interface ClustersClient {
@@ -19,7 +19,7 @@ public interface ClustersClient {
*
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return list of clusters.
+ * @return list of clusters as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list();
@@ -31,7 +31,7 @@ public interface ClustersClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return list of clusters.
+ * @return list of clusters as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(Context context);
@@ -43,7 +43,7 @@ public interface ClustersClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return list of clusters.
+ * @return list of clusters as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByResourceGroup(String resourceGroupName);
@@ -56,7 +56,7 @@ public interface ClustersClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return list of clusters.
+ * @return list of clusters as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByResourceGroup(String resourceGroupName, Context context);
@@ -83,7 +83,7 @@ public interface ClustersClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return hCI cluster.
+ * @return hCI cluster along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response getByResourceGroupWithResponse(
@@ -113,7 +113,7 @@ 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 cluster details.
+ * @return cluster details along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response createWithResponse(
@@ -131,7 +131,7 @@ Response createWithResponse(
* @return cluster details.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- ClusterInner update(String resourceGroupName, String clusterName, ClusterUpdate cluster);
+ ClusterInner update(String resourceGroupName, String clusterName, ClusterPatch cluster);
/**
* Update an HCI cluster.
@@ -143,11 +143,11 @@ Response createWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return cluster details.
+ * @return cluster details along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response updateWithResponse(
- String resourceGroupName, String clusterName, ClusterUpdate cluster, Context context);
+ String resourceGroupName, String clusterName, ClusterPatch cluster, Context context);
/**
* Delete an HCI cluster.
@@ -170,7 +170,7 @@ Response updateWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response.
+ * @return the {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response deleteWithResponse(String resourceGroupName, String clusterName, Context context);
diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/ExtensionsClient.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/ExtensionsClient.java
new file mode 100644
index 0000000000000..d9662370c2a31
--- /dev/null
+++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/ExtensionsClient.java
@@ -0,0 +1,318 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurestackhci.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.azurestackhci.fluent.models.ExtensionInner;
+
+/** An instance of this class provides access to all the operations defined in ExtensionsClient. */
+public interface ExtensionsClient {
+ /**
+ * List all Extensions under ArcSetting resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list of Extensions in HCI cluster as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByArcSetting(String resourceGroupName, String clusterName, String arcSettingName);
+
+ /**
+ * List all Extensions under ArcSetting resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list of Extensions in HCI cluster as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByArcSetting(
+ String resourceGroupName, String clusterName, String arcSettingName, Context context);
+
+ /**
+ * Get particular Arc Extension of HCI Cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information.
+ * @param extensionName The name of the machine extension.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return particular Arc Extension of HCI Cluster.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ExtensionInner get(String resourceGroupName, String clusterName, String arcSettingName, String extensionName);
+
+ /**
+ * Get particular Arc Extension of HCI Cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information.
+ * @param extensionName The name of the machine extension.
+ * @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 particular Arc Extension of HCI Cluster along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String resourceGroupName, String clusterName, String arcSettingName, String extensionName, Context context);
+
+ /**
+ * Create Extension for HCI cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information.
+ * @param extensionName The name of the machine extension.
+ * @param extension Details of the Machine Extension to be created.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of details of a particular extension in HCI Cluster.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, ExtensionInner> beginCreate(
+ String resourceGroupName,
+ String clusterName,
+ String arcSettingName,
+ String extensionName,
+ ExtensionInner extension);
+
+ /**
+ * Create Extension for HCI cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information.
+ * @param extensionName The name of the machine extension.
+ * @param extension Details of the Machine Extension to be created.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of details of a particular extension in HCI Cluster.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, ExtensionInner> beginCreate(
+ String resourceGroupName,
+ String clusterName,
+ String arcSettingName,
+ String extensionName,
+ ExtensionInner extension,
+ Context context);
+
+ /**
+ * Create Extension for HCI cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information.
+ * @param extensionName The name of the machine extension.
+ * @param extension Details of the Machine Extension to be created.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 of a particular extension in HCI Cluster.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ExtensionInner create(
+ String resourceGroupName,
+ String clusterName,
+ String arcSettingName,
+ String extensionName,
+ ExtensionInner extension);
+
+ /**
+ * Create Extension for HCI cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information.
+ * @param extensionName The name of the machine extension.
+ * @param extension Details of the Machine Extension to be created.
+ * @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 details of a particular extension in HCI Cluster.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ExtensionInner create(
+ String resourceGroupName,
+ String clusterName,
+ String arcSettingName,
+ String extensionName,
+ ExtensionInner extension,
+ Context context);
+
+ /**
+ * Update Extension for HCI cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information.
+ * @param extensionName The name of the machine extension.
+ * @param extension Details of the Machine Extension to be created.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of details of a particular extension in HCI Cluster.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, ExtensionInner> beginUpdate(
+ String resourceGroupName,
+ String clusterName,
+ String arcSettingName,
+ String extensionName,
+ ExtensionInner extension);
+
+ /**
+ * Update Extension for HCI cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information.
+ * @param extensionName The name of the machine extension.
+ * @param extension Details of the Machine Extension to be created.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of details of a particular extension in HCI Cluster.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, ExtensionInner> beginUpdate(
+ String resourceGroupName,
+ String clusterName,
+ String arcSettingName,
+ String extensionName,
+ ExtensionInner extension,
+ Context context);
+
+ /**
+ * Update Extension for HCI cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information.
+ * @param extensionName The name of the machine extension.
+ * @param extension Details of the Machine Extension to be created.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 of a particular extension in HCI Cluster.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ExtensionInner update(
+ String resourceGroupName,
+ String clusterName,
+ String arcSettingName,
+ String extensionName,
+ ExtensionInner extension);
+
+ /**
+ * Update Extension for HCI cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information.
+ * @param extensionName The name of the machine extension.
+ * @param extension Details of the Machine Extension to be created.
+ * @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 details of a particular extension in HCI Cluster.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ExtensionInner update(
+ String resourceGroupName,
+ String clusterName,
+ String arcSettingName,
+ String extensionName,
+ ExtensionInner extension,
+ Context context);
+
+ /**
+ * Delete particular Arc Extension of HCI Cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information.
+ * @param extensionName The name of the machine extension.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(
+ String resourceGroupName, String clusterName, String arcSettingName, String extensionName);
+
+ /**
+ * Delete particular Arc Extension of HCI Cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information.
+ * @param extensionName The name of the machine extension.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(
+ String resourceGroupName, String clusterName, String arcSettingName, String extensionName, Context context);
+
+ /**
+ * Delete particular Arc Extension of HCI Cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information.
+ * @param extensionName The name of the machine extension.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.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 clusterName, String arcSettingName, String extensionName);
+
+ /**
+ * Delete particular Arc Extension of HCI Cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information.
+ * @param extensionName The name of the machine extension.
+ * @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 clusterName, String arcSettingName, String extensionName, Context context);
+}
diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/OperationsClient.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/OperationsClient.java
index 6a1af013a2fbc..0b8e907abe681 100644
--- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/OperationsClient.java
+++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/OperationsClient.java
@@ -8,7 +8,7 @@
import com.azure.core.annotation.ServiceMethod;
import com.azure.core.http.rest.Response;
import com.azure.core.util.Context;
-import com.azure.resourcemanager.azurestackhci.fluent.models.AvailableOperationsInner;
+import com.azure.resourcemanager.azurestackhci.fluent.models.OperationListResultInner;
/** An instance of this class provides access to all the operations defined in OperationsClient. */
public interface OperationsClient {
@@ -17,10 +17,10 @@ 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 available operations of the service.
+ * @return a list of REST API operations supported by an Azure Resource Provider.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- AvailableOperationsInner list();
+ OperationListResultInner list();
/**
* List all available Microsoft.AzureStackHCI provider operations.
@@ -29,8 +29,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 available operations of the service.
+ * @return a list of REST API operations supported by an Azure Resource Provider along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response listWithResponse(Context context);
+ Response listWithResponse(Context context);
}
diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ArcSettingInner.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ArcSettingInner.java
new file mode 100644
index 0000000000000..4ab1c5f59076e
--- /dev/null
+++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ArcSettingInner.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.azurestackhci.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.management.SystemData;
+import com.azure.resourcemanager.azurestackhci.models.ArcSettingAggregateState;
+import com.azure.resourcemanager.azurestackhci.models.PerNodeState;
+import com.azure.resourcemanager.azurestackhci.models.ProvisioningState;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** ArcSetting details. */
+@Fluent
+public final class ArcSettingInner extends ProxyResource {
+ /*
+ * System data of ArcSetting resource
+ */
+ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
+ private SystemData innerSystemData;
+
+ /*
+ * ArcSetting properties.
+ */
+ @JsonProperty(value = "properties")
+ private ArcSettingProperties innerProperties;
+
+ /**
+ * Get the innerSystemData property: System data of ArcSetting resource.
+ *
+ * @return the innerSystemData value.
+ */
+ private SystemData innerSystemData() {
+ return this.innerSystemData;
+ }
+
+ /**
+ * Get the innerProperties property: ArcSetting properties.
+ *
+ * @return the innerProperties value.
+ */
+ private ArcSettingProperties innerProperties() {
+ return this.innerProperties;
+ }
+
+ /**
+ * Get the provisioningState property: Provisioning state of the ArcSetting proxy resource.
+ *
+ * @return the provisioningState value.
+ */
+ public ProvisioningState provisioningState() {
+ return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
+ }
+
+ /**
+ * Get the arcInstanceResourceGroup property: The resource group that hosts the Arc agents, ie. Hybrid Compute
+ * Machine resources.
+ *
+ * @return the arcInstanceResourceGroup value.
+ */
+ public String arcInstanceResourceGroup() {
+ return this.innerProperties() == null ? null : this.innerProperties().arcInstanceResourceGroup();
+ }
+
+ /**
+ * Set the arcInstanceResourceGroup property: The resource group that hosts the Arc agents, ie. Hybrid Compute
+ * Machine resources.
+ *
+ * @param arcInstanceResourceGroup the arcInstanceResourceGroup value to set.
+ * @return the ArcSettingInner object itself.
+ */
+ public ArcSettingInner withArcInstanceResourceGroup(String arcInstanceResourceGroup) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ArcSettingProperties();
+ }
+ this.innerProperties().withArcInstanceResourceGroup(arcInstanceResourceGroup);
+ return this;
+ }
+
+ /**
+ * Get the aggregateState property: Aggregate state of Arc agent across the nodes in this HCI cluster.
+ *
+ * @return the aggregateState value.
+ */
+ public ArcSettingAggregateState aggregateState() {
+ return this.innerProperties() == null ? null : this.innerProperties().aggregateState();
+ }
+
+ /**
+ * Get the perNodeDetails property: State of Arc agent in each of the nodes.
+ *
+ * @return the perNodeDetails value.
+ */
+ public List perNodeDetails() {
+ return this.innerProperties() == null ? null : this.innerProperties().perNodeDetails();
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
+ }
+}
diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ArcSettingProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ArcSettingProperties.java
new file mode 100644
index 0000000000000..45e5201c7b58f
--- /dev/null
+++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ArcSettingProperties.java
@@ -0,0 +1,101 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurestackhci.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.resourcemanager.azurestackhci.models.ArcSettingAggregateState;
+import com.azure.resourcemanager.azurestackhci.models.PerNodeState;
+import com.azure.resourcemanager.azurestackhci.models.ProvisioningState;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** ArcSetting properties. */
+@Fluent
+public final class ArcSettingProperties {
+ /*
+ * Provisioning state of the ArcSetting proxy resource.
+ */
+ @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY)
+ private ProvisioningState provisioningState;
+
+ /*
+ * The resource group that hosts the Arc agents, ie. Hybrid Compute Machine
+ * resources.
+ */
+ @JsonProperty(value = "arcInstanceResourceGroup")
+ private String arcInstanceResourceGroup;
+
+ /*
+ * Aggregate state of Arc agent across the nodes in this HCI cluster.
+ */
+ @JsonProperty(value = "aggregateState", access = JsonProperty.Access.WRITE_ONLY)
+ private ArcSettingAggregateState aggregateState;
+
+ /*
+ * State of Arc agent in each of the nodes.
+ */
+ @JsonProperty(value = "perNodeDetails", access = JsonProperty.Access.WRITE_ONLY)
+ private List perNodeDetails;
+
+ /**
+ * Get the provisioningState property: Provisioning state of the ArcSetting proxy resource.
+ *
+ * @return the provisioningState value.
+ */
+ public ProvisioningState provisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * Get the arcInstanceResourceGroup property: The resource group that hosts the Arc agents, ie. Hybrid Compute
+ * Machine resources.
+ *
+ * @return the arcInstanceResourceGroup value.
+ */
+ public String arcInstanceResourceGroup() {
+ return this.arcInstanceResourceGroup;
+ }
+
+ /**
+ * Set the arcInstanceResourceGroup property: The resource group that hosts the Arc agents, ie. Hybrid Compute
+ * Machine resources.
+ *
+ * @param arcInstanceResourceGroup the arcInstanceResourceGroup value to set.
+ * @return the ArcSettingProperties object itself.
+ */
+ public ArcSettingProperties withArcInstanceResourceGroup(String arcInstanceResourceGroup) {
+ this.arcInstanceResourceGroup = arcInstanceResourceGroup;
+ return this;
+ }
+
+ /**
+ * Get the aggregateState property: Aggregate state of Arc agent across the nodes in this HCI cluster.
+ *
+ * @return the aggregateState value.
+ */
+ public ArcSettingAggregateState aggregateState() {
+ return this.aggregateState;
+ }
+
+ /**
+ * Get the perNodeDetails property: State of Arc agent in each of the nodes.
+ *
+ * @return the perNodeDetails value.
+ */
+ public List perNodeDetails() {
+ return this.perNodeDetails;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (perNodeDetails() != null) {
+ perNodeDetails().forEach(e -> e.validate());
+ }
+ }
+}
diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/AvailableOperationsInner.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/AvailableOperationsInner.java
deleted file mode 100644
index f3536ea73c011..0000000000000
--- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/AvailableOperationsInner.java
+++ /dev/null
@@ -1,84 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.azurestackhci.fluent.models;
-
-import com.azure.core.annotation.Fluent;
-import com.azure.core.util.logging.ClientLogger;
-import com.azure.resourcemanager.azurestackhci.models.OperationDetail;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import java.util.List;
-
-/** Available operations of the service. */
-@Fluent
-public final class AvailableOperationsInner {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(AvailableOperationsInner.class);
-
- /*
- * Collection of available operation details
- */
- @JsonProperty(value = "value")
- private List value;
-
- /*
- * URL client should use to fetch the next page (per server side paging).
- * It's null for now, added for future use.
- */
- @JsonProperty(value = "nextLink")
- private String nextLink;
-
- /**
- * Get the value property: Collection of available operation details.
- *
- * @return the value value.
- */
- public List value() {
- return this.value;
- }
-
- /**
- * Set the value property: Collection of available operation details.
- *
- * @param value the value value to set.
- * @return the AvailableOperationsInner object itself.
- */
- public AvailableOperationsInner withValue(List value) {
- this.value = value;
- return this;
- }
-
- /**
- * Get the nextLink property: URL client should use to fetch the next page (per server side paging). It's null for
- * now, added for future use.
- *
- * @return the nextLink value.
- */
- public String nextLink() {
- return this.nextLink;
- }
-
- /**
- * Set the nextLink property: URL client should use to fetch the next page (per server side paging). It's null for
- * now, added for future use.
- *
- * @param nextLink the nextLink value to set.
- * @return the AvailableOperationsInner object itself.
- */
- public AvailableOperationsInner withNextLink(String nextLink) {
- this.nextLink = nextLink;
- return this;
- }
-
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- if (value() != null) {
- value().forEach(e -> e.validate());
- }
- }
-}
diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ClusterInner.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ClusterInner.java
index 30f5fcebff66e..3c68160370f8e 100644
--- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ClusterInner.java
+++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ClusterInner.java
@@ -5,125 +5,62 @@
package com.azure.resourcemanager.azurestackhci.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.annotation.JsonFlatten;
import com.azure.core.management.Resource;
-import com.azure.core.util.logging.ClientLogger;
+import com.azure.core.management.SystemData;
+import com.azure.resourcemanager.azurestackhci.models.ClusterDesiredProperties;
import com.azure.resourcemanager.azurestackhci.models.ClusterReportedProperties;
-import com.azure.resourcemanager.azurestackhci.models.CreatedByType;
import com.azure.resourcemanager.azurestackhci.models.ProvisioningState;
import com.azure.resourcemanager.azurestackhci.models.Status;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.time.OffsetDateTime;
import java.util.Map;
/** Cluster details. */
-@JsonFlatten
@Fluent
-public class ClusterInner extends Resource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(ClusterInner.class);
-
- /*
- * Provisioning state.
- */
- @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY)
- private ProvisioningState provisioningState;
-
- /*
- * Status of the cluster agent.
- */
- @JsonProperty(value = "properties.status", access = JsonProperty.Access.WRITE_ONLY)
- private Status status;
-
- /*
- * Unique, immutable resource id.
- */
- @JsonProperty(value = "properties.cloudId", access = JsonProperty.Access.WRITE_ONLY)
- private String cloudId;
-
- /*
- * App id of cluster AAD identity.
- */
- @JsonProperty(value = "properties.aadClientId")
- private String aadClientId;
-
- /*
- * Tenant id of cluster AAD identity.
- */
- @JsonProperty(value = "properties.aadTenantId")
- private String aadTenantId;
-
- /*
- * Properties reported by cluster agent.
- */
- @JsonProperty(value = "properties.reportedProperties")
- private ClusterReportedProperties reportedProperties;
-
- /*
- * Number of days remaining in the trial period.
- */
- @JsonProperty(value = "properties.trialDaysRemaining", access = JsonProperty.Access.WRITE_ONLY)
- private Float trialDaysRemaining;
-
+public final class ClusterInner extends Resource {
/*
- * Type of billing applied to the resource.
+ * System data of Cluster resource
*/
- @JsonProperty(value = "properties.billingModel", access = JsonProperty.Access.WRITE_ONLY)
- private String billingModel;
+ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
+ private SystemData innerSystemData;
/*
- * First cluster sync timestamp.
+ * Cluster properties.
*/
- @JsonProperty(value = "properties.registrationTimestamp", access = JsonProperty.Access.WRITE_ONLY)
- private OffsetDateTime registrationTimestamp;
+ @JsonProperty(value = "properties")
+ private ClusterProperties innerProperties;
- /*
- * Most recent cluster sync timestamp.
- */
- @JsonProperty(value = "properties.lastSyncTimestamp", access = JsonProperty.Access.WRITE_ONLY)
- private OffsetDateTime lastSyncTimestamp;
-
- /*
- * Most recent billing meter timestamp.
- */
- @JsonProperty(value = "properties.lastBillingTimestamp", access = JsonProperty.Access.WRITE_ONLY)
- private OffsetDateTime lastBillingTimestamp;
-
- /*
- * The identity that created the resource.
- */
- @JsonProperty(value = "systemData.createdBy")
- private String createdBy;
-
- /*
- * The type of identity that created the resource.
- */
- @JsonProperty(value = "systemData.createdByType")
- private CreatedByType createdByType;
-
- /*
- * The timestamp of resource creation (UTC).
+ /**
+ * Get the innerSystemData property: System data of Cluster resource.
+ *
+ * @return the innerSystemData value.
*/
- @JsonProperty(value = "systemData.createdAt")
- private OffsetDateTime createdAt;
+ private SystemData innerSystemData() {
+ return this.innerSystemData;
+ }
- /*
- * The identity that last modified the resource.
+ /**
+ * Get the innerProperties property: Cluster properties.
+ *
+ * @return the innerProperties value.
*/
- @JsonProperty(value = "systemData.lastModifiedBy")
- private String lastModifiedBy;
+ private ClusterProperties innerProperties() {
+ return this.innerProperties;
+ }
- /*
- * The type of identity that last modified the resource.
- */
- @JsonProperty(value = "systemData.lastModifiedByType")
- private CreatedByType lastModifiedByType;
+ /** {@inheritDoc} */
+ @Override
+ public ClusterInner withLocation(String location) {
+ super.withLocation(location);
+ return this;
+ }
- /*
- * The timestamp of resource last modification (UTC)
- */
- @JsonProperty(value = "systemData.lastModifiedAt")
- private OffsetDateTime lastModifiedAt;
+ /** {@inheritDoc} */
+ @Override
+ public ClusterInner withTags(Map tags) {
+ super.withTags(tags);
+ return this;
+ }
/**
* Get the provisioningState property: Provisioning state.
@@ -131,7 +68,7 @@ public class ClusterInner extends Resource {
* @return the provisioningState value.
*/
public ProvisioningState provisioningState() {
- return this.provisioningState;
+ return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
}
/**
@@ -140,7 +77,7 @@ public ProvisioningState provisioningState() {
* @return the status value.
*/
public Status status() {
- return this.status;
+ return this.innerProperties() == null ? null : this.innerProperties().status();
}
/**
@@ -149,7 +86,30 @@ public Status status() {
* @return the cloudId value.
*/
public String cloudId() {
- return this.cloudId;
+ return this.innerProperties() == null ? null : this.innerProperties().cloudId();
+ }
+
+ /**
+ * Get the cloudManagementEndpoint property: Endpoint configured for management from the Azure portal.
+ *
+ * @return the cloudManagementEndpoint value.
+ */
+ public String cloudManagementEndpoint() {
+ return this.innerProperties() == null ? null : this.innerProperties().cloudManagementEndpoint();
+ }
+
+ /**
+ * Set the cloudManagementEndpoint property: Endpoint configured for management from the Azure portal.
+ *
+ * @param cloudManagementEndpoint the cloudManagementEndpoint value to set.
+ * @return the ClusterInner object itself.
+ */
+ public ClusterInner withCloudManagementEndpoint(String cloudManagementEndpoint) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ClusterProperties();
+ }
+ this.innerProperties().withCloudManagementEndpoint(cloudManagementEndpoint);
+ return this;
}
/**
@@ -158,7 +118,7 @@ public String cloudId() {
* @return the aadClientId value.
*/
public String aadClientId() {
- return this.aadClientId;
+ return this.innerProperties() == null ? null : this.innerProperties().aadClientId();
}
/**
@@ -168,7 +128,10 @@ public String aadClientId() {
* @return the ClusterInner object itself.
*/
public ClusterInner withAadClientId(String aadClientId) {
- this.aadClientId = aadClientId;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ClusterProperties();
+ }
+ this.innerProperties().withAadClientId(aadClientId);
return this;
}
@@ -178,7 +141,7 @@ public ClusterInner withAadClientId(String aadClientId) {
* @return the aadTenantId value.
*/
public String aadTenantId() {
- return this.aadTenantId;
+ return this.innerProperties() == null ? null : this.innerProperties().aadTenantId();
}
/**
@@ -188,37 +151,52 @@ public String aadTenantId() {
* @return the ClusterInner object itself.
*/
public ClusterInner withAadTenantId(String aadTenantId) {
- this.aadTenantId = aadTenantId;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ClusterProperties();
+ }
+ this.innerProperties().withAadTenantId(aadTenantId);
return this;
}
/**
- * Get the reportedProperties property: Properties reported by cluster agent.
+ * Get the desiredProperties property: Desired properties of the cluster.
*
- * @return the reportedProperties value.
+ * @return the desiredProperties value.
*/
- public ClusterReportedProperties reportedProperties() {
- return this.reportedProperties;
+ public ClusterDesiredProperties desiredProperties() {
+ return this.innerProperties() == null ? null : this.innerProperties().desiredProperties();
}
/**
- * Set the reportedProperties property: Properties reported by cluster agent.
+ * Set the desiredProperties property: Desired properties of the cluster.
*
- * @param reportedProperties the reportedProperties value to set.
+ * @param desiredProperties the desiredProperties value to set.
* @return the ClusterInner object itself.
*/
- public ClusterInner withReportedProperties(ClusterReportedProperties reportedProperties) {
- this.reportedProperties = reportedProperties;
+ public ClusterInner withDesiredProperties(ClusterDesiredProperties desiredProperties) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ClusterProperties();
+ }
+ this.innerProperties().withDesiredProperties(desiredProperties);
return this;
}
+ /**
+ * Get the reportedProperties property: Properties reported by cluster agent.
+ *
+ * @return the reportedProperties value.
+ */
+ public ClusterReportedProperties reportedProperties() {
+ return this.innerProperties() == null ? null : this.innerProperties().reportedProperties();
+ }
+
/**
* Get the trialDaysRemaining property: Number of days remaining in the trial period.
*
* @return the trialDaysRemaining value.
*/
public Float trialDaysRemaining() {
- return this.trialDaysRemaining;
+ return this.innerProperties() == null ? null : this.innerProperties().trialDaysRemaining();
}
/**
@@ -227,7 +205,7 @@ public Float trialDaysRemaining() {
* @return the billingModel value.
*/
public String billingModel() {
- return this.billingModel;
+ return this.innerProperties() == null ? null : this.innerProperties().billingModel();
}
/**
@@ -236,7 +214,7 @@ public String billingModel() {
* @return the registrationTimestamp value.
*/
public OffsetDateTime registrationTimestamp() {
- return this.registrationTimestamp;
+ return this.innerProperties() == null ? null : this.innerProperties().registrationTimestamp();
}
/**
@@ -245,7 +223,7 @@ public OffsetDateTime registrationTimestamp() {
* @return the lastSyncTimestamp value.
*/
public OffsetDateTime lastSyncTimestamp() {
- return this.lastSyncTimestamp;
+ return this.innerProperties() == null ? null : this.innerProperties().lastSyncTimestamp();
}
/**
@@ -254,141 +232,7 @@ public OffsetDateTime lastSyncTimestamp() {
* @return the lastBillingTimestamp value.
*/
public OffsetDateTime lastBillingTimestamp() {
- return this.lastBillingTimestamp;
- }
-
- /**
- * Get the createdBy property: The identity that created the resource.
- *
- * @return the createdBy value.
- */
- public String createdBy() {
- return this.createdBy;
- }
-
- /**
- * Set the createdBy property: The identity that created the resource.
- *
- * @param createdBy the createdBy value to set.
- * @return the ClusterInner object itself.
- */
- public ClusterInner withCreatedBy(String createdBy) {
- this.createdBy = createdBy;
- return this;
- }
-
- /**
- * Get the createdByType property: The type of identity that created the resource.
- *
- * @return the createdByType value.
- */
- public CreatedByType createdByType() {
- return this.createdByType;
- }
-
- /**
- * Set the createdByType property: The type of identity that created the resource.
- *
- * @param createdByType the createdByType value to set.
- * @return the ClusterInner object itself.
- */
- public ClusterInner withCreatedByType(CreatedByType createdByType) {
- this.createdByType = createdByType;
- return this;
- }
-
- /**
- * Get the createdAt property: The timestamp of resource creation (UTC).
- *
- * @return the createdAt value.
- */
- public OffsetDateTime createdAt() {
- return this.createdAt;
- }
-
- /**
- * Set the createdAt property: The timestamp of resource creation (UTC).
- *
- * @param createdAt the createdAt value to set.
- * @return the ClusterInner object itself.
- */
- public ClusterInner withCreatedAt(OffsetDateTime createdAt) {
- this.createdAt = createdAt;
- return this;
- }
-
- /**
- * Get the lastModifiedBy property: The identity that last modified the resource.
- *
- * @return the lastModifiedBy value.
- */
- public String lastModifiedBy() {
- return this.lastModifiedBy;
- }
-
- /**
- * Set the lastModifiedBy property: The identity that last modified the resource.
- *
- * @param lastModifiedBy the lastModifiedBy value to set.
- * @return the ClusterInner object itself.
- */
- public ClusterInner withLastModifiedBy(String lastModifiedBy) {
- this.lastModifiedBy = lastModifiedBy;
- return this;
- }
-
- /**
- * Get the lastModifiedByType property: The type of identity that last modified the resource.
- *
- * @return the lastModifiedByType value.
- */
- public CreatedByType lastModifiedByType() {
- return this.lastModifiedByType;
- }
-
- /**
- * Set the lastModifiedByType property: The type of identity that last modified the resource.
- *
- * @param lastModifiedByType the lastModifiedByType value to set.
- * @return the ClusterInner object itself.
- */
- public ClusterInner withLastModifiedByType(CreatedByType lastModifiedByType) {
- this.lastModifiedByType = lastModifiedByType;
- return this;
- }
-
- /**
- * Get the lastModifiedAt property: The timestamp of resource last modification (UTC).
- *
- * @return the lastModifiedAt value.
- */
- public OffsetDateTime lastModifiedAt() {
- return this.lastModifiedAt;
- }
-
- /**
- * Set the lastModifiedAt property: The timestamp of resource last modification (UTC).
- *
- * @param lastModifiedAt the lastModifiedAt value to set.
- * @return the ClusterInner object itself.
- */
- public ClusterInner withLastModifiedAt(OffsetDateTime lastModifiedAt) {
- this.lastModifiedAt = lastModifiedAt;
- return this;
- }
-
- /** {@inheritDoc} */
- @Override
- public ClusterInner withLocation(String location) {
- super.withLocation(location);
- return this;
- }
-
- /** {@inheritDoc} */
- @Override
- public ClusterInner withTags(Map tags) {
- super.withTags(tags);
- return this;
+ return this.innerProperties() == null ? null : this.innerProperties().lastBillingTimestamp();
}
/**
@@ -397,8 +241,8 @@ public ClusterInner withTags(Map tags) {
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
- if (reportedProperties() != null) {
- reportedProperties().validate();
+ if (innerProperties() != null) {
+ innerProperties().validate();
}
}
}
diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ClusterPatchProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ClusterPatchProperties.java
new file mode 100644
index 0000000000000..170d36a4d2b3a
--- /dev/null
+++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ClusterPatchProperties.java
@@ -0,0 +1,128 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurestackhci.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.resourcemanager.azurestackhci.models.ClusterDesiredProperties;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Cluster properties. */
+@Fluent
+public final class ClusterPatchProperties {
+ /*
+ * Endpoint configured for management from the Azure portal
+ */
+ @JsonProperty(value = "cloudManagementEndpoint")
+ private String cloudManagementEndpoint;
+
+ /*
+ * App id of cluster AAD identity.
+ */
+ @JsonProperty(value = "aadClientId")
+ private String aadClientId;
+
+ /*
+ * Tenant id of cluster AAD identity.
+ */
+ @JsonProperty(value = "aadTenantId")
+ private String aadTenantId;
+
+ /*
+ * Desired properties of the cluster.
+ */
+ @JsonProperty(value = "desiredProperties")
+ private ClusterDesiredProperties desiredProperties;
+
+ /**
+ * Get the cloudManagementEndpoint property: Endpoint configured for management from the Azure portal.
+ *
+ * @return the cloudManagementEndpoint value.
+ */
+ public String cloudManagementEndpoint() {
+ return this.cloudManagementEndpoint;
+ }
+
+ /**
+ * Set the cloudManagementEndpoint property: Endpoint configured for management from the Azure portal.
+ *
+ * @param cloudManagementEndpoint the cloudManagementEndpoint value to set.
+ * @return the ClusterPatchProperties object itself.
+ */
+ public ClusterPatchProperties withCloudManagementEndpoint(String cloudManagementEndpoint) {
+ this.cloudManagementEndpoint = cloudManagementEndpoint;
+ return this;
+ }
+
+ /**
+ * Get the aadClientId property: App id of cluster AAD identity.
+ *
+ * @return the aadClientId value.
+ */
+ public String aadClientId() {
+ return this.aadClientId;
+ }
+
+ /**
+ * Set the aadClientId property: App id of cluster AAD identity.
+ *
+ * @param aadClientId the aadClientId value to set.
+ * @return the ClusterPatchProperties object itself.
+ */
+ public ClusterPatchProperties withAadClientId(String aadClientId) {
+ this.aadClientId = aadClientId;
+ return this;
+ }
+
+ /**
+ * Get the aadTenantId property: Tenant id of cluster AAD identity.
+ *
+ * @return the aadTenantId value.
+ */
+ public String aadTenantId() {
+ return this.aadTenantId;
+ }
+
+ /**
+ * Set the aadTenantId property: Tenant id of cluster AAD identity.
+ *
+ * @param aadTenantId the aadTenantId value to set.
+ * @return the ClusterPatchProperties object itself.
+ */
+ public ClusterPatchProperties withAadTenantId(String aadTenantId) {
+ this.aadTenantId = aadTenantId;
+ return this;
+ }
+
+ /**
+ * Get the desiredProperties property: Desired properties of the cluster.
+ *
+ * @return the desiredProperties value.
+ */
+ public ClusterDesiredProperties desiredProperties() {
+ return this.desiredProperties;
+ }
+
+ /**
+ * Set the desiredProperties property: Desired properties of the cluster.
+ *
+ * @param desiredProperties the desiredProperties value to set.
+ * @return the ClusterPatchProperties object itself.
+ */
+ public ClusterPatchProperties withDesiredProperties(ClusterDesiredProperties desiredProperties) {
+ this.desiredProperties = desiredProperties;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (desiredProperties() != null) {
+ desiredProperties().validate();
+ }
+ }
+}
diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ClusterProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ClusterProperties.java
new file mode 100644
index 0000000000000..e3879a66753a0
--- /dev/null
+++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ClusterProperties.java
@@ -0,0 +1,283 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurestackhci.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.azurestackhci.models.ClusterDesiredProperties;
+import com.azure.resourcemanager.azurestackhci.models.ClusterReportedProperties;
+import com.azure.resourcemanager.azurestackhci.models.ProvisioningState;
+import com.azure.resourcemanager.azurestackhci.models.Status;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.time.OffsetDateTime;
+
+/** Cluster properties. */
+@Fluent
+public final class ClusterProperties {
+ /*
+ * Provisioning state.
+ */
+ @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY)
+ private ProvisioningState provisioningState;
+
+ /*
+ * Status of the cluster agent.
+ */
+ @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY)
+ private Status status;
+
+ /*
+ * Unique, immutable resource id.
+ */
+ @JsonProperty(value = "cloudId", access = JsonProperty.Access.WRITE_ONLY)
+ private String cloudId;
+
+ /*
+ * Endpoint configured for management from the Azure portal.
+ */
+ @JsonProperty(value = "cloudManagementEndpoint")
+ private String cloudManagementEndpoint;
+
+ /*
+ * App id of cluster AAD identity.
+ */
+ @JsonProperty(value = "aadClientId", required = true)
+ private String aadClientId;
+
+ /*
+ * Tenant id of cluster AAD identity.
+ */
+ @JsonProperty(value = "aadTenantId", required = true)
+ private String aadTenantId;
+
+ /*
+ * Desired properties of the cluster.
+ */
+ @JsonProperty(value = "desiredProperties")
+ private ClusterDesiredProperties desiredProperties;
+
+ /*
+ * Properties reported by cluster agent.
+ */
+ @JsonProperty(value = "reportedProperties", access = JsonProperty.Access.WRITE_ONLY)
+ private ClusterReportedProperties reportedProperties;
+
+ /*
+ * Number of days remaining in the trial period.
+ */
+ @JsonProperty(value = "trialDaysRemaining", access = JsonProperty.Access.WRITE_ONLY)
+ private Float trialDaysRemaining;
+
+ /*
+ * Type of billing applied to the resource.
+ */
+ @JsonProperty(value = "billingModel", access = JsonProperty.Access.WRITE_ONLY)
+ private String billingModel;
+
+ /*
+ * First cluster sync timestamp.
+ */
+ @JsonProperty(value = "registrationTimestamp", access = JsonProperty.Access.WRITE_ONLY)
+ private OffsetDateTime registrationTimestamp;
+
+ /*
+ * Most recent cluster sync timestamp.
+ */
+ @JsonProperty(value = "lastSyncTimestamp", access = JsonProperty.Access.WRITE_ONLY)
+ private OffsetDateTime lastSyncTimestamp;
+
+ /*
+ * Most recent billing meter timestamp.
+ */
+ @JsonProperty(value = "lastBillingTimestamp", access = JsonProperty.Access.WRITE_ONLY)
+ private OffsetDateTime lastBillingTimestamp;
+
+ /**
+ * Get the provisioningState property: Provisioning state.
+ *
+ * @return the provisioningState value.
+ */
+ public ProvisioningState provisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * Get the status property: Status of the cluster agent.
+ *
+ * @return the status value.
+ */
+ public Status status() {
+ return this.status;
+ }
+
+ /**
+ * Get the cloudId property: Unique, immutable resource id.
+ *
+ * @return the cloudId value.
+ */
+ public String cloudId() {
+ return this.cloudId;
+ }
+
+ /**
+ * Get the cloudManagementEndpoint property: Endpoint configured for management from the Azure portal.
+ *
+ * @return the cloudManagementEndpoint value.
+ */
+ public String cloudManagementEndpoint() {
+ return this.cloudManagementEndpoint;
+ }
+
+ /**
+ * Set the cloudManagementEndpoint property: Endpoint configured for management from the Azure portal.
+ *
+ * @param cloudManagementEndpoint the cloudManagementEndpoint value to set.
+ * @return the ClusterProperties object itself.
+ */
+ public ClusterProperties withCloudManagementEndpoint(String cloudManagementEndpoint) {
+ this.cloudManagementEndpoint = cloudManagementEndpoint;
+ return this;
+ }
+
+ /**
+ * Get the aadClientId property: App id of cluster AAD identity.
+ *
+ * @return the aadClientId value.
+ */
+ public String aadClientId() {
+ return this.aadClientId;
+ }
+
+ /**
+ * Set the aadClientId property: App id of cluster AAD identity.
+ *
+ * @param aadClientId the aadClientId value to set.
+ * @return the ClusterProperties object itself.
+ */
+ public ClusterProperties withAadClientId(String aadClientId) {
+ this.aadClientId = aadClientId;
+ return this;
+ }
+
+ /**
+ * Get the aadTenantId property: Tenant id of cluster AAD identity.
+ *
+ * @return the aadTenantId value.
+ */
+ public String aadTenantId() {
+ return this.aadTenantId;
+ }
+
+ /**
+ * Set the aadTenantId property: Tenant id of cluster AAD identity.
+ *
+ * @param aadTenantId the aadTenantId value to set.
+ * @return the ClusterProperties object itself.
+ */
+ public ClusterProperties withAadTenantId(String aadTenantId) {
+ this.aadTenantId = aadTenantId;
+ return this;
+ }
+
+ /**
+ * Get the desiredProperties property: Desired properties of the cluster.
+ *
+ * @return the desiredProperties value.
+ */
+ public ClusterDesiredProperties desiredProperties() {
+ return this.desiredProperties;
+ }
+
+ /**
+ * Set the desiredProperties property: Desired properties of the cluster.
+ *
+ * @param desiredProperties the desiredProperties value to set.
+ * @return the ClusterProperties object itself.
+ */
+ public ClusterProperties withDesiredProperties(ClusterDesiredProperties desiredProperties) {
+ this.desiredProperties = desiredProperties;
+ return this;
+ }
+
+ /**
+ * Get the reportedProperties property: Properties reported by cluster agent.
+ *
+ * @return the reportedProperties value.
+ */
+ public ClusterReportedProperties reportedProperties() {
+ return this.reportedProperties;
+ }
+
+ /**
+ * Get the trialDaysRemaining property: Number of days remaining in the trial period.
+ *
+ * @return the trialDaysRemaining value.
+ */
+ public Float trialDaysRemaining() {
+ return this.trialDaysRemaining;
+ }
+
+ /**
+ * Get the billingModel property: Type of billing applied to the resource.
+ *
+ * @return the billingModel value.
+ */
+ public String billingModel() {
+ return this.billingModel;
+ }
+
+ /**
+ * Get the registrationTimestamp property: First cluster sync timestamp.
+ *
+ * @return the registrationTimestamp value.
+ */
+ public OffsetDateTime registrationTimestamp() {
+ return this.registrationTimestamp;
+ }
+
+ /**
+ * Get the lastSyncTimestamp property: Most recent cluster sync timestamp.
+ *
+ * @return the lastSyncTimestamp value.
+ */
+ public OffsetDateTime lastSyncTimestamp() {
+ return this.lastSyncTimestamp;
+ }
+
+ /**
+ * Get the lastBillingTimestamp property: Most recent billing meter timestamp.
+ *
+ * @return the lastBillingTimestamp value.
+ */
+ public OffsetDateTime lastBillingTimestamp() {
+ return this.lastBillingTimestamp;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (aadClientId() == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException("Missing required property aadClientId in model ClusterProperties"));
+ }
+ if (aadTenantId() == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException("Missing required property aadTenantId in model ClusterProperties"));
+ }
+ if (desiredProperties() != null) {
+ desiredProperties().validate();
+ }
+ if (reportedProperties() != null) {
+ reportedProperties().validate();
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(ClusterProperties.class);
+}
diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ExtensionInner.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ExtensionInner.java
new file mode 100644
index 0000000000000..9205d0220d133
--- /dev/null
+++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ExtensionInner.java
@@ -0,0 +1,253 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurestackhci.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.management.SystemData;
+import com.azure.resourcemanager.azurestackhci.models.ExtensionAggregateState;
+import com.azure.resourcemanager.azurestackhci.models.PerNodeExtensionState;
+import com.azure.resourcemanager.azurestackhci.models.ProvisioningState;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** Details of a particular extension in HCI Cluster. */
+@Fluent
+public final class ExtensionInner extends ProxyResource {
+ /*
+ * System data of Extension resource.
+ */
+ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
+ private SystemData innerSystemData;
+
+ /*
+ * Describes Machine Extension Properties.
+ */
+ @JsonProperty(value = "properties")
+ private ExtensionProperties innerProperties;
+
+ /**
+ * Get the innerSystemData property: System data of Extension resource.
+ *
+ * @return the innerSystemData value.
+ */
+ private SystemData innerSystemData() {
+ return this.innerSystemData;
+ }
+
+ /**
+ * Get the innerProperties property: Describes Machine Extension Properties.
+ *
+ * @return the innerProperties value.
+ */
+ private ExtensionProperties innerProperties() {
+ return this.innerProperties;
+ }
+
+ /**
+ * Get the provisioningState property: Provisioning state of the Extension proxy resource.
+ *
+ * @return the provisioningState value.
+ */
+ public ProvisioningState provisioningState() {
+ return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
+ }
+
+ /**
+ * Get the aggregateState property: Aggregate state of Arc Extensions across the nodes in this HCI cluster.
+ *
+ * @return the aggregateState value.
+ */
+ public ExtensionAggregateState aggregateState() {
+ return this.innerProperties() == null ? null : this.innerProperties().aggregateState();
+ }
+
+ /**
+ * Get the perNodeExtensionDetails property: State of Arc Extension in each of the nodes.
+ *
+ * @return the perNodeExtensionDetails value.
+ */
+ public List perNodeExtensionDetails() {
+ return this.innerProperties() == null ? null : this.innerProperties().perNodeExtensionDetails();
+ }
+
+ /**
+ * Get the forceUpdateTag property: How the extension handler should be forced to update even if the extension
+ * configuration has not changed.
+ *
+ * @return the forceUpdateTag value.
+ */
+ public String forceUpdateTag() {
+ return this.innerProperties() == null ? null : this.innerProperties().forceUpdateTag();
+ }
+
+ /**
+ * Set the forceUpdateTag property: How the extension handler should be forced to update even if the extension
+ * configuration has not changed.
+ *
+ * @param forceUpdateTag the forceUpdateTag value to set.
+ * @return the ExtensionInner object itself.
+ */
+ public ExtensionInner withForceUpdateTag(String forceUpdateTag) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ExtensionProperties();
+ }
+ this.innerProperties().withForceUpdateTag(forceUpdateTag);
+ return this;
+ }
+
+ /**
+ * Get the publisher property: The name of the extension handler publisher.
+ *
+ * @return the publisher value.
+ */
+ public String publisher() {
+ return this.innerProperties() == null ? null : this.innerProperties().publisher();
+ }
+
+ /**
+ * Set the publisher property: The name of the extension handler publisher.
+ *
+ * @param publisher the publisher value to set.
+ * @return the ExtensionInner object itself.
+ */
+ public ExtensionInner withPublisher(String publisher) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ExtensionProperties();
+ }
+ this.innerProperties().withPublisher(publisher);
+ return this;
+ }
+
+ /**
+ * Get the type property: Specifies the type of the extension; an example is "CustomScriptExtension".
+ *
+ * @return the type value.
+ */
+ public String typePropertiesType() {
+ return this.innerProperties() == null ? null : this.innerProperties().type();
+ }
+
+ /**
+ * Set the type property: Specifies the type of the extension; an example is "CustomScriptExtension".
+ *
+ * @param type the type value to set.
+ * @return the ExtensionInner object itself.
+ */
+ public ExtensionInner withTypePropertiesType(String type) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ExtensionProperties();
+ }
+ this.innerProperties().withType(type);
+ return this;
+ }
+
+ /**
+ * Get the typeHandlerVersion property: Specifies the version of the script handler.
+ *
+ * @return the typeHandlerVersion value.
+ */
+ public String typeHandlerVersion() {
+ return this.innerProperties() == null ? null : this.innerProperties().typeHandlerVersion();
+ }
+
+ /**
+ * Set the typeHandlerVersion property: Specifies the version of the script handler.
+ *
+ * @param typeHandlerVersion the typeHandlerVersion value to set.
+ * @return the ExtensionInner object itself.
+ */
+ public ExtensionInner withTypeHandlerVersion(String typeHandlerVersion) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ExtensionProperties();
+ }
+ this.innerProperties().withTypeHandlerVersion(typeHandlerVersion);
+ return this;
+ }
+
+ /**
+ * Get the autoUpgradeMinorVersion property: Indicates whether the extension should use a newer minor version if one
+ * is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless
+ * redeployed, even with this property set to true.
+ *
+ * @return the autoUpgradeMinorVersion value.
+ */
+ public Boolean autoUpgradeMinorVersion() {
+ return this.innerProperties() == null ? null : this.innerProperties().autoUpgradeMinorVersion();
+ }
+
+ /**
+ * Set the autoUpgradeMinorVersion property: Indicates whether the extension should use a newer minor version if one
+ * is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless
+ * redeployed, even with this property set to true.
+ *
+ * @param autoUpgradeMinorVersion the autoUpgradeMinorVersion value to set.
+ * @return the ExtensionInner object itself.
+ */
+ public ExtensionInner withAutoUpgradeMinorVersion(Boolean autoUpgradeMinorVersion) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ExtensionProperties();
+ }
+ this.innerProperties().withAutoUpgradeMinorVersion(autoUpgradeMinorVersion);
+ return this;
+ }
+
+ /**
+ * Get the settings property: Json formatted public settings for the extension.
+ *
+ * @return the settings value.
+ */
+ public Object settings() {
+ return this.innerProperties() == null ? null : this.innerProperties().settings();
+ }
+
+ /**
+ * Set the settings property: Json formatted public settings for the extension.
+ *
+ * @param settings the settings value to set.
+ * @return the ExtensionInner object itself.
+ */
+ public ExtensionInner withSettings(Object settings) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ExtensionProperties();
+ }
+ this.innerProperties().withSettings(settings);
+ return this;
+ }
+
+ /**
+ * Get the protectedSettings property: Protected settings (may contain secrets).
+ *
+ * @return the protectedSettings value.
+ */
+ public Object protectedSettings() {
+ return this.innerProperties() == null ? null : this.innerProperties().protectedSettings();
+ }
+
+ /**
+ * Set the protectedSettings property: Protected settings (may contain secrets).
+ *
+ * @param protectedSettings the protectedSettings value to set.
+ * @return the ExtensionInner object itself.
+ */
+ public ExtensionInner withProtectedSettings(Object protectedSettings) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ExtensionProperties();
+ }
+ this.innerProperties().withProtectedSettings(protectedSettings);
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
+ }
+}
diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ExtensionParameters.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ExtensionParameters.java
new file mode 100644
index 0000000000000..52eea9ddbd4ae
--- /dev/null
+++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ExtensionParameters.java
@@ -0,0 +1,213 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurestackhci.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Describes the properties of a Machine Extension. This object mirrors the definition in HybridCompute. */
+@Fluent
+public final class ExtensionParameters {
+ /*
+ * How the extension handler should be forced to update even if the
+ * extension configuration has not changed.
+ */
+ @JsonProperty(value = "forceUpdateTag")
+ private String forceUpdateTag;
+
+ /*
+ * The name of the extension handler publisher.
+ */
+ @JsonProperty(value = "publisher")
+ private String publisher;
+
+ /*
+ * Specifies the type of the extension; an example is
+ * "CustomScriptExtension".
+ */
+ @JsonProperty(value = "type")
+ private String type;
+
+ /*
+ * Specifies the version of the script handler.
+ */
+ @JsonProperty(value = "typeHandlerVersion")
+ private String typeHandlerVersion;
+
+ /*
+ * Indicates whether the extension should use a newer minor version if one
+ * is available at deployment time. Once deployed, however, the extension
+ * will not upgrade minor versions unless redeployed, even with this
+ * property set to true.
+ */
+ @JsonProperty(value = "autoUpgradeMinorVersion")
+ private Boolean autoUpgradeMinorVersion;
+
+ /*
+ * Json formatted public settings for the extension.
+ */
+ @JsonProperty(value = "settings")
+ private Object settings;
+
+ /*
+ * Protected settings (may contain secrets).
+ */
+ @JsonProperty(value = "protectedSettings")
+ private Object protectedSettings;
+
+ /**
+ * Get the forceUpdateTag property: How the extension handler should be forced to update even if the extension
+ * configuration has not changed.
+ *
+ * @return the forceUpdateTag value.
+ */
+ public String forceUpdateTag() {
+ return this.forceUpdateTag;
+ }
+
+ /**
+ * Set the forceUpdateTag property: How the extension handler should be forced to update even if the extension
+ * configuration has not changed.
+ *
+ * @param forceUpdateTag the forceUpdateTag value to set.
+ * @return the ExtensionParameters object itself.
+ */
+ public ExtensionParameters withForceUpdateTag(String forceUpdateTag) {
+ this.forceUpdateTag = forceUpdateTag;
+ return this;
+ }
+
+ /**
+ * Get the publisher property: The name of the extension handler publisher.
+ *
+ * @return the publisher value.
+ */
+ public String publisher() {
+ return this.publisher;
+ }
+
+ /**
+ * Set the publisher property: The name of the extension handler publisher.
+ *
+ * @param publisher the publisher value to set.
+ * @return the ExtensionParameters object itself.
+ */
+ public ExtensionParameters withPublisher(String publisher) {
+ this.publisher = publisher;
+ return this;
+ }
+
+ /**
+ * Get the type property: Specifies the type of the extension; an example is "CustomScriptExtension".
+ *
+ * @return the type value.
+ */
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Set the type property: Specifies the type of the extension; an example is "CustomScriptExtension".
+ *
+ * @param type the type value to set.
+ * @return the ExtensionParameters object itself.
+ */
+ public ExtensionParameters withType(String type) {
+ this.type = type;
+ return this;
+ }
+
+ /**
+ * Get the typeHandlerVersion property: Specifies the version of the script handler.
+ *
+ * @return the typeHandlerVersion value.
+ */
+ public String typeHandlerVersion() {
+ return this.typeHandlerVersion;
+ }
+
+ /**
+ * Set the typeHandlerVersion property: Specifies the version of the script handler.
+ *
+ * @param typeHandlerVersion the typeHandlerVersion value to set.
+ * @return the ExtensionParameters object itself.
+ */
+ public ExtensionParameters withTypeHandlerVersion(String typeHandlerVersion) {
+ this.typeHandlerVersion = typeHandlerVersion;
+ return this;
+ }
+
+ /**
+ * Get the autoUpgradeMinorVersion property: Indicates whether the extension should use a newer minor version if one
+ * is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless
+ * redeployed, even with this property set to true.
+ *
+ * @return the autoUpgradeMinorVersion value.
+ */
+ public Boolean autoUpgradeMinorVersion() {
+ return this.autoUpgradeMinorVersion;
+ }
+
+ /**
+ * Set the autoUpgradeMinorVersion property: Indicates whether the extension should use a newer minor version if one
+ * is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless
+ * redeployed, even with this property set to true.
+ *
+ * @param autoUpgradeMinorVersion the autoUpgradeMinorVersion value to set.
+ * @return the ExtensionParameters object itself.
+ */
+ public ExtensionParameters withAutoUpgradeMinorVersion(Boolean autoUpgradeMinorVersion) {
+ this.autoUpgradeMinorVersion = autoUpgradeMinorVersion;
+ return this;
+ }
+
+ /**
+ * Get the settings property: Json formatted public settings for the extension.
+ *
+ * @return the settings value.
+ */
+ public Object settings() {
+ return this.settings;
+ }
+
+ /**
+ * Set the settings property: Json formatted public settings for the extension.
+ *
+ * @param settings the settings value to set.
+ * @return the ExtensionParameters object itself.
+ */
+ public ExtensionParameters withSettings(Object settings) {
+ this.settings = settings;
+ return this;
+ }
+
+ /**
+ * Get the protectedSettings property: Protected settings (may contain secrets).
+ *
+ * @return the protectedSettings value.
+ */
+ public Object protectedSettings() {
+ return this.protectedSettings;
+ }
+
+ /**
+ * Set the protectedSettings property: Protected settings (may contain secrets).
+ *
+ * @param protectedSettings the protectedSettings value to set.
+ * @return the ExtensionParameters object itself.
+ */
+ public ExtensionParameters withProtectedSettings(Object protectedSettings) {
+ this.protectedSettings = protectedSettings;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ExtensionProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ExtensionProperties.java
new file mode 100644
index 0000000000000..0a19e3a728d56
--- /dev/null
+++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ExtensionProperties.java
@@ -0,0 +1,259 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurestackhci.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.resourcemanager.azurestackhci.models.ExtensionAggregateState;
+import com.azure.resourcemanager.azurestackhci.models.PerNodeExtensionState;
+import com.azure.resourcemanager.azurestackhci.models.ProvisioningState;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** Status of Arc Extension for a particular node in HCI Cluster. */
+@Fluent
+public final class ExtensionProperties {
+ /*
+ * Provisioning state of the Extension proxy resource.
+ */
+ @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY)
+ private ProvisioningState provisioningState;
+
+ /*
+ * Parameters specific to this extension type.
+ */
+ @JsonProperty(value = "extensionParameters")
+ private ExtensionParameters innerExtensionParameters;
+
+ /*
+ * Aggregate state of Arc Extensions across the nodes in this HCI cluster.
+ */
+ @JsonProperty(value = "aggregateState", access = JsonProperty.Access.WRITE_ONLY)
+ private ExtensionAggregateState aggregateState;
+
+ /*
+ * State of Arc Extension in each of the nodes.
+ */
+ @JsonProperty(value = "perNodeExtensionDetails", access = JsonProperty.Access.WRITE_ONLY)
+ private List perNodeExtensionDetails;
+
+ /**
+ * Get the provisioningState property: Provisioning state of the Extension proxy resource.
+ *
+ * @return the provisioningState value.
+ */
+ public ProvisioningState provisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * Get the innerExtensionParameters property: Parameters specific to this extension type.
+ *
+ * @return the innerExtensionParameters value.
+ */
+ private ExtensionParameters innerExtensionParameters() {
+ return this.innerExtensionParameters;
+ }
+
+ /**
+ * Get the aggregateState property: Aggregate state of Arc Extensions across the nodes in this HCI cluster.
+ *
+ * @return the aggregateState value.
+ */
+ public ExtensionAggregateState aggregateState() {
+ return this.aggregateState;
+ }
+
+ /**
+ * Get the perNodeExtensionDetails property: State of Arc Extension in each of the nodes.
+ *
+ * @return the perNodeExtensionDetails value.
+ */
+ public List perNodeExtensionDetails() {
+ return this.perNodeExtensionDetails;
+ }
+
+ /**
+ * Get the forceUpdateTag property: How the extension handler should be forced to update even if the extension
+ * configuration has not changed.
+ *
+ * @return the forceUpdateTag value.
+ */
+ public String forceUpdateTag() {
+ return this.innerExtensionParameters() == null ? null : this.innerExtensionParameters().forceUpdateTag();
+ }
+
+ /**
+ * Set the forceUpdateTag property: How the extension handler should be forced to update even if the extension
+ * configuration has not changed.
+ *
+ * @param forceUpdateTag the forceUpdateTag value to set.
+ * @return the ExtensionProperties object itself.
+ */
+ public ExtensionProperties withForceUpdateTag(String forceUpdateTag) {
+ if (this.innerExtensionParameters() == null) {
+ this.innerExtensionParameters = new ExtensionParameters();
+ }
+ this.innerExtensionParameters().withForceUpdateTag(forceUpdateTag);
+ return this;
+ }
+
+ /**
+ * Get the publisher property: The name of the extension handler publisher.
+ *
+ * @return the publisher value.
+ */
+ public String publisher() {
+ return this.innerExtensionParameters() == null ? null : this.innerExtensionParameters().publisher();
+ }
+
+ /**
+ * Set the publisher property: The name of the extension handler publisher.
+ *
+ * @param publisher the publisher value to set.
+ * @return the ExtensionProperties object itself.
+ */
+ public ExtensionProperties withPublisher(String publisher) {
+ if (this.innerExtensionParameters() == null) {
+ this.innerExtensionParameters = new ExtensionParameters();
+ }
+ this.innerExtensionParameters().withPublisher(publisher);
+ return this;
+ }
+
+ /**
+ * Get the type property: Specifies the type of the extension; an example is "CustomScriptExtension".
+ *
+ * @return the type value.
+ */
+ public String type() {
+ return this.innerExtensionParameters() == null ? null : this.innerExtensionParameters().type();
+ }
+
+ /**
+ * Set the type property: Specifies the type of the extension; an example is "CustomScriptExtension".
+ *
+ * @param type the type value to set.
+ * @return the ExtensionProperties object itself.
+ */
+ public ExtensionProperties withType(String type) {
+ if (this.innerExtensionParameters() == null) {
+ this.innerExtensionParameters = new ExtensionParameters();
+ }
+ this.innerExtensionParameters().withType(type);
+ return this;
+ }
+
+ /**
+ * Get the typeHandlerVersion property: Specifies the version of the script handler.
+ *
+ * @return the typeHandlerVersion value.
+ */
+ public String typeHandlerVersion() {
+ return this.innerExtensionParameters() == null ? null : this.innerExtensionParameters().typeHandlerVersion();
+ }
+
+ /**
+ * Set the typeHandlerVersion property: Specifies the version of the script handler.
+ *
+ * @param typeHandlerVersion the typeHandlerVersion value to set.
+ * @return the ExtensionProperties object itself.
+ */
+ public ExtensionProperties withTypeHandlerVersion(String typeHandlerVersion) {
+ if (this.innerExtensionParameters() == null) {
+ this.innerExtensionParameters = new ExtensionParameters();
+ }
+ this.innerExtensionParameters().withTypeHandlerVersion(typeHandlerVersion);
+ return this;
+ }
+
+ /**
+ * Get the autoUpgradeMinorVersion property: Indicates whether the extension should use a newer minor version if one
+ * is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless
+ * redeployed, even with this property set to true.
+ *
+ * @return the autoUpgradeMinorVersion value.
+ */
+ public Boolean autoUpgradeMinorVersion() {
+ return this.innerExtensionParameters() == null
+ ? null
+ : this.innerExtensionParameters().autoUpgradeMinorVersion();
+ }
+
+ /**
+ * Set the autoUpgradeMinorVersion property: Indicates whether the extension should use a newer minor version if one
+ * is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless
+ * redeployed, even with this property set to true.
+ *
+ * @param autoUpgradeMinorVersion the autoUpgradeMinorVersion value to set.
+ * @return the ExtensionProperties object itself.
+ */
+ public ExtensionProperties withAutoUpgradeMinorVersion(Boolean autoUpgradeMinorVersion) {
+ if (this.innerExtensionParameters() == null) {
+ this.innerExtensionParameters = new ExtensionParameters();
+ }
+ this.innerExtensionParameters().withAutoUpgradeMinorVersion(autoUpgradeMinorVersion);
+ return this;
+ }
+
+ /**
+ * Get the settings property: Json formatted public settings for the extension.
+ *
+ * @return the settings value.
+ */
+ public Object settings() {
+ return this.innerExtensionParameters() == null ? null : this.innerExtensionParameters().settings();
+ }
+
+ /**
+ * Set the settings property: Json formatted public settings for the extension.
+ *
+ * @param settings the settings value to set.
+ * @return the ExtensionProperties object itself.
+ */
+ public ExtensionProperties withSettings(Object settings) {
+ if (this.innerExtensionParameters() == null) {
+ this.innerExtensionParameters = new ExtensionParameters();
+ }
+ this.innerExtensionParameters().withSettings(settings);
+ return this;
+ }
+
+ /**
+ * Get the protectedSettings property: Protected settings (may contain secrets).
+ *
+ * @return the protectedSettings value.
+ */
+ public Object protectedSettings() {
+ return this.innerExtensionParameters() == null ? null : this.innerExtensionParameters().protectedSettings();
+ }
+
+ /**
+ * Set the protectedSettings property: Protected settings (may contain secrets).
+ *
+ * @param protectedSettings the protectedSettings value to set.
+ * @return the ExtensionProperties object itself.
+ */
+ public ExtensionProperties withProtectedSettings(Object protectedSettings) {
+ if (this.innerExtensionParameters() == null) {
+ this.innerExtensionParameters = new ExtensionParameters();
+ }
+ this.innerExtensionParameters().withProtectedSettings(protectedSettings);
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (innerExtensionParameters() != null) {
+ innerExtensionParameters().validate();
+ }
+ if (perNodeExtensionDetails() != null) {
+ perNodeExtensionDetails().forEach(e -> e.validate());
+ }
+ }
+}
diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/OperationListResultInner.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/OperationListResultInner.java
new file mode 100644
index 0000000000000..cd70af853a48e
--- /dev/null
+++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/OperationListResultInner.java
@@ -0,0 +1,58 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurestackhci.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.resourcemanager.azurestackhci.models.Operation;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/**
+ * A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of
+ * results.
+ */
+@Immutable
+public final class OperationListResultInner {
+ /*
+ * List of operations supported by the resource provider
+ */
+ @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY)
+ private List value;
+
+ /*
+ * URL to get the next set of operation list results (if there are any).
+ */
+ @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY)
+ private String nextLink;
+
+ /**
+ * Get the value property: List of operations supported by the resource provider.
+ *
+ * @return the value value.
+ */
+ public List value() {
+ return this.value;
+ }
+
+ /**
+ * Get the nextLink property: URL to get the next set of operation list results (if there are any).
+ *
+ * @return the nextLink value.
+ */
+ public String nextLink() {
+ return this.nextLink;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (value() != null) {
+ value().forEach(e -> e.validate());
+ }
+ }
+}
diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ArcSettingImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ArcSettingImpl.java
new file mode 100644
index 0000000000000..0248095fc27cd
--- /dev/null
+++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ArcSettingImpl.java
@@ -0,0 +1,130 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurestackhci.implementation;
+
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.azurestackhci.fluent.models.ArcSettingInner;
+import com.azure.resourcemanager.azurestackhci.models.ArcSetting;
+import com.azure.resourcemanager.azurestackhci.models.ArcSettingAggregateState;
+import com.azure.resourcemanager.azurestackhci.models.PerNodeState;
+import com.azure.resourcemanager.azurestackhci.models.ProvisioningState;
+import java.util.Collections;
+import java.util.List;
+
+public final class ArcSettingImpl implements ArcSetting, ArcSetting.Definition {
+ private ArcSettingInner innerObject;
+
+ private final com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager;
+
+ ArcSettingImpl(
+ ArcSettingInner innerObject, com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
+ public ProvisioningState provisioningState() {
+ return this.innerModel().provisioningState();
+ }
+
+ public String arcInstanceResourceGroup() {
+ return this.innerModel().arcInstanceResourceGroup();
+ }
+
+ public ArcSettingAggregateState aggregateState() {
+ return this.innerModel().aggregateState();
+ }
+
+ public List perNodeDetails() {
+ List inner = this.innerModel().perNodeDetails();
+ if (inner != null) {
+ return Collections.unmodifiableList(inner);
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public ArcSettingInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager() {
+ return this.serviceManager;
+ }
+
+ private String resourceGroupName;
+
+ private String clusterName;
+
+ private String arcSettingName;
+
+ public ArcSettingImpl withExistingCluster(String resourceGroupName, String clusterName) {
+ this.resourceGroupName = resourceGroupName;
+ this.clusterName = clusterName;
+ return this;
+ }
+
+ public ArcSetting create() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getArcSettings()
+ .createWithResponse(resourceGroupName, clusterName, arcSettingName, this.innerModel(), Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public ArcSetting create(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getArcSettings()
+ .createWithResponse(resourceGroupName, clusterName, arcSettingName, this.innerModel(), context)
+ .getValue();
+ return this;
+ }
+
+ ArcSettingImpl(String name, com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) {
+ this.innerObject = new ArcSettingInner();
+ this.serviceManager = serviceManager;
+ this.arcSettingName = name;
+ }
+
+ public ArcSetting refresh() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getArcSettings()
+ .getWithResponse(resourceGroupName, clusterName, arcSettingName, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public ArcSetting refresh(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getArcSettings()
+ .getWithResponse(resourceGroupName, clusterName, arcSettingName, context)
+ .getValue();
+ return this;
+ }
+
+ public ArcSettingImpl withArcInstanceResourceGroup(String arcInstanceResourceGroup) {
+ this.innerModel().withArcInstanceResourceGroup(arcInstanceResourceGroup);
+ return this;
+ }
+}
diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ArcSettingsClientImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ArcSettingsClientImpl.java
new file mode 100644
index 0000000000000..e20bce03155d2
--- /dev/null
+++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ArcSettingsClientImpl.java
@@ -0,0 +1,1000 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurestackhci.implementation;
+
+import com.azure.core.annotation.BodyParam;
+import com.azure.core.annotation.Delete;
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.Put;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.core.util.polling.PollerFlux;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.azurestackhci.fluent.ArcSettingsClient;
+import com.azure.resourcemanager.azurestackhci.fluent.models.ArcSettingInner;
+import com.azure.resourcemanager.azurestackhci.models.ArcSettingList;
+import java.nio.ByteBuffer;
+import reactor.core.publisher.Flux;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in ArcSettingsClient. */
+public final class ArcSettingsClientImpl implements ArcSettingsClient {
+ /** The proxy service used to perform REST calls. */
+ private final ArcSettingsService service;
+
+ /** The service client containing this operation class. */
+ private final AzureStackHciClientImpl client;
+
+ /**
+ * Initializes an instance of ArcSettingsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ ArcSettingsClientImpl(AzureStackHciClientImpl client) {
+ this.service =
+ RestProxy.create(ArcSettingsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for AzureStackHciClientArcSettings to be used by the proxy service to
+ * perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "AzureStackHciClientA")
+ private interface ArcSettingsService {
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI"
+ + "/clusters/{clusterName}/arcSettings")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByCluster(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("clusterName") String clusterName,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI"
+ + "/clusters/{clusterName}/arcSettings/{arcSettingName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> get(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("clusterName") String clusterName,
+ @PathParam("arcSettingName") String arcSettingName,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Put(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI"
+ + "/clusters/{clusterName}/arcSettings/{arcSettingName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> create(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("clusterName") String clusterName,
+ @PathParam("arcSettingName") String arcSettingName,
+ @QueryParam("api-version") String apiVersion,
+ @BodyParam("application/json") ArcSettingInner arcSetting,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Delete(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI"
+ + "/clusters/{clusterName}/arcSettings/{arcSettingName}")
+ @ExpectedResponses({200, 202, 204})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> delete(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("clusterName") String clusterName,
+ @PathParam("arcSettingName") String arcSettingName,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("{nextLink}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByClusterNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * Get ArcSetting resources of HCI Cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return arcSetting resources of HCI Cluster along with {@link PagedResponse} on successful completion of {@link
+ * Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByClusterSinglePageAsync(
+ String resourceGroupName, String clusterName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (clusterName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .listByCluster(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ clusterName,
+ this.client.getApiVersion(),
+ accept,
+ context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get ArcSetting resources of HCI Cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return arcSetting resources of HCI Cluster along with {@link PagedResponse} on successful completion of {@link
+ * Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByClusterSinglePageAsync(
+ String resourceGroupName, String clusterName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (clusterName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listByCluster(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ clusterName,
+ this.client.getApiVersion(),
+ accept,
+ context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * Get ArcSetting resources of HCI Cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return arcSetting resources of HCI Cluster as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByClusterAsync(String resourceGroupName, String clusterName) {
+ return new PagedFlux<>(
+ () -> listByClusterSinglePageAsync(resourceGroupName, clusterName),
+ nextLink -> listByClusterNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Get ArcSetting resources of HCI Cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return arcSetting resources of HCI Cluster as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByClusterAsync(
+ String resourceGroupName, String clusterName, Context context) {
+ return new PagedFlux<>(
+ () -> listByClusterSinglePageAsync(resourceGroupName, clusterName, context),
+ nextLink -> listByClusterNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * Get ArcSetting resources of HCI Cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return arcSetting resources of HCI Cluster as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByCluster(String resourceGroupName, String clusterName) {
+ return new PagedIterable<>(listByClusterAsync(resourceGroupName, clusterName));
+ }
+
+ /**
+ * Get ArcSetting resources of HCI Cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return arcSetting resources of HCI Cluster as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByCluster(String resourceGroupName, String clusterName, Context context) {
+ return new PagedIterable<>(listByClusterAsync(resourceGroupName, clusterName, context));
+ }
+
+ /**
+ * Get ArcSetting resource details of HCI Cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return arcSetting resource details of HCI Cluster along with {@link Response} on successful completion of {@link
+ * Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String resourceGroupName, String clusterName, String arcSettingName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (clusterName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null."));
+ }
+ if (arcSettingName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter arcSettingName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .get(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ clusterName,
+ arcSettingName,
+ this.client.getApiVersion(),
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get ArcSetting resource details of HCI Cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return arcSetting resource details of HCI Cluster along with {@link Response} on successful completion of {@link
+ * Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String resourceGroupName, String clusterName, String arcSettingName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (clusterName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null."));
+ }
+ if (arcSettingName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter arcSettingName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .get(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ clusterName,
+ arcSettingName,
+ this.client.getApiVersion(),
+ accept,
+ context);
+ }
+
+ /**
+ * Get ArcSetting resource details of HCI Cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return arcSetting resource details of HCI Cluster on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync(String resourceGroupName, String clusterName, String arcSettingName) {
+ return getWithResponseAsync(resourceGroupName, clusterName, arcSettingName)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * Get ArcSetting resource details of HCI Cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return arcSetting resource details of HCI Cluster.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public ArcSettingInner get(String resourceGroupName, String clusterName, String arcSettingName) {
+ return getAsync(resourceGroupName, clusterName, arcSettingName).block();
+ }
+
+ /**
+ * Get ArcSetting resource details of HCI Cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return arcSetting resource details of HCI Cluster along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getWithResponse(
+ String resourceGroupName, String clusterName, String arcSettingName, Context context) {
+ return getWithResponseAsync(resourceGroupName, clusterName, arcSettingName, context).block();
+ }
+
+ /**
+ * Create ArcSetting for HCI cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information.
+ * @param arcSetting Parameters supplied to the Create ArcSetting resource for this HCI cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return arcSetting details along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> createWithResponseAsync(
+ String resourceGroupName, String clusterName, String arcSettingName, ArcSettingInner arcSetting) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (clusterName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null."));
+ }
+ if (arcSettingName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter arcSettingName is required and cannot be null."));
+ }
+ if (arcSetting == null) {
+ return Mono.error(new IllegalArgumentException("Parameter arcSetting is required and cannot be null."));
+ } else {
+ arcSetting.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .create(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ clusterName,
+ arcSettingName,
+ this.client.getApiVersion(),
+ arcSetting,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Create ArcSetting for HCI cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information.
+ * @param arcSetting Parameters supplied to the Create ArcSetting resource for this HCI cluster.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return arcSetting details along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> createWithResponseAsync(
+ String resourceGroupName,
+ String clusterName,
+ String arcSettingName,
+ ArcSettingInner arcSetting,
+ Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (clusterName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null."));
+ }
+ if (arcSettingName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter arcSettingName is required and cannot be null."));
+ }
+ if (arcSetting == null) {
+ return Mono.error(new IllegalArgumentException("Parameter arcSetting is required and cannot be null."));
+ } else {
+ arcSetting.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .create(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ clusterName,
+ arcSettingName,
+ this.client.getApiVersion(),
+ arcSetting,
+ accept,
+ context);
+ }
+
+ /**
+ * Create ArcSetting for HCI cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information.
+ * @param arcSetting Parameters supplied to the Create ArcSetting resource for this HCI cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return arcSetting details on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createAsync(
+ String resourceGroupName, String clusterName, String arcSettingName, ArcSettingInner arcSetting) {
+ return createWithResponseAsync(resourceGroupName, clusterName, arcSettingName, arcSetting)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * Create ArcSetting for HCI cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information.
+ * @param arcSetting Parameters supplied to the Create ArcSetting resource for this HCI cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return arcSetting details.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public ArcSettingInner create(
+ String resourceGroupName, String clusterName, String arcSettingName, ArcSettingInner arcSetting) {
+ return createAsync(resourceGroupName, clusterName, arcSettingName, arcSetting).block();
+ }
+
+ /**
+ * Create ArcSetting for HCI cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information.
+ * @param arcSetting Parameters supplied to the Create ArcSetting resource for this HCI cluster.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return arcSetting details along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response createWithResponse(
+ String resourceGroupName,
+ String clusterName,
+ String arcSettingName,
+ ArcSettingInner arcSetting,
+ Context context) {
+ return createWithResponseAsync(resourceGroupName, clusterName, arcSettingName, arcSetting, context).block();
+ }
+
+ /**
+ * Delete ArcSetting resource details of HCI Cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> deleteWithResponseAsync(
+ String resourceGroupName, String clusterName, String arcSettingName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (clusterName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null."));
+ }
+ if (arcSettingName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter arcSettingName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .delete(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ clusterName,
+ arcSettingName,
+ this.client.getApiVersion(),
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Delete ArcSetting resource details of HCI Cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> deleteWithResponseAsync(
+ String resourceGroupName, String clusterName, String arcSettingName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (clusterName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null."));
+ }
+ if (arcSettingName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter arcSettingName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .delete(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ clusterName,
+ arcSettingName,
+ this.client.getApiVersion(),
+ accept,
+ context);
+ }
+
+ /**
+ * Delete ArcSetting resource details of HCI Cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, Void> beginDeleteAsync(
+ String resourceGroupName, String clusterName, String arcSettingName) {
+ Mono>> mono = deleteWithResponseAsync(resourceGroupName, clusterName, arcSettingName);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext());
+ }
+
+ /**
+ * Delete ArcSetting resource details of HCI Cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, Void> beginDeleteAsync(
+ String resourceGroupName, String clusterName, String arcSettingName, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono =
+ deleteWithResponseAsync(resourceGroupName, clusterName, arcSettingName, context);
+ return this
+ .client
+ .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context);
+ }
+
+ /**
+ * Delete ArcSetting resource details of HCI Cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginDelete(
+ String resourceGroupName, String clusterName, String arcSettingName) {
+ return beginDeleteAsync(resourceGroupName, clusterName, arcSettingName).getSyncPoller();
+ }
+
+ /**
+ * Delete ArcSetting resource details of HCI Cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginDelete(
+ String resourceGroupName, String clusterName, String arcSettingName, Context context) {
+ return beginDeleteAsync(resourceGroupName, clusterName, arcSettingName, context).getSyncPoller();
+ }
+
+ /**
+ * Delete ArcSetting resource details of HCI Cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return A {@link Mono} that completes when a successful response is received.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono deleteAsync(String resourceGroupName, String clusterName, String arcSettingName) {
+ return beginDeleteAsync(resourceGroupName, clusterName, arcSettingName)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Delete ArcSetting resource details of HCI Cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return A {@link Mono} that completes when a successful response is received.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono deleteAsync(
+ String resourceGroupName, String clusterName, String arcSettingName, Context context) {
+ return beginDeleteAsync(resourceGroupName, clusterName, arcSettingName, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Delete ArcSetting resource details of HCI Cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void delete(String resourceGroupName, String clusterName, String arcSettingName) {
+ deleteAsync(resourceGroupName, clusterName, arcSettingName).block();
+ }
+
+ /**
+ * Delete ArcSetting resource details of HCI Cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void delete(String resourceGroupName, String clusterName, String arcSettingName, Context context) {
+ deleteAsync(resourceGroupName, clusterName, arcSettingName, context).block();
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The nextLink parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list of ArcSetting proxy resources for the HCI cluster along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByClusterNextSinglePageAsync(String nextLink) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.listByClusterNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The nextLink parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list of ArcSetting proxy resources for the HCI cluster along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByClusterNextSinglePageAsync(String nextLink, Context context) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listByClusterNext(nextLink, this.client.getEndpoint(), accept, context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+}
diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ArcSettingsImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ArcSettingsImpl.java
new file mode 100644
index 0000000000000..552592e3f23f3
--- /dev/null
+++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ArcSettingsImpl.java
@@ -0,0 +1,188 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurestackhci.implementation;
+
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.SimpleResponse;
+import com.azure.core.util.Context;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.azurestackhci.fluent.ArcSettingsClient;
+import com.azure.resourcemanager.azurestackhci.fluent.models.ArcSettingInner;
+import com.azure.resourcemanager.azurestackhci.models.ArcSetting;
+import com.azure.resourcemanager.azurestackhci.models.ArcSettings;
+
+public final class ArcSettingsImpl implements ArcSettings {
+ private static final ClientLogger LOGGER = new ClientLogger(ArcSettingsImpl.class);
+
+ private final ArcSettingsClient innerClient;
+
+ private final com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager;
+
+ public ArcSettingsImpl(
+ ArcSettingsClient innerClient, com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public PagedIterable listByCluster(String resourceGroupName, String clusterName) {
+ PagedIterable inner = this.serviceClient().listByCluster(resourceGroupName, clusterName);
+ return Utils.mapPage(inner, inner1 -> new ArcSettingImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable listByCluster(String resourceGroupName, String clusterName, Context context) {
+ PagedIterable inner =
+ this.serviceClient().listByCluster(resourceGroupName, clusterName, context);
+ return Utils.mapPage(inner, inner1 -> new ArcSettingImpl(inner1, this.manager()));
+ }
+
+ public ArcSetting get(String resourceGroupName, String clusterName, String arcSettingName) {
+ ArcSettingInner inner = this.serviceClient().get(resourceGroupName, clusterName, arcSettingName);
+ if (inner != null) {
+ return new ArcSettingImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response getWithResponse(
+ String resourceGroupName, String clusterName, String arcSettingName, Context context) {
+ Response inner =
+ this.serviceClient().getWithResponse(resourceGroupName, clusterName, arcSettingName, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new ArcSettingImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public void delete(String resourceGroupName, String clusterName, String arcSettingName) {
+ this.serviceClient().delete(resourceGroupName, clusterName, arcSettingName);
+ }
+
+ public void delete(String resourceGroupName, String clusterName, String arcSettingName, Context context) {
+ this.serviceClient().delete(resourceGroupName, clusterName, arcSettingName, context);
+ }
+
+ public ArcSetting getById(String id) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String clusterName = Utils.getValueFromIdByName(id, "clusters");
+ if (clusterName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id)));
+ }
+ String arcSettingName = Utils.getValueFromIdByName(id, "arcSettings");
+ if (arcSettingName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'arcSettings'.", id)));
+ }
+ return this.getWithResponse(resourceGroupName, clusterName, arcSettingName, Context.NONE).getValue();
+ }
+
+ public Response getByIdWithResponse(String id, Context context) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String clusterName = Utils.getValueFromIdByName(id, "clusters");
+ if (clusterName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id)));
+ }
+ String arcSettingName = Utils.getValueFromIdByName(id, "arcSettings");
+ if (arcSettingName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'arcSettings'.", id)));
+ }
+ return this.getWithResponse(resourceGroupName, clusterName, arcSettingName, context);
+ }
+
+ public void deleteById(String id) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String clusterName = Utils.getValueFromIdByName(id, "clusters");
+ if (clusterName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id)));
+ }
+ String arcSettingName = Utils.getValueFromIdByName(id, "arcSettings");
+ if (arcSettingName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'arcSettings'.", id)));
+ }
+ this.delete(resourceGroupName, clusterName, arcSettingName, Context.NONE);
+ }
+
+ public void deleteByIdWithResponse(String id, Context context) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String clusterName = Utils.getValueFromIdByName(id, "clusters");
+ if (clusterName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id)));
+ }
+ String arcSettingName = Utils.getValueFromIdByName(id, "arcSettings");
+ if (arcSettingName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'arcSettings'.", id)));
+ }
+ this.delete(resourceGroupName, clusterName, arcSettingName, context);
+ }
+
+ private ArcSettingsClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager() {
+ return this.serviceManager;
+ }
+
+ public ArcSettingImpl define(String name) {
+ return new ArcSettingImpl(name, this.manager());
+ }
+}
diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/AzureStackHciClientImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/AzureStackHciClientImpl.java
index c6f8b7d73b93d..f2a2de92f00ec 100644
--- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/AzureStackHciClientImpl.java
+++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/AzureStackHciClientImpl.java
@@ -21,8 +21,10 @@
import com.azure.core.util.polling.PollerFlux;
import com.azure.core.util.serializer.SerializerAdapter;
import com.azure.core.util.serializer.SerializerEncoding;
+import com.azure.resourcemanager.azurestackhci.fluent.ArcSettingsClient;
import com.azure.resourcemanager.azurestackhci.fluent.AzureStackHciClient;
import com.azure.resourcemanager.azurestackhci.fluent.ClustersClient;
+import com.azure.resourcemanager.azurestackhci.fluent.ExtensionsClient;
import com.azure.resourcemanager.azurestackhci.fluent.OperationsClient;
import java.io.IOException;
import java.lang.reflect.Type;
@@ -37,8 +39,6 @@
/** Initializes a new instance of the AzureStackHciClientImpl type. */
@ServiceClient(builder = AzureStackHciClientBuilder.class)
public final class AzureStackHciClientImpl implements AzureStackHciClient {
- private final ClientLogger logger = new ClientLogger(AzureStackHciClientImpl.class);
-
/** The ID of the target subscription. */
private final String subscriptionId;
@@ -111,16 +111,16 @@ public Duration getDefaultPollInterval() {
return this.defaultPollInterval;
}
- /** The OperationsClient object to access its operations. */
- private final OperationsClient operations;
+ /** The ArcSettingsClient object to access its operations. */
+ private final ArcSettingsClient arcSettings;
/**
- * Gets the OperationsClient object to access its operations.
+ * Gets the ArcSettingsClient object to access its operations.
*
- * @return the OperationsClient object.
+ * @return the ArcSettingsClient object.
*/
- public OperationsClient getOperations() {
- return this.operations;
+ public ArcSettingsClient getArcSettings() {
+ return this.arcSettings;
}
/** The ClustersClient object to access its operations. */
@@ -135,6 +135,30 @@ public ClustersClient getClusters() {
return this.clusters;
}
+ /** The ExtensionsClient object to access its operations. */
+ private final ExtensionsClient extensions;
+
+ /**
+ * Gets the ExtensionsClient object to access its operations.
+ *
+ * @return the ExtensionsClient object.
+ */
+ public ExtensionsClient getExtensions() {
+ return this.extensions;
+ }
+
+ /** The OperationsClient object to access its operations. */
+ private final OperationsClient operations;
+
+ /**
+ * Gets the OperationsClient object to access its operations.
+ *
+ * @return the OperationsClient object.
+ */
+ public OperationsClient getOperations() {
+ return this.operations;
+ }
+
/**
* Initializes an instance of AzureStackHciClient client.
*
@@ -157,9 +181,11 @@ public ClustersClient getClusters() {
this.defaultPollInterval = defaultPollInterval;
this.subscriptionId = subscriptionId;
this.endpoint = endpoint;
- this.apiVersion = "2020-10-01";
- this.operations = new OperationsClientImpl(this);
+ this.apiVersion = "2022-01-01";
+ this.arcSettings = new ArcSettingsClientImpl(this);
this.clusters = new ClustersClientImpl(this);
+ this.extensions = new ExtensionsClientImpl(this);
+ this.operations = new OperationsClientImpl(this);
}
/**
@@ -245,7 +271,7 @@ public Mono getLroFinalResultOrError(AsyncPollResponse,
managementError = null;
}
} catch (IOException | RuntimeException ioe) {
- logger.logThrowableAsWarning(ioe);
+ LOGGER.logThrowableAsWarning(ioe);
}
}
} else {
@@ -304,4 +330,6 @@ public Mono getBodyAsString(Charset charset) {
return Mono.just(new String(responseBody, charset));
}
}
+
+ private static final ClientLogger LOGGER = new ClientLogger(AzureStackHciClientImpl.class);
}
diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ClusterImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ClusterImpl.java
index d42ade422ccf5..f92bbec6a6c55 100644
--- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ClusterImpl.java
+++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ClusterImpl.java
@@ -8,9 +8,9 @@
import com.azure.core.util.Context;
import com.azure.resourcemanager.azurestackhci.fluent.models.ClusterInner;
import com.azure.resourcemanager.azurestackhci.models.Cluster;
+import com.azure.resourcemanager.azurestackhci.models.ClusterDesiredProperties;
+import com.azure.resourcemanager.azurestackhci.models.ClusterPatch;
import com.azure.resourcemanager.azurestackhci.models.ClusterReportedProperties;
-import com.azure.resourcemanager.azurestackhci.models.ClusterUpdate;
-import com.azure.resourcemanager.azurestackhci.models.CreatedByType;
import com.azure.resourcemanager.azurestackhci.models.ProvisioningState;
import com.azure.resourcemanager.azurestackhci.models.Status;
import java.time.OffsetDateTime;
@@ -59,6 +59,10 @@ public String cloudId() {
return this.innerModel().cloudId();
}
+ public String cloudManagementEndpoint() {
+ return this.innerModel().cloudManagementEndpoint();
+ }
+
public String aadClientId() {
return this.innerModel().aadClientId();
}
@@ -67,6 +71,10 @@ public String aadTenantId() {
return this.innerModel().aadTenantId();
}
+ public ClusterDesiredProperties desiredProperties() {
+ return this.innerModel().desiredProperties();
+ }
+
public ClusterReportedProperties reportedProperties() {
return this.innerModel().reportedProperties();
}
@@ -91,30 +99,6 @@ public OffsetDateTime lastBillingTimestamp() {
return this.innerModel().lastBillingTimestamp();
}
- public String createdBy() {
- return this.innerModel().createdBy();
- }
-
- public CreatedByType createdByType() {
- return this.innerModel().createdByType();
- }
-
- public OffsetDateTime createdAt() {
- return this.innerModel().createdAt();
- }
-
- public String lastModifiedBy() {
- return this.innerModel().lastModifiedBy();
- }
-
- public CreatedByType lastModifiedByType() {
- return this.innerModel().lastModifiedByType();
- }
-
- public OffsetDateTime lastModifiedAt() {
- return this.innerModel().lastModifiedAt();
- }
-
public Region region() {
return Region.fromName(this.regionName());
}
@@ -135,7 +119,7 @@ private com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager() {
private String clusterName;
- private ClusterUpdate updateCluster;
+ private ClusterPatch updateCluster;
public ClusterImpl withExistingResourceGroup(String resourceGroupName) {
this.resourceGroupName = resourceGroupName;
@@ -169,7 +153,7 @@ public Cluster create(Context context) {
}
public ClusterImpl update() {
- this.updateCluster = new ClusterUpdate();
+ this.updateCluster = new ClusterPatch();
return this;
}
@@ -240,49 +224,44 @@ public ClusterImpl withTags(Map tags) {
}
}
- public ClusterImpl withAadClientId(String aadClientId) {
- this.innerModel().withAadClientId(aadClientId);
- return this;
- }
-
- public ClusterImpl withAadTenantId(String aadTenantId) {
- this.innerModel().withAadTenantId(aadTenantId);
- return this;
- }
-
- public ClusterImpl withReportedProperties(ClusterReportedProperties reportedProperties) {
- this.innerModel().withReportedProperties(reportedProperties);
- return this;
- }
-
- public ClusterImpl withCreatedBy(String createdBy) {
- this.innerModel().withCreatedBy(createdBy);
- return this;
- }
-
- public ClusterImpl withCreatedByType(CreatedByType createdByType) {
- this.innerModel().withCreatedByType(createdByType);
- return this;
- }
-
- public ClusterImpl withCreatedAt(OffsetDateTime createdAt) {
- this.innerModel().withCreatedAt(createdAt);
- return this;
+ public ClusterImpl withCloudManagementEndpoint(String cloudManagementEndpoint) {
+ if (isInCreateMode()) {
+ this.innerModel().withCloudManagementEndpoint(cloudManagementEndpoint);
+ return this;
+ } else {
+ this.updateCluster.withCloudManagementEndpoint(cloudManagementEndpoint);
+ return this;
+ }
}
- public ClusterImpl withLastModifiedBy(String lastModifiedBy) {
- this.innerModel().withLastModifiedBy(lastModifiedBy);
- return this;
+ public ClusterImpl withAadClientId(String aadClientId) {
+ if (isInCreateMode()) {
+ this.innerModel().withAadClientId(aadClientId);
+ return this;
+ } else {
+ this.updateCluster.withAadClientId(aadClientId);
+ return this;
+ }
}
- public ClusterImpl withLastModifiedByType(CreatedByType lastModifiedByType) {
- this.innerModel().withLastModifiedByType(lastModifiedByType);
- return this;
+ public ClusterImpl withAadTenantId(String aadTenantId) {
+ if (isInCreateMode()) {
+ this.innerModel().withAadTenantId(aadTenantId);
+ return this;
+ } else {
+ this.updateCluster.withAadTenantId(aadTenantId);
+ return this;
+ }
}
- public ClusterImpl withLastModifiedAt(OffsetDateTime lastModifiedAt) {
- this.innerModel().withLastModifiedAt(lastModifiedAt);
- return this;
+ public ClusterImpl withDesiredProperties(ClusterDesiredProperties desiredProperties) {
+ if (isInCreateMode()) {
+ this.innerModel().withDesiredProperties(desiredProperties);
+ return this;
+ } else {
+ this.updateCluster.withDesiredProperties(desiredProperties);
+ return this;
+ }
}
private boolean isInCreateMode() {
diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ClustersClientImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ClustersClientImpl.java
index ce30daccae08a..477957f585e18 100644
--- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ClustersClientImpl.java
+++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ClustersClientImpl.java
@@ -29,17 +29,14 @@
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.azurestackhci.fluent.ClustersClient;
import com.azure.resourcemanager.azurestackhci.fluent.models.ClusterInner;
import com.azure.resourcemanager.azurestackhci.models.ClusterList;
-import com.azure.resourcemanager.azurestackhci.models.ClusterUpdate;
+import com.azure.resourcemanager.azurestackhci.models.ClusterPatch;
import reactor.core.publisher.Mono;
/** An instance of this class provides access to all the operations defined in ClustersClient. */
public final class ClustersClientImpl implements ClustersClient {
- private final ClientLogger logger = new ClientLogger(ClustersClientImpl.class);
-
/** The proxy service used to perform REST calls. */
private final ClustersService service;
@@ -131,7 +128,7 @@ Mono> update(
@PathParam("resourceGroupName") String resourceGroupName,
@PathParam("clusterName") String clusterName,
@QueryParam("api-version") String apiVersion,
- @BodyParam("application/json") ClusterUpdate cluster,
+ @BodyParam("application/json") ClusterPatch cluster,
@HeaderParam("Accept") String accept,
Context context);
@@ -176,7 +173,7 @@ 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 list of clusters.
+ * @return list of clusters along with {@link PagedResponse} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listSinglePageAsync() {
@@ -222,7 +219,7 @@ 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 list of clusters.
+ * @return list of clusters along with {@link PagedResponse} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listSinglePageAsync(Context context) {
@@ -263,7 +260,7 @@ private Mono> listSinglePageAsync(Context context) {
*
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return list of clusters.
+ * @return list of clusters as paginated response with {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listAsync() {
@@ -278,7 +275,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 list of clusters.
+ * @return list of clusters as paginated response with {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listAsync(Context context) {
@@ -291,7 +288,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 list of clusters.
+ * @return list of clusters as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable list() {
@@ -305,7 +302,7 @@ public PagedIterable list() {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return list of clusters.
+ * @return list of clusters as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable list(Context context) {
@@ -319,7 +316,7 @@ public PagedIterable list(Context context) {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return list of clusters.
+ * @return list of clusters along with {@link PagedResponse} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) {
@@ -371,7 +368,7 @@ private Mono> listByResourceGroupSinglePageAsync(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 list of clusters.
+ * @return list of clusters along with {@link PagedResponse} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listByResourceGroupSinglePageAsync(
@@ -420,7 +417,7 @@ private Mono> listByResourceGroupSinglePageAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return list of clusters.
+ * @return list of clusters as paginated response with {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listByResourceGroupAsync(String resourceGroupName) {
@@ -437,7 +434,7 @@ private PagedFlux listByResourceGroupAsync(String resourceGroupNam
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return list of clusters.
+ * @return list of clusters as paginated response with {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) {
@@ -453,7 +450,7 @@ private PagedFlux listByResourceGroupAsync(String resourceGroupNam
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return list of clusters.
+ * @return list of clusters as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable listByResourceGroup(String resourceGroupName) {
@@ -468,7 +465,7 @@ public PagedIterable listByResourceGroup(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 list of clusters.
+ * @return list of clusters as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable listByResourceGroup(String resourceGroupName, Context context) {
@@ -483,7 +480,7 @@ public PagedIterable listByResourceGroup(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 hCI cluster.
+ * @return hCI cluster along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> getByResourceGroupWithResponseAsync(
@@ -532,7 +529,7 @@ 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 hCI cluster.
+ * @return hCI cluster along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> getByResourceGroupWithResponseAsync(
@@ -577,7 +574,7 @@ 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 hCI cluster.
+ * @return hCI cluster on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono getByResourceGroupAsync(String resourceGroupName, String clusterName) {
@@ -616,7 +613,7 @@ public ClusterInner getByResourceGroup(String resourceGroupName, String clusterN
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return hCI cluster.
+ * @return hCI cluster along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Response getByResourceGroupWithResponse(
@@ -633,7 +630,7 @@ 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 cluster details.
+ * @return cluster details along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> createWithResponseAsync(
@@ -689,7 +686,7 @@ 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 cluster details.
+ * @return cluster details along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> createWithResponseAsync(
@@ -741,7 +738,7 @@ 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 cluster details.
+ * @return cluster details on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono createAsync(String resourceGroupName, String clusterName, ClusterInner cluster) {
@@ -782,7 +779,7 @@ public ClusterInner create(String resourceGroupName, String clusterName, Cluster
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return cluster details.
+ * @return cluster details along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Response createWithResponse(
@@ -799,11 +796,11 @@ public Response createWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return cluster details.
+ * @return cluster details along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> updateWithResponseAsync(
- String resourceGroupName, String clusterName, ClusterUpdate cluster) {
+ String resourceGroupName, String clusterName, ClusterPatch cluster) {
if (this.client.getEndpoint() == null) {
return Mono
.error(
@@ -855,11 +852,11 @@ private Mono> updateWithResponseAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return cluster details.
+ * @return cluster details along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> updateWithResponseAsync(
- String resourceGroupName, String clusterName, ClusterUpdate cluster, Context context) {
+ String resourceGroupName, String clusterName, ClusterPatch cluster, Context context) {
if (this.client.getEndpoint() == null) {
return Mono
.error(
@@ -907,10 +904,10 @@ private Mono> updateWithResponseAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return cluster details.
+ * @return cluster details on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono updateAsync(String resourceGroupName, String clusterName, ClusterUpdate cluster) {
+ private Mono updateAsync(String resourceGroupName, String clusterName, ClusterPatch cluster) {
return updateWithResponseAsync(resourceGroupName, clusterName, cluster)
.flatMap(
(Response res) -> {
@@ -934,7 +931,7 @@ private Mono updateAsync(String resourceGroupName, String clusterN
* @return cluster details.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public ClusterInner update(String resourceGroupName, String clusterName, ClusterUpdate cluster) {
+ public ClusterInner update(String resourceGroupName, String clusterName, ClusterPatch cluster) {
return updateAsync(resourceGroupName, clusterName, cluster).block();
}
@@ -948,11 +945,11 @@ public ClusterInner update(String resourceGroupName, String clusterName, Cluster
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return cluster details.
+ * @return cluster details along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Response updateWithResponse(
- String resourceGroupName, String clusterName, ClusterUpdate cluster, Context context) {
+ String resourceGroupName, String clusterName, ClusterPatch cluster, Context context) {
return updateWithResponseAsync(resourceGroupName, clusterName, cluster, context).block();
}
@@ -964,7 +961,7 @@ public Response updateWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException 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 clusterName) {
@@ -1012,7 +1009,7 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
+ * @return the {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> deleteWithResponseAsync(
@@ -1057,7 +1054,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 A {@link Mono} that completes when a successful response is received.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono deleteAsync(String resourceGroupName, String clusterName) {
@@ -1087,7 +1084,7 @@ public void delete(String resourceGroupName, String clusterName) {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response.
+ * @return the {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Response deleteWithResponse(String resourceGroupName, String clusterName, Context context) {
@@ -1101,7 +1098,7 @@ public Response deleteWithResponse(String resourceGroupName, String cluste
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return list of clusters.
+ * @return list of clusters along with {@link PagedResponse} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) {
@@ -1138,7 +1135,7 @@ private Mono> listBySubscriptionNextSinglePageAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return list of clusters.
+ * @return list of clusters along with {@link PagedResponse} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listBySubscriptionNextSinglePageAsync(String nextLink, Context context) {
@@ -1173,7 +1170,7 @@ private Mono> listBySubscriptionNextSinglePageAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return list of clusters.
+ * @return list of clusters along with {@link PagedResponse} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) {
@@ -1210,7 +1207,7 @@ private Mono> listByResourceGroupNextSinglePageAsync
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return list of clusters.
+ * @return list of clusters along with {@link PagedResponse} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, Context context) {
diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ClustersImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ClustersImpl.java
index ffdedeed7baa8..ab6f3ab909b0f 100644
--- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ClustersImpl.java
+++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ClustersImpl.java
@@ -13,10 +13,9 @@
import com.azure.resourcemanager.azurestackhci.fluent.models.ClusterInner;
import com.azure.resourcemanager.azurestackhci.models.Cluster;
import com.azure.resourcemanager.azurestackhci.models.Clusters;
-import com.fasterxml.jackson.annotation.JsonIgnore;
public final class ClustersImpl implements Clusters {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(ClustersImpl.class);
+ private static final ClientLogger LOGGER = new ClientLogger(ClustersImpl.class);
private final ClustersClient innerClient;
@@ -83,7 +82,7 @@ public Response deleteWithResponse(String resourceGroupName, String cluste
public Cluster getById(String id) {
String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String
@@ -91,7 +90,7 @@ public Cluster getById(String id) {
}
String clusterName = Utils.getValueFromIdByName(id, "clusters");
if (clusterName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id)));
@@ -102,7 +101,7 @@ public Cluster 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
@@ -110,7 +109,7 @@ public Response getByIdWithResponse(String id, Context context) {
}
String clusterName = Utils.getValueFromIdByName(id, "clusters");
if (clusterName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id)));
@@ -121,7 +120,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
@@ -129,18 +128,18 @@ public void deleteById(String id) {
}
String clusterName = Utils.getValueFromIdByName(id, "clusters");
if (clusterName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id)));
}
- this.deleteWithResponse(resourceGroupName, clusterName, Context.NONE).getValue();
+ this.deleteWithResponse(resourceGroupName, clusterName, Context.NONE);
}
public Response deleteByIdWithResponse(String id, Context context) {
String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String
@@ -148,7 +147,7 @@ public Response deleteByIdWithResponse(String id, Context context) {
}
String clusterName = Utils.getValueFromIdByName(id, "clusters");
if (clusterName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id)));
diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ExtensionImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ExtensionImpl.java
new file mode 100644
index 0000000000000..de24dac070a6e
--- /dev/null
+++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ExtensionImpl.java
@@ -0,0 +1,211 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurestackhci.implementation;
+
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.azurestackhci.fluent.models.ExtensionInner;
+import com.azure.resourcemanager.azurestackhci.models.Extension;
+import com.azure.resourcemanager.azurestackhci.models.ExtensionAggregateState;
+import com.azure.resourcemanager.azurestackhci.models.PerNodeExtensionState;
+import com.azure.resourcemanager.azurestackhci.models.ProvisioningState;
+import java.util.Collections;
+import java.util.List;
+
+public final class ExtensionImpl implements Extension, Extension.Definition, Extension.Update {
+ private ExtensionInner innerObject;
+
+ private final com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager;
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
+ public ProvisioningState provisioningState() {
+ return this.innerModel().provisioningState();
+ }
+
+ public ExtensionAggregateState aggregateState() {
+ return this.innerModel().aggregateState();
+ }
+
+ public List perNodeExtensionDetails() {
+ List inner = this.innerModel().perNodeExtensionDetails();
+ if (inner != null) {
+ return Collections.unmodifiableList(inner);
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public String forceUpdateTag() {
+ return this.innerModel().forceUpdateTag();
+ }
+
+ public String publisher() {
+ return this.innerModel().publisher();
+ }
+
+ public String typePropertiesType() {
+ return this.innerModel().typePropertiesType();
+ }
+
+ public String typeHandlerVersion() {
+ return this.innerModel().typeHandlerVersion();
+ }
+
+ public Boolean autoUpgradeMinorVersion() {
+ return this.innerModel().autoUpgradeMinorVersion();
+ }
+
+ public Object settings() {
+ return this.innerModel().settings();
+ }
+
+ public Object protectedSettings() {
+ return this.innerModel().protectedSettings();
+ }
+
+ public ExtensionInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager() {
+ return this.serviceManager;
+ }
+
+ private String resourceGroupName;
+
+ private String clusterName;
+
+ private String arcSettingName;
+
+ private String extensionName;
+
+ public ExtensionImpl withExistingArcSetting(String resourceGroupName, String clusterName, String arcSettingName) {
+ this.resourceGroupName = resourceGroupName;
+ this.clusterName = clusterName;
+ this.arcSettingName = arcSettingName;
+ return this;
+ }
+
+ public Extension create() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getExtensions()
+ .create(resourceGroupName, clusterName, arcSettingName, extensionName, this.innerModel(), Context.NONE);
+ return this;
+ }
+
+ public Extension create(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getExtensions()
+ .create(resourceGroupName, clusterName, arcSettingName, extensionName, this.innerModel(), context);
+ return this;
+ }
+
+ ExtensionImpl(String name, com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) {
+ this.innerObject = new ExtensionInner();
+ this.serviceManager = serviceManager;
+ this.extensionName = name;
+ }
+
+ public ExtensionImpl update() {
+ return this;
+ }
+
+ public Extension apply() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getExtensions()
+ .update(resourceGroupName, clusterName, arcSettingName, extensionName, this.innerModel(), Context.NONE);
+ return this;
+ }
+
+ public Extension apply(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getExtensions()
+ .update(resourceGroupName, clusterName, arcSettingName, extensionName, this.innerModel(), context);
+ return this;
+ }
+
+ ExtensionImpl(
+ ExtensionInner innerObject, com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups");
+ this.clusterName = Utils.getValueFromIdByName(innerObject.id(), "clusters");
+ this.arcSettingName = Utils.getValueFromIdByName(innerObject.id(), "arcSettings");
+ this.extensionName = Utils.getValueFromIdByName(innerObject.id(), "extensions");
+ }
+
+ public Extension refresh() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getExtensions()
+ .getWithResponse(resourceGroupName, clusterName, arcSettingName, extensionName, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public Extension refresh(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getExtensions()
+ .getWithResponse(resourceGroupName, clusterName, arcSettingName, extensionName, context)
+ .getValue();
+ return this;
+ }
+
+ public ExtensionImpl withForceUpdateTag(String forceUpdateTag) {
+ this.innerModel().withForceUpdateTag(forceUpdateTag);
+ return this;
+ }
+
+ public ExtensionImpl withPublisher(String publisher) {
+ this.innerModel().withPublisher(publisher);
+ return this;
+ }
+
+ public ExtensionImpl withTypePropertiesType(String typePropertiesType) {
+ this.innerModel().withTypePropertiesType(typePropertiesType);
+ return this;
+ }
+
+ public ExtensionImpl withTypeHandlerVersion(String typeHandlerVersion) {
+ this.innerModel().withTypeHandlerVersion(typeHandlerVersion);
+ return this;
+ }
+
+ public ExtensionImpl withAutoUpgradeMinorVersion(Boolean autoUpgradeMinorVersion) {
+ this.innerModel().withAutoUpgradeMinorVersion(autoUpgradeMinorVersion);
+ return this;
+ }
+
+ public ExtensionImpl withSettings(Object settings) {
+ this.innerModel().withSettings(settings);
+ return this;
+ }
+
+ public ExtensionImpl withProtectedSettings(Object protectedSettings) {
+ this.innerModel().withProtectedSettings(protectedSettings);
+ return this;
+ }
+}
diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ExtensionsClientImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ExtensionsClientImpl.java
new file mode 100644
index 0000000000000..6728c51a24287
--- /dev/null
+++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ExtensionsClientImpl.java
@@ -0,0 +1,1591 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurestackhci.implementation;
+
+import com.azure.core.annotation.BodyParam;
+import com.azure.core.annotation.Delete;
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.Patch;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.Put;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.core.util.polling.PollerFlux;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.azurestackhci.fluent.ExtensionsClient;
+import com.azure.resourcemanager.azurestackhci.fluent.models.ExtensionInner;
+import com.azure.resourcemanager.azurestackhci.models.ExtensionList;
+import java.nio.ByteBuffer;
+import reactor.core.publisher.Flux;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in ExtensionsClient. */
+public final class ExtensionsClientImpl implements ExtensionsClient {
+ /** The proxy service used to perform REST calls. */
+ private final ExtensionsService service;
+
+ /** The service client containing this operation class. */
+ private final AzureStackHciClientImpl client;
+
+ /**
+ * Initializes an instance of ExtensionsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ ExtensionsClientImpl(AzureStackHciClientImpl client) {
+ this.service =
+ RestProxy.create(ExtensionsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for AzureStackHciClientExtensions to be used by the proxy service to
+ * perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "AzureStackHciClientE")
+ private interface ExtensionsService {
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI"
+ + "/clusters/{clusterName}/arcSettings/{arcSettingName}/extensions")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByArcSetting(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("clusterName") String clusterName,
+ @PathParam("arcSettingName") String arcSettingName,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI"
+ + "/clusters/{clusterName}/arcSettings/{arcSettingName}/extensions/{extensionName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> get(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("clusterName") String clusterName,
+ @PathParam("arcSettingName") String arcSettingName,
+ @PathParam("extensionName") String extensionName,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Put(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI"
+ + "/clusters/{clusterName}/arcSettings/{arcSettingName}/extensions/{extensionName}")
+ @ExpectedResponses({200, 201})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> create(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("clusterName") String clusterName,
+ @PathParam("arcSettingName") String arcSettingName,
+ @PathParam("extensionName") String extensionName,
+ @QueryParam("api-version") String apiVersion,
+ @BodyParam("application/json") ExtensionInner extension,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Patch(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI"
+ + "/clusters/{clusterName}/arcSettings/{arcSettingName}/extensions/{extensionName}")
+ @ExpectedResponses({201})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> update(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("clusterName") String clusterName,
+ @PathParam("arcSettingName") String arcSettingName,
+ @PathParam("extensionName") String extensionName,
+ @QueryParam("api-version") String apiVersion,
+ @BodyParam("application/json") ExtensionInner extension,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Delete(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI"
+ + "/clusters/{clusterName}/arcSettings/{arcSettingName}/extensions/{extensionName}")
+ @ExpectedResponses({200, 202, 204})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> delete(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("clusterName") String clusterName,
+ @PathParam("arcSettingName") String arcSettingName,
+ @PathParam("extensionName") String extensionName,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("{nextLink}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByArcSettingNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * List all Extensions under ArcSetting resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list of Extensions in HCI cluster along with {@link PagedResponse} on successful completion of {@link
+ * Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByArcSettingSinglePageAsync(
+ String resourceGroupName, String clusterName, String arcSettingName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (clusterName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null."));
+ }
+ if (arcSettingName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter arcSettingName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .listByArcSetting(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ clusterName,
+ arcSettingName,
+ this.client.getApiVersion(),
+ accept,
+ context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * List all Extensions under ArcSetting resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list of Extensions in HCI cluster along with {@link PagedResponse} on successful completion of {@link
+ * Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByArcSettingSinglePageAsync(
+ String resourceGroupName, String clusterName, String arcSettingName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (clusterName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null."));
+ }
+ if (arcSettingName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter arcSettingName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listByArcSetting(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ clusterName,
+ arcSettingName,
+ this.client.getApiVersion(),
+ accept,
+ context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * List all Extensions under ArcSetting resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list of Extensions in HCI cluster as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByArcSettingAsync(
+ String resourceGroupName, String clusterName, String arcSettingName) {
+ return new PagedFlux<>(
+ () -> listByArcSettingSinglePageAsync(resourceGroupName, clusterName, arcSettingName),
+ nextLink -> listByArcSettingNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * List all Extensions under ArcSetting resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list of Extensions in HCI cluster as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByArcSettingAsync(
+ String resourceGroupName, String clusterName, String arcSettingName, Context context) {
+ return new PagedFlux<>(
+ () -> listByArcSettingSinglePageAsync(resourceGroupName, clusterName, arcSettingName, context),
+ nextLink -> listByArcSettingNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * List all Extensions under ArcSetting resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list of Extensions in HCI cluster as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByArcSetting(
+ String resourceGroupName, String clusterName, String arcSettingName) {
+ return new PagedIterable<>(listByArcSettingAsync(resourceGroupName, clusterName, arcSettingName));
+ }
+
+ /**
+ * List all Extensions under ArcSetting resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list of Extensions in HCI cluster as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByArcSetting(
+ String resourceGroupName, String clusterName, String arcSettingName, Context context) {
+ return new PagedIterable<>(listByArcSettingAsync(resourceGroupName, clusterName, arcSettingName, context));
+ }
+
+ /**
+ * Get particular Arc Extension of HCI Cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information.
+ * @param extensionName The name of the machine extension.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return particular Arc Extension of HCI Cluster along with {@link Response} on successful completion of {@link
+ * Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String resourceGroupName, String clusterName, String arcSettingName, String extensionName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (clusterName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null."));
+ }
+ if (arcSettingName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter arcSettingName is required and cannot be null."));
+ }
+ if (extensionName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter extensionName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .get(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ clusterName,
+ arcSettingName,
+ extensionName,
+ this.client.getApiVersion(),
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get particular Arc Extension of HCI Cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information.
+ * @param extensionName The name of the machine extension.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return particular Arc Extension of HCI Cluster along with {@link Response} on successful completion of {@link
+ * Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String resourceGroupName, String clusterName, String arcSettingName, String extensionName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (clusterName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null."));
+ }
+ if (arcSettingName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter arcSettingName is required and cannot be null."));
+ }
+ if (extensionName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter extensionName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .get(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ clusterName,
+ arcSettingName,
+ extensionName,
+ this.client.getApiVersion(),
+ accept,
+ context);
+ }
+
+ /**
+ * Get particular Arc Extension of HCI Cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information.
+ * @param extensionName The name of the machine extension.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return particular Arc Extension of HCI Cluster on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync(
+ String resourceGroupName, String clusterName, String arcSettingName, String extensionName) {
+ return getWithResponseAsync(resourceGroupName, clusterName, arcSettingName, extensionName)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * Get particular Arc Extension of HCI Cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information.
+ * @param extensionName The name of the machine extension.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return particular Arc Extension of HCI Cluster.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public ExtensionInner get(
+ String resourceGroupName, String clusterName, String arcSettingName, String extensionName) {
+ return getAsync(resourceGroupName, clusterName, arcSettingName, extensionName).block();
+ }
+
+ /**
+ * Get particular Arc Extension of HCI Cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information.
+ * @param extensionName The name of the machine extension.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return particular Arc Extension of HCI Cluster along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getWithResponse(
+ String resourceGroupName, String clusterName, String arcSettingName, String extensionName, Context context) {
+ return getWithResponseAsync(resourceGroupName, clusterName, arcSettingName, extensionName, context).block();
+ }
+
+ /**
+ * Create Extension for HCI cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information.
+ * @param extensionName The name of the machine extension.
+ * @param extension Details of the Machine Extension to be created.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 of a particular extension in HCI Cluster along with {@link Response} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createWithResponseAsync(
+ String resourceGroupName,
+ String clusterName,
+ String arcSettingName,
+ String extensionName,
+ ExtensionInner extension) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (clusterName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null."));
+ }
+ if (arcSettingName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter arcSettingName is required and cannot be null."));
+ }
+ if (extensionName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter extensionName is required and cannot be null."));
+ }
+ if (extension == null) {
+ return Mono.error(new IllegalArgumentException("Parameter extension is required and cannot be null."));
+ } else {
+ extension.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .create(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ clusterName,
+ arcSettingName,
+ extensionName,
+ this.client.getApiVersion(),
+ extension,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Create Extension for HCI cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information.
+ * @param extensionName The name of the machine extension.
+ * @param extension Details of the Machine Extension to be created.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return details of a particular extension in HCI Cluster along with {@link Response} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createWithResponseAsync(
+ String resourceGroupName,
+ String clusterName,
+ String arcSettingName,
+ String extensionName,
+ ExtensionInner extension,
+ Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (clusterName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null."));
+ }
+ if (arcSettingName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter arcSettingName is required and cannot be null."));
+ }
+ if (extensionName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter extensionName is required and cannot be null."));
+ }
+ if (extension == null) {
+ return Mono.error(new IllegalArgumentException("Parameter extension is required and cannot be null."));
+ } else {
+ extension.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .create(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ clusterName,
+ arcSettingName,
+ extensionName,
+ this.client.getApiVersion(),
+ extension,
+ accept,
+ context);
+ }
+
+ /**
+ * Create Extension for HCI cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information.
+ * @param extensionName The name of the machine extension.
+ * @param extension Details of the Machine Extension to be created.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of details of a particular extension in HCI Cluster.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, ExtensionInner> beginCreateAsync(
+ String resourceGroupName,
+ String clusterName,
+ String arcSettingName,
+ String extensionName,
+ ExtensionInner extension) {
+ Mono>> mono =
+ createWithResponseAsync(resourceGroupName, clusterName, arcSettingName, extensionName, extension);
+ return this
+ .client
+ .getLroResult(
+ mono,
+ this.client.getHttpPipeline(),
+ ExtensionInner.class,
+ ExtensionInner.class,
+ this.client.getContext());
+ }
+
+ /**
+ * Create Extension for HCI cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information.
+ * @param extensionName The name of the machine extension.
+ * @param extension Details of the Machine Extension to be created.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of details of a particular extension in HCI Cluster.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, ExtensionInner> beginCreateAsync(
+ String resourceGroupName,
+ String clusterName,
+ String arcSettingName,
+ String extensionName,
+ ExtensionInner extension,
+ Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono =
+ createWithResponseAsync(resourceGroupName, clusterName, arcSettingName, extensionName, extension, context);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), ExtensionInner.class, ExtensionInner.class, context);
+ }
+
+ /**
+ * Create Extension for HCI cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information.
+ * @param extensionName The name of the machine extension.
+ * @param extension Details of the Machine Extension to be created.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of details of a particular extension in HCI Cluster.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, ExtensionInner> beginCreate(
+ String resourceGroupName,
+ String clusterName,
+ String arcSettingName,
+ String extensionName,
+ ExtensionInner extension) {
+ return beginCreateAsync(resourceGroupName, clusterName, arcSettingName, extensionName, extension)
+ .getSyncPoller();
+ }
+
+ /**
+ * Create Extension for HCI cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information.
+ * @param extensionName The name of the machine extension.
+ * @param extension Details of the Machine Extension to be created.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of details of a particular extension in HCI Cluster.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, ExtensionInner> beginCreate(
+ String resourceGroupName,
+ String clusterName,
+ String arcSettingName,
+ String extensionName,
+ ExtensionInner extension,
+ Context context) {
+ return beginCreateAsync(resourceGroupName, clusterName, arcSettingName, extensionName, extension, context)
+ .getSyncPoller();
+ }
+
+ /**
+ * Create Extension for HCI cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information.
+ * @param extensionName The name of the machine extension.
+ * @param extension Details of the Machine Extension to be created.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 of a particular extension in HCI Cluster on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createAsync(
+ String resourceGroupName,
+ String clusterName,
+ String arcSettingName,
+ String extensionName,
+ ExtensionInner extension) {
+ return beginCreateAsync(resourceGroupName, clusterName, arcSettingName, extensionName, extension)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Create Extension for HCI cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information.
+ * @param extensionName The name of the machine extension.
+ * @param extension Details of the Machine Extension to be created.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return details of a particular extension in HCI Cluster on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createAsync(
+ String resourceGroupName,
+ String clusterName,
+ String arcSettingName,
+ String extensionName,
+ ExtensionInner extension,
+ Context context) {
+ return beginCreateAsync(resourceGroupName, clusterName, arcSettingName, extensionName, extension, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Create Extension for HCI cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information.
+ * @param extensionName The name of the machine extension.
+ * @param extension Details of the Machine Extension to be created.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 of a particular extension in HCI Cluster.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public ExtensionInner create(
+ String resourceGroupName,
+ String clusterName,
+ String arcSettingName,
+ String extensionName,
+ ExtensionInner extension) {
+ return createAsync(resourceGroupName, clusterName, arcSettingName, extensionName, extension).block();
+ }
+
+ /**
+ * Create Extension for HCI cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information.
+ * @param extensionName The name of the machine extension.
+ * @param extension Details of the Machine Extension to be created.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return details of a particular extension in HCI Cluster.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public ExtensionInner create(
+ String resourceGroupName,
+ String clusterName,
+ String arcSettingName,
+ String extensionName,
+ ExtensionInner extension,
+ Context context) {
+ return createAsync(resourceGroupName, clusterName, arcSettingName, extensionName, extension, context).block();
+ }
+
+ /**
+ * Update Extension for HCI cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information.
+ * @param extensionName The name of the machine extension.
+ * @param extension Details of the Machine Extension to be created.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 of a particular extension in HCI Cluster along with {@link Response} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> updateWithResponseAsync(
+ String resourceGroupName,
+ String clusterName,
+ String arcSettingName,
+ String extensionName,
+ ExtensionInner extension) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (clusterName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null."));
+ }
+ if (arcSettingName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter arcSettingName is required and cannot be null."));
+ }
+ if (extensionName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter extensionName is required and cannot be null."));
+ }
+ if (extension == null) {
+ return Mono.error(new IllegalArgumentException("Parameter extension is required and cannot be null."));
+ } else {
+ extension.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .update(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ clusterName,
+ arcSettingName,
+ extensionName,
+ this.client.getApiVersion(),
+ extension,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Update Extension for HCI cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information.
+ * @param extensionName The name of the machine extension.
+ * @param extension Details of the Machine Extension to be created.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return details of a particular extension in HCI Cluster along with {@link Response} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> updateWithResponseAsync(
+ String resourceGroupName,
+ String clusterName,
+ String arcSettingName,
+ String extensionName,
+ ExtensionInner extension,
+ Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (clusterName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null."));
+ }
+ if (arcSettingName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter arcSettingName is required and cannot be null."));
+ }
+ if (extensionName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter extensionName is required and cannot be null."));
+ }
+ if (extension == null) {
+ return Mono.error(new IllegalArgumentException("Parameter extension is required and cannot be null."));
+ } else {
+ extension.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .update(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ clusterName,
+ arcSettingName,
+ extensionName,
+ this.client.getApiVersion(),
+ extension,
+ accept,
+ context);
+ }
+
+ /**
+ * Update Extension for HCI cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information.
+ * @param extensionName The name of the machine extension.
+ * @param extension Details of the Machine Extension to be created.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of details of a particular extension in HCI Cluster.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, ExtensionInner> beginUpdateAsync(
+ String resourceGroupName,
+ String clusterName,
+ String arcSettingName,
+ String extensionName,
+ ExtensionInner extension) {
+ Mono>> mono =
+ updateWithResponseAsync(resourceGroupName, clusterName, arcSettingName, extensionName, extension);
+ return this
+ .client
+ .getLroResult(
+ mono,
+ this.client.getHttpPipeline(),
+ ExtensionInner.class,
+ ExtensionInner.class,
+ this.client.getContext());
+ }
+
+ /**
+ * Update Extension for HCI cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information.
+ * @param extensionName The name of the machine extension.
+ * @param extension Details of the Machine Extension to be created.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of details of a particular extension in HCI Cluster.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, ExtensionInner> beginUpdateAsync(
+ String resourceGroupName,
+ String clusterName,
+ String arcSettingName,
+ String extensionName,
+ ExtensionInner extension,
+ Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono =
+ updateWithResponseAsync(resourceGroupName, clusterName, arcSettingName, extensionName, extension, context);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), ExtensionInner.class, ExtensionInner.class, context);
+ }
+
+ /**
+ * Update Extension for HCI cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information.
+ * @param extensionName The name of the machine extension.
+ * @param extension Details of the Machine Extension to be created.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of details of a particular extension in HCI Cluster.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, ExtensionInner> beginUpdate(
+ String resourceGroupName,
+ String clusterName,
+ String arcSettingName,
+ String extensionName,
+ ExtensionInner extension) {
+ return beginUpdateAsync(resourceGroupName, clusterName, arcSettingName, extensionName, extension)
+ .getSyncPoller();
+ }
+
+ /**
+ * Update Extension for HCI cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information.
+ * @param extensionName The name of the machine extension.
+ * @param extension Details of the Machine Extension to be created.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of details of a particular extension in HCI Cluster.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, ExtensionInner> beginUpdate(
+ String resourceGroupName,
+ String clusterName,
+ String arcSettingName,
+ String extensionName,
+ ExtensionInner extension,
+ Context context) {
+ return beginUpdateAsync(resourceGroupName, clusterName, arcSettingName, extensionName, extension, context)
+ .getSyncPoller();
+ }
+
+ /**
+ * Update Extension for HCI cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information.
+ * @param extensionName The name of the machine extension.
+ * @param extension Details of the Machine Extension to be created.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 of a particular extension in HCI Cluster on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono updateAsync(
+ String resourceGroupName,
+ String clusterName,
+ String arcSettingName,
+ String extensionName,
+ ExtensionInner extension) {
+ return beginUpdateAsync(resourceGroupName, clusterName, arcSettingName, extensionName, extension)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Update Extension for HCI cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information.
+ * @param extensionName The name of the machine extension.
+ * @param extension Details of the Machine Extension to be created.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return details of a particular extension in HCI Cluster on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono updateAsync(
+ String resourceGroupName,
+ String clusterName,
+ String arcSettingName,
+ String extensionName,
+ ExtensionInner extension,
+ Context context) {
+ return beginUpdateAsync(resourceGroupName, clusterName, arcSettingName, extensionName, extension, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Update Extension for HCI cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information.
+ * @param extensionName The name of the machine extension.
+ * @param extension Details of the Machine Extension to be created.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 of a particular extension in HCI Cluster.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public ExtensionInner update(
+ String resourceGroupName,
+ String clusterName,
+ String arcSettingName,
+ String extensionName,
+ ExtensionInner extension) {
+ return updateAsync(resourceGroupName, clusterName, arcSettingName, extensionName, extension).block();
+ }
+
+ /**
+ * Update Extension for HCI cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information.
+ * @param extensionName The name of the machine extension.
+ * @param extension Details of the Machine Extension to be created.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return details of a particular extension in HCI Cluster.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public ExtensionInner update(
+ String resourceGroupName,
+ String clusterName,
+ String arcSettingName,
+ String extensionName,
+ ExtensionInner extension,
+ Context context) {
+ return updateAsync(resourceGroupName, clusterName, arcSettingName, extensionName, extension, context).block();
+ }
+
+ /**
+ * Delete particular Arc Extension of HCI Cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information.
+ * @param extensionName The name of the machine extension.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> deleteWithResponseAsync(
+ String resourceGroupName, String clusterName, String arcSettingName, String extensionName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (clusterName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null."));
+ }
+ if (arcSettingName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter arcSettingName is required and cannot be null."));
+ }
+ if (extensionName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter extensionName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .delete(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ clusterName,
+ arcSettingName,
+ extensionName,
+ this.client.getApiVersion(),
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Delete particular Arc Extension of HCI Cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information.
+ * @param extensionName The name of the machine extension.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> deleteWithResponseAsync(
+ String resourceGroupName, String clusterName, String arcSettingName, String extensionName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (clusterName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null."));
+ }
+ if (arcSettingName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter arcSettingName is required and cannot be null."));
+ }
+ if (extensionName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter extensionName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .delete(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ clusterName,
+ arcSettingName,
+ extensionName,
+ this.client.getApiVersion(),
+ accept,
+ context);
+ }
+
+ /**
+ * Delete particular Arc Extension of HCI Cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information.
+ * @param extensionName The name of the machine extension.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, Void> beginDeleteAsync(
+ String resourceGroupName, String clusterName, String arcSettingName, String extensionName) {
+ Mono>> mono =
+ deleteWithResponseAsync(resourceGroupName, clusterName, arcSettingName, extensionName);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext());
+ }
+
+ /**
+ * Delete particular Arc Extension of HCI Cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information.
+ * @param extensionName The name of the machine extension.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, Void> beginDeleteAsync(
+ String resourceGroupName, String clusterName, String arcSettingName, String extensionName, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono =
+ deleteWithResponseAsync(resourceGroupName, clusterName, arcSettingName, extensionName, context);
+ return this
+ .client
+ .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context);
+ }
+
+ /**
+ * Delete particular Arc Extension of HCI Cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information.
+ * @param extensionName The name of the machine extension.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginDelete(
+ String resourceGroupName, String clusterName, String arcSettingName, String extensionName) {
+ return beginDeleteAsync(resourceGroupName, clusterName, arcSettingName, extensionName).getSyncPoller();
+ }
+
+ /**
+ * Delete particular Arc Extension of HCI Cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information.
+ * @param extensionName The name of the machine extension.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginDelete(
+ String resourceGroupName, String clusterName, String arcSettingName, String extensionName, Context context) {
+ return beginDeleteAsync(resourceGroupName, clusterName, arcSettingName, extensionName, context).getSyncPoller();
+ }
+
+ /**
+ * Delete particular Arc Extension of HCI Cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information.
+ * @param extensionName The name of the machine extension.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return A {@link Mono} that completes when a successful response is received.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono deleteAsync(
+ String resourceGroupName, String clusterName, String arcSettingName, String extensionName) {
+ return beginDeleteAsync(resourceGroupName, clusterName, arcSettingName, extensionName)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Delete particular Arc Extension of HCI Cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information.
+ * @param extensionName The name of the machine extension.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return A {@link Mono} that completes when a successful response is received.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono deleteAsync(
+ String resourceGroupName, String clusterName, String arcSettingName, String extensionName, Context context) {
+ return beginDeleteAsync(resourceGroupName, clusterName, arcSettingName, extensionName, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Delete particular Arc Extension of HCI Cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information.
+ * @param extensionName The name of the machine extension.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void delete(String resourceGroupName, String clusterName, String arcSettingName, String extensionName) {
+ deleteAsync(resourceGroupName, clusterName, arcSettingName, extensionName).block();
+ }
+
+ /**
+ * Delete particular Arc Extension of HCI Cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information.
+ * @param extensionName The name of the machine extension.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void delete(
+ String resourceGroupName, String clusterName, String arcSettingName, String extensionName, Context context) {
+ deleteAsync(resourceGroupName, clusterName, arcSettingName, extensionName, context).block();
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The nextLink parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list of Extensions in HCI cluster along with {@link PagedResponse} on successful completion of {@link
+ * Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByArcSettingNextSinglePageAsync(String nextLink) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.listByArcSettingNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The nextLink parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list of Extensions in HCI cluster along with {@link PagedResponse} on successful completion of {@link
+ * Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByArcSettingNextSinglePageAsync(String nextLink, Context context) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listByArcSettingNext(nextLink, this.client.getEndpoint(), accept, context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+}
diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ExtensionsImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ExtensionsImpl.java
new file mode 100644
index 0000000000000..a2ed71822024c
--- /dev/null
+++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ExtensionsImpl.java
@@ -0,0 +1,224 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurestackhci.implementation;
+
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.SimpleResponse;
+import com.azure.core.util.Context;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.azurestackhci.fluent.ExtensionsClient;
+import com.azure.resourcemanager.azurestackhci.fluent.models.ExtensionInner;
+import com.azure.resourcemanager.azurestackhci.models.Extension;
+import com.azure.resourcemanager.azurestackhci.models.Extensions;
+
+public final class ExtensionsImpl implements Extensions {
+ private static final ClientLogger LOGGER = new ClientLogger(ExtensionsImpl.class);
+
+ private final ExtensionsClient innerClient;
+
+ private final com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager;
+
+ public ExtensionsImpl(
+ ExtensionsClient innerClient, com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public PagedIterable listByArcSetting(
+ String resourceGroupName, String clusterName, String arcSettingName) {
+ PagedIterable inner =
+ this.serviceClient().listByArcSetting(resourceGroupName, clusterName, arcSettingName);
+ return Utils.mapPage(inner, inner1 -> new ExtensionImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable listByArcSetting(
+ String resourceGroupName, String clusterName, String arcSettingName, Context context) {
+ PagedIterable inner =
+ this.serviceClient().listByArcSetting(resourceGroupName, clusterName, arcSettingName, context);
+ return Utils.mapPage(inner, inner1 -> new ExtensionImpl(inner1, this.manager()));
+ }
+
+ public Extension get(String resourceGroupName, String clusterName, String arcSettingName, String extensionName) {
+ ExtensionInner inner = this.serviceClient().get(resourceGroupName, clusterName, arcSettingName, extensionName);
+ if (inner != null) {
+ return new ExtensionImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response getWithResponse(
+ String resourceGroupName, String clusterName, String arcSettingName, String extensionName, Context context) {
+ Response inner =
+ this
+ .serviceClient()
+ .getWithResponse(resourceGroupName, clusterName, arcSettingName, extensionName, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new ExtensionImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public void delete(String resourceGroupName, String clusterName, String arcSettingName, String extensionName) {
+ this.serviceClient().delete(resourceGroupName, clusterName, arcSettingName, extensionName);
+ }
+
+ public void delete(
+ String resourceGroupName, String clusterName, String arcSettingName, String extensionName, Context context) {
+ this.serviceClient().delete(resourceGroupName, clusterName, arcSettingName, extensionName, context);
+ }
+
+ public Extension getById(String id) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String clusterName = Utils.getValueFromIdByName(id, "clusters");
+ if (clusterName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id)));
+ }
+ String arcSettingName = Utils.getValueFromIdByName(id, "arcSettings");
+ if (arcSettingName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'arcSettings'.", id)));
+ }
+ String extensionName = Utils.getValueFromIdByName(id, "extensions");
+ if (extensionName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'extensions'.", id)));
+ }
+ return this
+ .getWithResponse(resourceGroupName, clusterName, arcSettingName, extensionName, Context.NONE)
+ .getValue();
+ }
+
+ public Response getByIdWithResponse(String id, Context context) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String clusterName = Utils.getValueFromIdByName(id, "clusters");
+ if (clusterName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id)));
+ }
+ String arcSettingName = Utils.getValueFromIdByName(id, "arcSettings");
+ if (arcSettingName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'arcSettings'.", id)));
+ }
+ String extensionName = Utils.getValueFromIdByName(id, "extensions");
+ if (extensionName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'extensions'.", id)));
+ }
+ return this.getWithResponse(resourceGroupName, clusterName, arcSettingName, extensionName, context);
+ }
+
+ public void deleteById(String id) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String clusterName = Utils.getValueFromIdByName(id, "clusters");
+ if (clusterName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id)));
+ }
+ String arcSettingName = Utils.getValueFromIdByName(id, "arcSettings");
+ if (arcSettingName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'arcSettings'.", id)));
+ }
+ String extensionName = Utils.getValueFromIdByName(id, "extensions");
+ if (extensionName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'extensions'.", id)));
+ }
+ this.delete(resourceGroupName, clusterName, arcSettingName, extensionName, Context.NONE);
+ }
+
+ public void deleteByIdWithResponse(String id, Context context) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String clusterName = Utils.getValueFromIdByName(id, "clusters");
+ if (clusterName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id)));
+ }
+ String arcSettingName = Utils.getValueFromIdByName(id, "arcSettings");
+ if (arcSettingName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'arcSettings'.", id)));
+ }
+ String extensionName = Utils.getValueFromIdByName(id, "extensions");
+ if (extensionName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'extensions'.", id)));
+ }
+ this.delete(resourceGroupName, clusterName, arcSettingName, extensionName, context);
+ }
+
+ private ExtensionsClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager() {
+ return this.serviceManager;
+ }
+
+ public ExtensionImpl define(String name) {
+ return new ExtensionImpl(name, this.manager());
+ }
+}
diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/AvailableOperationsImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OperationListResultImpl.java
similarity index 62%
rename from sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/AvailableOperationsImpl.java
rename to sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OperationListResultImpl.java
index 5b15c5c41e449..5d406ea17f054 100644
--- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/AvailableOperationsImpl.java
+++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OperationListResultImpl.java
@@ -4,26 +4,26 @@
package com.azure.resourcemanager.azurestackhci.implementation;
-import com.azure.resourcemanager.azurestackhci.fluent.models.AvailableOperationsInner;
-import com.azure.resourcemanager.azurestackhci.models.AvailableOperations;
-import com.azure.resourcemanager.azurestackhci.models.OperationDetail;
+import com.azure.resourcemanager.azurestackhci.fluent.models.OperationListResultInner;
+import com.azure.resourcemanager.azurestackhci.models.Operation;
+import com.azure.resourcemanager.azurestackhci.models.OperationListResult;
import java.util.Collections;
import java.util.List;
-public final class AvailableOperationsImpl implements AvailableOperations {
- private AvailableOperationsInner innerObject;
+public final class OperationListResultImpl implements OperationListResult {
+ private OperationListResultInner innerObject;
private final com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager;
- AvailableOperationsImpl(
- AvailableOperationsInner innerObject,
+ OperationListResultImpl(
+ OperationListResultInner innerObject,
com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) {
this.innerObject = innerObject;
this.serviceManager = serviceManager;
}
- public List value() {
- List inner = this.innerModel().value();
+ public List value() {
+ List inner = this.innerModel().value();
if (inner != null) {
return Collections.unmodifiableList(inner);
} else {
@@ -35,7 +35,7 @@ public String nextLink() {
return this.innerModel().nextLink();
}
- public AvailableOperationsInner innerModel() {
+ public OperationListResultInner innerModel() {
return this.innerObject;
}
diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OperationsClientImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OperationsClientImpl.java
index 96b74acc66565..9bdf4c5016496 100644
--- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OperationsClientImpl.java
+++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OperationsClientImpl.java
@@ -20,15 +20,12 @@
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.azurestackhci.fluent.OperationsClient;
-import com.azure.resourcemanager.azurestackhci.fluent.models.AvailableOperationsInner;
+import com.azure.resourcemanager.azurestackhci.fluent.models.OperationListResultInner;
import reactor.core.publisher.Mono;
/** An instance of this class provides access to all the operations defined in OperationsClient. */
public final class OperationsClientImpl implements OperationsClient {
- private final ClientLogger logger = new ClientLogger(OperationsClientImpl.class);
-
/** The proxy service used to perform REST calls. */
private final OperationsService service;
@@ -57,7 +54,7 @@ private interface OperationsService {
@Get("/providers/Microsoft.AzureStackHCI/operations")
@ExpectedResponses({200})
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono> list(
+ Mono> list(
@HostParam("$host") String endpoint,
@QueryParam("api-version") String apiVersion,
@HeaderParam("Accept") String accept,
@@ -69,10 +66,11 @@ Mono> list(
*
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return available operations of the service.
+ * @return a list of REST API operations supported by an Azure Resource Provider along with {@link Response} on
+ * successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listWithResponseAsync() {
+ private Mono> listWithResponseAsync() {
if (this.client.getEndpoint() == null) {
return Mono
.error(
@@ -93,10 +91,11 @@ private Mono> listWithResponseAsync() {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return available operations of the service.
+ * @return a list of REST API operations supported by an Azure Resource Provider along with {@link Response} on
+ * successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listWithResponseAsync(Context context) {
+ private Mono> listWithResponseAsync(Context context) {
if (this.client.getEndpoint() == null) {
return Mono
.error(
@@ -113,13 +112,14 @@ private Mono> listWithResponseAsync(Context c
*
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return available operations of the service.
+ * @return a list of REST API operations supported by an Azure Resource Provider on successful completion of {@link
+ * Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono listAsync() {
+ private Mono listAsync() {
return listWithResponseAsync()
.flatMap(
- (Response res) -> {
+ (Response res) -> {
if (res.getValue() != null) {
return Mono.just(res.getValue());
} else {
@@ -133,10 +133,10 @@ private Mono listAsync() {
*
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return available operations of the service.
+ * @return a list of REST API operations supported by an Azure Resource Provider.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public AvailableOperationsInner list() {
+ public OperationListResultInner list() {
return listAsync().block();
}
@@ -147,10 +147,10 @@ public AvailableOperationsInner 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 available operations of the service.
+ * @return a list of REST API operations supported by an Azure Resource Provider along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public Response