diff --git a/sdk/hanaonazure/azure-resourcemanager-hanaonazure/CHANGELOG.md b/sdk/hanaonazure/azure-resourcemanager-hanaonazure/CHANGELOG.md
index bf979c3c6ead3..45b76cbf4f5dd 100644
--- a/sdk/hanaonazure/azure-resourcemanager-hanaonazure/CHANGELOG.md
+++ b/sdk/hanaonazure/azure-resourcemanager-hanaonazure/CHANGELOG.md
@@ -1,7 +1,8 @@
# Release History
-## 1.0.0-beta.2 (Unreleased)
+## 1.0.0-beta.1 (2021-06-17)
+- Azure Resource Manager Hana client library for Java. This package contains Microsoft Azure SDK for Hana Management SDK. HANA on Azure Client. Package tag package-2020-02-07-preview. 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-15)
diff --git a/sdk/hanaonazure/azure-resourcemanager-hanaonazure/README.md b/sdk/hanaonazure/azure-resourcemanager-hanaonazure/README.md
index d7950aec54cce..948939d37ac7c 100644
--- a/sdk/hanaonazure/azure-resourcemanager-hanaonazure/README.md
+++ b/sdk/hanaonazure/azure-resourcemanager-hanaonazure/README.md
@@ -2,7 +2,7 @@
Azure Resource Manager Hana client library for Java.
-This package contains Microsoft Azure SDK for Hana Management SDK. HANA on Azure Client. Package tag package-2017-11. 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 Hana Management SDK. HANA on Azure Client. Package tag package-2020-02-07-preview. 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-hanaonazure
- 1.0.0-beta.1
+ 1.0.0-beta.2
```
[//]: # ({x-version-update-end})
@@ -74,6 +74,8 @@ See [API design][design] for general introduction on design and key concepts on
## Examples
+
+
## Troubleshooting
## Next steps
diff --git a/sdk/hanaonazure/azure-resourcemanager-hanaonazure/pom.xml b/sdk/hanaonazure/azure-resourcemanager-hanaonazure/pom.xml
index 49af13d360776..2e7d63dbff7a5 100644
--- a/sdk/hanaonazure/azure-resourcemanager-hanaonazure/pom.xml
+++ b/sdk/hanaonazure/azure-resourcemanager-hanaonazure/pom.xml
@@ -1,67 +1,86 @@
- 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-hanaonazure
- 1.0.0-beta.2
- jar
+ com.azure.resourcemanager
+ azure-resourcemanager-hanaonazure
+ 1.0.0-beta.2
+ jar
- Microsoft Azure SDK for Hana Management
- This package contains Microsoft Azure SDK for Hana Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. HANA on Azure Client. Package tag package-2017-11.
- https://github.com/Azure/azure-sdk-for-java
+ Microsoft Azure SDK for Hana Management
+ This package contains Microsoft Azure SDK for Hana Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. HANA on Azure Client. Package tag package-2020-02-07-preview.
+ 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
-
-
-
-
- com.azure
- azure-core
- 1.17.0
-
-
- com.azure
- azure-core-management
- 1.3.0
-
-
-
-
-
- org.jacoco
- jacoco-maven-plugin
- 0.8.5
-
- true
-
-
-
-
+
+ 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
+
+
+
+
+ com.azure
+ azure-core
+ 1.17.0
+
+
+ com.azure
+ azure-core-management
+ 1.3.0
+
+
+
+
+
+ org.jacoco
+ jacoco-maven-plugin
+ 0.8.5
+
+ true
+
+
+
+ org.revapi
+ revapi-maven-plugin
+ 0.11.2
+
+
+
+ -
+
java.method.addedToInterface
+
+ -
+ true
+
.*
+ com\.azure\.resourcemanager(\.[^.]+)+\.fluent(\.[^.]+)*
+
+
+
+
+
+
+
diff --git a/sdk/hanaonazure/azure-resourcemanager-hanaonazure/src/main/java/com/azure/resourcemanager/hanaonazure/HanaManager.java b/sdk/hanaonazure/azure-resourcemanager-hanaonazure/src/main/java/com/azure/resourcemanager/hanaonazure/HanaManager.java
index 04211a9e28319..ed6ac079c37ac 100644
--- a/sdk/hanaonazure/azure-resourcemanager-hanaonazure/src/main/java/com/azure/resourcemanager/hanaonazure/HanaManager.java
+++ b/sdk/hanaonazure/azure-resourcemanager-hanaonazure/src/main/java/com/azure/resourcemanager/hanaonazure/HanaManager.java
@@ -9,7 +9,6 @@
import com.azure.core.http.HttpPipeline;
import com.azure.core.http.HttpPipelineBuilder;
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,15 +16,18 @@
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.hanaonazure.fluent.HanaManagementClient;
-import com.azure.resourcemanager.hanaonazure.implementation.HanaInstancesImpl;
import com.azure.resourcemanager.hanaonazure.implementation.HanaManagementClientBuilder;
import com.azure.resourcemanager.hanaonazure.implementation.OperationsImpl;
-import com.azure.resourcemanager.hanaonazure.models.HanaInstances;
+import com.azure.resourcemanager.hanaonazure.implementation.ProviderInstancesImpl;
+import com.azure.resourcemanager.hanaonazure.implementation.SapMonitorsImpl;
import com.azure.resourcemanager.hanaonazure.models.Operations;
+import com.azure.resourcemanager.hanaonazure.models.ProviderInstances;
+import com.azure.resourcemanager.hanaonazure.models.SapMonitors;
import java.time.Duration;
import java.time.temporal.ChronoUnit;
import java.util.ArrayList;
@@ -36,7 +38,9 @@
public final class HanaManager {
private Operations operations;
- private HanaInstances hanaInstances;
+ private SapMonitors sapMonitors;
+
+ private ProviderInstances providerInstances;
private final HanaManagementClient clientObject;
@@ -81,6 +85,7 @@ public static final class Configurable {
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 +125,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.
*
@@ -176,6 +192,9 @@ public HanaManager authenticate(TokenCredential credential, AzureProfile profile
userAgentBuilder.append(" (auto-generated)");
}
+ if (scopes.isEmpty()) {
+ scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default");
+ }
if (retryPolicy == null) {
retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS);
}
@@ -185,10 +204,7 @@ public HanaManager authenticate(TokenCredential credential, AzureProfile profile
HttpPolicyProviders.addBeforeRetryPolicies(policies);
policies.add(retryPolicy);
policies.add(new AddDatePolicy());
- policies
- .add(
- new BearerTokenAuthenticationPolicy(
- credential, profile.getEnvironment().getManagementEndpoint() + "/.default"));
+ policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0])));
policies.addAll(this.policies);
HttpPolicyProviders.addAfterRetryPolicies(policies);
policies.add(new HttpLoggingPolicy(httpLogOptions));
@@ -209,12 +225,20 @@ public Operations operations() {
return operations;
}
- /** @return Resource collection API of HanaInstances. */
- public HanaInstances hanaInstances() {
- if (this.hanaInstances == null) {
- this.hanaInstances = new HanaInstancesImpl(clientObject.getHanaInstances(), this);
+ /** @return Resource collection API of SapMonitors. */
+ public SapMonitors sapMonitors() {
+ if (this.sapMonitors == null) {
+ this.sapMonitors = new SapMonitorsImpl(clientObject.getSapMonitors(), this);
+ }
+ return sapMonitors;
+ }
+
+ /** @return Resource collection API of ProviderInstances. */
+ public ProviderInstances providerInstances() {
+ if (this.providerInstances == null) {
+ this.providerInstances = new ProviderInstancesImpl(clientObject.getProviderInstances(), this);
}
- return hanaInstances;
+ return providerInstances;
}
/**
diff --git a/sdk/hanaonazure/azure-resourcemanager-hanaonazure/src/main/java/com/azure/resourcemanager/hanaonazure/fluent/HanaInstancesClient.java b/sdk/hanaonazure/azure-resourcemanager-hanaonazure/src/main/java/com/azure/resourcemanager/hanaonazure/fluent/HanaInstancesClient.java
deleted file mode 100644
index 1a76c1c69c8d1..0000000000000
--- a/sdk/hanaonazure/azure-resourcemanager-hanaonazure/src/main/java/com/azure/resourcemanager/hanaonazure/fluent/HanaInstancesClient.java
+++ /dev/null
@@ -1,398 +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.hanaonazure.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.hanaonazure.fluent.models.HanaInstanceInner;
-import com.azure.resourcemanager.hanaonazure.models.Tags;
-
-/** An instance of this class provides access to all the operations defined in HanaInstancesClient. */
-public interface HanaInstancesClient {
- /**
- * Gets a list of SAP HANA instances in the specified subscription. The operations returns various properties of
- * each SAP HANA on Azure instance.
- *
- * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a list of SAP HANA instances in the specified subscription.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable list();
-
- /**
- * Gets a list of SAP HANA instances in the specified subscription. The operations returns various properties of
- * each SAP HANA on Azure instance.
- *
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a list of SAP HANA instances in the specified subscription.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable list(Context context);
-
- /**
- * Gets a list of SAP HANA instances in the specified subscription and the resource group. The operations returns
- * various properties of each SAP HANA on Azure instance.
- *
- * @param resourceGroupName Name of the resource group.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a list of SAP HANA instances in the specified subscription and the resource group.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable listByResourceGroup(String resourceGroupName);
-
- /**
- * Gets a list of SAP HANA instances in the specified subscription and the resource group. The operations returns
- * various properties of each SAP HANA on Azure instance.
- *
- * @param resourceGroupName Name of the resource group.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a list of SAP HANA instances in the specified subscription and the resource group.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable listByResourceGroup(String resourceGroupName, Context context);
-
- /**
- * Gets properties of a SAP HANA instance for the specified subscription, resource group, and instance name.
- *
- * @param resourceGroupName Name of the resource group.
- * @param hanaInstanceName Name of the SAP HANA on Azure instance.
- * @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 properties of a SAP HANA instance for the specified subscription, resource group, and instance name.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- HanaInstanceInner getByResourceGroup(String resourceGroupName, String hanaInstanceName);
-
- /**
- * Gets properties of a SAP HANA instance for the specified subscription, resource group, and instance name.
- *
- * @param resourceGroupName Name of the resource group.
- * @param hanaInstanceName Name of the SAP HANA on Azure instance.
- * @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 properties of a SAP HANA instance for the specified subscription, resource group, and instance name.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- Response getByResourceGroupWithResponse(
- String resourceGroupName, String hanaInstanceName, Context context);
-
- /**
- * Creates a SAP HANA instance for the specified subscription, resource group, and instance name.
- *
- * @param resourceGroupName Name of the resource group.
- * @param hanaInstanceName Name of the SAP HANA on Azure instance.
- * @param hanaInstanceParameter Request body representing a HanaInstance.
- * @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 hANA instance info on Azure (ARM properties and HANA properties).
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- SyncPoller, HanaInstanceInner> beginCreate(
- String resourceGroupName, String hanaInstanceName, HanaInstanceInner hanaInstanceParameter);
-
- /**
- * Creates a SAP HANA instance for the specified subscription, resource group, and instance name.
- *
- * @param resourceGroupName Name of the resource group.
- * @param hanaInstanceName Name of the SAP HANA on Azure instance.
- * @param hanaInstanceParameter Request body representing a HanaInstance.
- * @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 hANA instance info on Azure (ARM properties and HANA properties).
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- SyncPoller, HanaInstanceInner> beginCreate(
- String resourceGroupName, String hanaInstanceName, HanaInstanceInner hanaInstanceParameter, Context context);
-
- /**
- * Creates a SAP HANA instance for the specified subscription, resource group, and instance name.
- *
- * @param resourceGroupName Name of the resource group.
- * @param hanaInstanceName Name of the SAP HANA on Azure instance.
- * @param hanaInstanceParameter Request body representing a HanaInstance.
- * @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 hANA instance info on Azure (ARM properties and HANA properties).
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- HanaInstanceInner create(
- String resourceGroupName, String hanaInstanceName, HanaInstanceInner hanaInstanceParameter);
-
- /**
- * Creates a SAP HANA instance for the specified subscription, resource group, and instance name.
- *
- * @param resourceGroupName Name of the resource group.
- * @param hanaInstanceName Name of the SAP HANA on Azure instance.
- * @param hanaInstanceParameter Request body representing a HanaInstance.
- * @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 hANA instance info on Azure (ARM properties and HANA properties).
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- HanaInstanceInner create(
- String resourceGroupName, String hanaInstanceName, HanaInstanceInner hanaInstanceParameter, Context context);
-
- /**
- * Deletes a SAP HANA instance with the specified subscription, resource group, and instance name.
- *
- * @param resourceGroupName Name of the resource group.
- * @param hanaInstanceName Name of the SAP HANA on Azure instance.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- SyncPoller, Void> beginDelete(String resourceGroupName, String hanaInstanceName);
-
- /**
- * Deletes a SAP HANA instance with the specified subscription, resource group, and instance name.
- *
- * @param resourceGroupName Name of the resource group.
- * @param hanaInstanceName Name of the SAP HANA on Azure instance.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- SyncPoller, Void> beginDelete(String resourceGroupName, String hanaInstanceName, Context context);
-
- /**
- * Deletes a SAP HANA instance with the specified subscription, resource group, and instance name.
- *
- * @param resourceGroupName Name of the resource group.
- * @param hanaInstanceName Name of the SAP HANA on Azure instance.
- * @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 hanaInstanceName);
-
- /**
- * Deletes a SAP HANA instance with the specified subscription, resource group, and instance name.
- *
- * @param resourceGroupName Name of the resource group.
- * @param hanaInstanceName Name of the SAP HANA on Azure instance.
- * @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 hanaInstanceName, Context context);
-
- /**
- * Patches the Tags field of a SAP HANA instance for the specified subscription, resource group, and instance name.
- *
- * @param resourceGroupName Name of the resource group.
- * @param hanaInstanceName Name of the SAP HANA on Azure instance.
- * @param tagsParameter Request body that only contains the new Tags field.
- * @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 hANA instance info on Azure (ARM properties and HANA properties).
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- HanaInstanceInner update(String resourceGroupName, String hanaInstanceName, Tags tagsParameter);
-
- /**
- * Patches the Tags field of a SAP HANA instance for the specified subscription, resource group, and instance name.
- *
- * @param resourceGroupName Name of the resource group.
- * @param hanaInstanceName Name of the SAP HANA on Azure instance.
- * @param tagsParameter Request body that only contains the new Tags field.
- * @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 hANA instance info on Azure (ARM properties and HANA properties).
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- Response updateWithResponse(
- String resourceGroupName, String hanaInstanceName, Tags tagsParameter, Context context);
-
- /**
- * The operation to restart a SAP HANA instance.
- *
- * @param resourceGroupName Name of the resource group.
- * @param hanaInstanceName Name of the SAP HANA on Azure instance.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- SyncPoller, Void> beginRestart(String resourceGroupName, String hanaInstanceName);
-
- /**
- * The operation to restart a SAP HANA instance.
- *
- * @param resourceGroupName Name of the resource group.
- * @param hanaInstanceName Name of the SAP HANA on Azure instance.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- SyncPoller, Void> beginRestart(String resourceGroupName, String hanaInstanceName, Context context);
-
- /**
- * The operation to restart a SAP HANA instance.
- *
- * @param resourceGroupName Name of the resource group.
- * @param hanaInstanceName Name of the SAP HANA on Azure instance.
- * @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 restart(String resourceGroupName, String hanaInstanceName);
-
- /**
- * The operation to restart a SAP HANA instance.
- *
- * @param resourceGroupName Name of the resource group.
- * @param hanaInstanceName Name of the SAP HANA on Azure instance.
- * @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 restart(String resourceGroupName, String hanaInstanceName, Context context);
-
- /**
- * The operation to start a SAP HANA instance.
- *
- * @param resourceGroupName Name of the resource group.
- * @param hanaInstanceName Name of the SAP HANA on Azure instance.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- SyncPoller, Void> beginStart(String resourceGroupName, String hanaInstanceName);
-
- /**
- * The operation to start a SAP HANA instance.
- *
- * @param resourceGroupName Name of the resource group.
- * @param hanaInstanceName Name of the SAP HANA on Azure instance.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- SyncPoller, Void> beginStart(String resourceGroupName, String hanaInstanceName, Context context);
-
- /**
- * The operation to start a SAP HANA instance.
- *
- * @param resourceGroupName Name of the resource group.
- * @param hanaInstanceName Name of the SAP HANA on Azure instance.
- * @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 start(String resourceGroupName, String hanaInstanceName);
-
- /**
- * The operation to start a SAP HANA instance.
- *
- * @param resourceGroupName Name of the resource group.
- * @param hanaInstanceName Name of the SAP HANA on Azure instance.
- * @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 start(String resourceGroupName, String hanaInstanceName, Context context);
-
- /**
- * The operation to shutdown a SAP HANA instance.
- *
- * @param resourceGroupName Name of the resource group.
- * @param hanaInstanceName Name of the SAP HANA on Azure instance.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- SyncPoller, Void> beginShutdown(String resourceGroupName, String hanaInstanceName);
-
- /**
- * The operation to shutdown a SAP HANA instance.
- *
- * @param resourceGroupName Name of the resource group.
- * @param hanaInstanceName Name of the SAP HANA on Azure instance.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- SyncPoller, Void> beginShutdown(
- String resourceGroupName, String hanaInstanceName, Context context);
-
- /**
- * The operation to shutdown a SAP HANA instance.
- *
- * @param resourceGroupName Name of the resource group.
- * @param hanaInstanceName Name of the SAP HANA on Azure instance.
- * @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 shutdown(String resourceGroupName, String hanaInstanceName);
-
- /**
- * The operation to shutdown a SAP HANA instance.
- *
- * @param resourceGroupName Name of the resource group.
- * @param hanaInstanceName Name of the SAP HANA on Azure instance.
- * @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 shutdown(String resourceGroupName, String hanaInstanceName, Context context);
-}
diff --git a/sdk/hanaonazure/azure-resourcemanager-hanaonazure/src/main/java/com/azure/resourcemanager/hanaonazure/fluent/HanaManagementClient.java b/sdk/hanaonazure/azure-resourcemanager-hanaonazure/src/main/java/com/azure/resourcemanager/hanaonazure/fluent/HanaManagementClient.java
index 26f52a07613a6..b21d82ddc6562 100644
--- a/sdk/hanaonazure/azure-resourcemanager-hanaonazure/src/main/java/com/azure/resourcemanager/hanaonazure/fluent/HanaManagementClient.java
+++ b/sdk/hanaonazure/azure-resourcemanager-hanaonazure/src/main/java/com/azure/resourcemanager/hanaonazure/fluent/HanaManagementClient.java
@@ -53,9 +53,16 @@ public interface HanaManagementClient {
OperationsClient getOperations();
/**
- * Gets the HanaInstancesClient object to access its operations.
+ * Gets the SapMonitorsClient object to access its operations.
*
- * @return the HanaInstancesClient object.
+ * @return the SapMonitorsClient object.
*/
- HanaInstancesClient getHanaInstances();
+ SapMonitorsClient getSapMonitors();
+
+ /**
+ * Gets the ProviderInstancesClient object to access its operations.
+ *
+ * @return the ProviderInstancesClient object.
+ */
+ ProviderInstancesClient getProviderInstances();
}
diff --git a/sdk/hanaonazure/azure-resourcemanager-hanaonazure/src/main/java/com/azure/resourcemanager/hanaonazure/fluent/ProviderInstancesClient.java b/sdk/hanaonazure/azure-resourcemanager-hanaonazure/src/main/java/com/azure/resourcemanager/hanaonazure/fluent/ProviderInstancesClient.java
new file mode 100644
index 0000000000000..fabc44e42f5ab
--- /dev/null
+++ b/sdk/hanaonazure/azure-resourcemanager-hanaonazure/src/main/java/com/azure/resourcemanager/hanaonazure/fluent/ProviderInstancesClient.java
@@ -0,0 +1,218 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.hanaonazure.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.hanaonazure.fluent.models.ProviderInstanceInner;
+
+/** An instance of this class provides access to all the operations defined in ProviderInstancesClient. */
+public interface ProviderInstancesClient {
+ /**
+ * Gets a list of provider instances in the specified SAP monitor. The operations returns various properties of each
+ * provider instances.
+ *
+ * @param resourceGroupName Name of the resource group.
+ * @param sapMonitorName Name of the SAP monitor resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of provider instances in the specified SAP monitor.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String resourceGroupName, String sapMonitorName);
+
+ /**
+ * Gets a list of provider instances in the specified SAP monitor. The operations returns various properties of each
+ * provider instances.
+ *
+ * @param resourceGroupName Name of the resource group.
+ * @param sapMonitorName Name of the SAP monitor resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of provider instances in the specified SAP monitor.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String resourceGroupName, String sapMonitorName, Context context);
+
+ /**
+ * Gets properties of a provider instance for the specified subscription, resource group, SapMonitor name, and
+ * resource name.
+ *
+ * @param resourceGroupName Name of the resource group.
+ * @param sapMonitorName Name of the SAP monitor resource.
+ * @param providerInstanceName Name of the provider instance.
+ * @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 properties of a provider instance for the specified subscription, resource group, SapMonitor name, and
+ * resource name.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ProviderInstanceInner get(String resourceGroupName, String sapMonitorName, String providerInstanceName);
+
+ /**
+ * Gets properties of a provider instance for the specified subscription, resource group, SapMonitor name, and
+ * resource name.
+ *
+ * @param resourceGroupName Name of the resource group.
+ * @param sapMonitorName Name of the SAP monitor resource.
+ * @param providerInstanceName Name of the provider instance.
+ * @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 properties of a provider instance for the specified subscription, resource group, SapMonitor name, and
+ * resource name.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String resourceGroupName, String sapMonitorName, String providerInstanceName, Context context);
+
+ /**
+ * Creates a provider instance for the specified subscription, resource group, SapMonitor name, and resource name.
+ *
+ * @param resourceGroupName Name of the resource group.
+ * @param sapMonitorName Name of the SAP monitor resource.
+ * @param providerInstanceName Name of the provider instance.
+ * @param providerInstanceParameter Request body representing a provider instance.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a provider instance associated with a SAP monitor.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, ProviderInstanceInner> beginCreate(
+ String resourceGroupName,
+ String sapMonitorName,
+ String providerInstanceName,
+ ProviderInstanceInner providerInstanceParameter);
+
+ /**
+ * Creates a provider instance for the specified subscription, resource group, SapMonitor name, and resource name.
+ *
+ * @param resourceGroupName Name of the resource group.
+ * @param sapMonitorName Name of the SAP monitor resource.
+ * @param providerInstanceName Name of the provider instance.
+ * @param providerInstanceParameter Request body representing a provider instance.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a provider instance associated with a SAP monitor.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, ProviderInstanceInner> beginCreate(
+ String resourceGroupName,
+ String sapMonitorName,
+ String providerInstanceName,
+ ProviderInstanceInner providerInstanceParameter,
+ Context context);
+
+ /**
+ * Creates a provider instance for the specified subscription, resource group, SapMonitor name, and resource name.
+ *
+ * @param resourceGroupName Name of the resource group.
+ * @param sapMonitorName Name of the SAP monitor resource.
+ * @param providerInstanceName Name of the provider instance.
+ * @param providerInstanceParameter Request body representing a provider instance.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a provider instance associated with a SAP monitor.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ProviderInstanceInner create(
+ String resourceGroupName,
+ String sapMonitorName,
+ String providerInstanceName,
+ ProviderInstanceInner providerInstanceParameter);
+
+ /**
+ * Creates a provider instance for the specified subscription, resource group, SapMonitor name, and resource name.
+ *
+ * @param resourceGroupName Name of the resource group.
+ * @param sapMonitorName Name of the SAP monitor resource.
+ * @param providerInstanceName Name of the provider instance.
+ * @param providerInstanceParameter Request body representing a provider instance.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a provider instance associated with a SAP monitor.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ProviderInstanceInner create(
+ String resourceGroupName,
+ String sapMonitorName,
+ String providerInstanceName,
+ ProviderInstanceInner providerInstanceParameter,
+ Context context);
+
+ /**
+ * Deletes a provider instance for the specified subscription, resource group, SapMonitor name, and resource name.
+ *
+ * @param resourceGroupName Name of the resource group.
+ * @param sapMonitorName Name of the SAP monitor resource.
+ * @param providerInstanceName Name of the provider instance.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, Void> beginDelete(
+ String resourceGroupName, String sapMonitorName, String providerInstanceName);
+
+ /**
+ * Deletes a provider instance for the specified subscription, resource group, SapMonitor name, and resource name.
+ *
+ * @param resourceGroupName Name of the resource group.
+ * @param sapMonitorName Name of the SAP monitor resource.
+ * @param providerInstanceName Name of the provider instance.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, Void> beginDelete(
+ String resourceGroupName, String sapMonitorName, String providerInstanceName, Context context);
+
+ /**
+ * Deletes a provider instance for the specified subscription, resource group, SapMonitor name, and resource name.
+ *
+ * @param resourceGroupName Name of the resource group.
+ * @param sapMonitorName Name of the SAP monitor resource.
+ * @param providerInstanceName Name of the provider instance.
+ * @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 sapMonitorName, String providerInstanceName);
+
+ /**
+ * Deletes a provider instance for the specified subscription, resource group, SapMonitor name, and resource name.
+ *
+ * @param resourceGroupName Name of the resource group.
+ * @param sapMonitorName Name of the SAP monitor resource.
+ * @param providerInstanceName Name of the provider instance.
+ * @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 sapMonitorName, String providerInstanceName, Context context);
+}
diff --git a/sdk/hanaonazure/azure-resourcemanager-hanaonazure/src/main/java/com/azure/resourcemanager/hanaonazure/fluent/SapMonitorsClient.java b/sdk/hanaonazure/azure-resourcemanager-hanaonazure/src/main/java/com/azure/resourcemanager/hanaonazure/fluent/SapMonitorsClient.java
new file mode 100644
index 0000000000000..aaa478483361b
--- /dev/null
+++ b/sdk/hanaonazure/azure-resourcemanager-hanaonazure/src/main/java/com/azure/resourcemanager/hanaonazure/fluent/SapMonitorsClient.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.hanaonazure.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.hanaonazure.fluent.models.SapMonitorInner;
+import com.azure.resourcemanager.hanaonazure.models.Tags;
+
+/** An instance of this class provides access to all the operations defined in SapMonitorsClient. */
+public interface SapMonitorsClient {
+ /**
+ * Gets a list of SAP monitors in the specified subscription. The operations returns various properties of each SAP
+ * monitor.
+ *
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of SAP monitors in the specified subscription.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
+
+ /**
+ * Gets a list of SAP monitors in the specified subscription. The operations returns various properties of each SAP
+ * monitor.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of SAP monitors in the specified subscription.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(Context context);
+
+ /**
+ * Gets properties of a SAP monitor for the specified subscription, resource group, and resource name.
+ *
+ * @param resourceGroupName Name of the resource group.
+ * @param sapMonitorName Name of the SAP monitor resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return properties of a SAP monitor for the specified subscription, resource group, and resource name.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SapMonitorInner getByResourceGroup(String resourceGroupName, String sapMonitorName);
+
+ /**
+ * Gets properties of a SAP monitor for the specified subscription, resource group, and resource name.
+ *
+ * @param resourceGroupName Name of the resource group.
+ * @param sapMonitorName Name of the SAP monitor resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return properties of a SAP monitor for the specified subscription, resource group, and resource name.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getByResourceGroupWithResponse(
+ String resourceGroupName, String sapMonitorName, Context context);
+
+ /**
+ * Creates a SAP monitor for the specified subscription, resource group, and resource name.
+ *
+ * @param resourceGroupName Name of the resource group.
+ * @param sapMonitorName Name of the SAP monitor resource.
+ * @param sapMonitorParameter Request body representing a SAP Monitor.
+ * @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 sAP monitor info on Azure (ARM properties and SAP monitor properties).
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, SapMonitorInner> beginCreate(
+ String resourceGroupName, String sapMonitorName, SapMonitorInner sapMonitorParameter);
+
+ /**
+ * Creates a SAP monitor for the specified subscription, resource group, and resource name.
+ *
+ * @param resourceGroupName Name of the resource group.
+ * @param sapMonitorName Name of the SAP monitor resource.
+ * @param sapMonitorParameter Request body representing a SAP Monitor.
+ * @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 sAP monitor info on Azure (ARM properties and SAP monitor properties).
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, SapMonitorInner> beginCreate(
+ String resourceGroupName, String sapMonitorName, SapMonitorInner sapMonitorParameter, Context context);
+
+ /**
+ * Creates a SAP monitor for the specified subscription, resource group, and resource name.
+ *
+ * @param resourceGroupName Name of the resource group.
+ * @param sapMonitorName Name of the SAP monitor resource.
+ * @param sapMonitorParameter Request body representing a SAP Monitor.
+ * @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 sAP monitor info on Azure (ARM properties and SAP monitor properties).
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SapMonitorInner create(String resourceGroupName, String sapMonitorName, SapMonitorInner sapMonitorParameter);
+
+ /**
+ * Creates a SAP monitor for the specified subscription, resource group, and resource name.
+ *
+ * @param resourceGroupName Name of the resource group.
+ * @param sapMonitorName Name of the SAP monitor resource.
+ * @param sapMonitorParameter Request body representing a SAP Monitor.
+ * @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 sAP monitor info on Azure (ARM properties and SAP monitor properties).
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SapMonitorInner create(
+ String resourceGroupName, String sapMonitorName, SapMonitorInner sapMonitorParameter, Context context);
+
+ /**
+ * Deletes a SAP monitor with the specified subscription, resource group, and monitor name.
+ *
+ * @param resourceGroupName Name of the resource group.
+ * @param sapMonitorName Name of the SAP monitor resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, Void> beginDelete(String resourceGroupName, String sapMonitorName);
+
+ /**
+ * Deletes a SAP monitor with the specified subscription, resource group, and monitor name.
+ *
+ * @param resourceGroupName Name of the resource group.
+ * @param sapMonitorName Name of the SAP monitor resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, Void> beginDelete(String resourceGroupName, String sapMonitorName, Context context);
+
+ /**
+ * Deletes a SAP monitor with the specified subscription, resource group, and monitor name.
+ *
+ * @param resourceGroupName Name of the resource group.
+ * @param sapMonitorName Name of the SAP monitor resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String sapMonitorName);
+
+ /**
+ * Deletes a SAP monitor with the specified subscription, resource group, and monitor name.
+ *
+ * @param resourceGroupName Name of the resource group.
+ * @param sapMonitorName Name of the SAP monitor resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String sapMonitorName, Context context);
+
+ /**
+ * Patches the Tags field of a SAP monitor for the specified subscription, resource group, and monitor name.
+ *
+ * @param resourceGroupName Name of the resource group.
+ * @param sapMonitorName Name of the SAP monitor resource.
+ * @param tagsParameter Request body that only contains the new Tags field.
+ * @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 sAP monitor info on Azure (ARM properties and SAP monitor properties).
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SapMonitorInner update(String resourceGroupName, String sapMonitorName, Tags tagsParameter);
+
+ /**
+ * Patches the Tags field of a SAP monitor for the specified subscription, resource group, and monitor name.
+ *
+ * @param resourceGroupName Name of the resource group.
+ * @param sapMonitorName Name of the SAP monitor resource.
+ * @param tagsParameter Request body that only contains the new Tags field.
+ * @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 sAP monitor info on Azure (ARM properties and SAP monitor properties).
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response updateWithResponse(
+ String resourceGroupName, String sapMonitorName, Tags tagsParameter, Context context);
+}
diff --git a/sdk/hanaonazure/azure-resourcemanager-hanaonazure/src/main/java/com/azure/resourcemanager/hanaonazure/fluent/models/HanaInstanceInner.java b/sdk/hanaonazure/azure-resourcemanager-hanaonazure/src/main/java/com/azure/resourcemanager/hanaonazure/fluent/models/HanaInstanceInner.java
deleted file mode 100644
index 0c2258dfea6c6..0000000000000
--- a/sdk/hanaonazure/azure-resourcemanager-hanaonazure/src/main/java/com/azure/resourcemanager/hanaonazure/fluent/models/HanaInstanceInner.java
+++ /dev/null
@@ -1,321 +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.hanaonazure.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.resourcemanager.hanaonazure.models.HanaInstancePowerStateEnum;
-import com.azure.resourcemanager.hanaonazure.models.HanaProvisioningStatesEnum;
-import com.azure.resourcemanager.hanaonazure.models.HardwareProfile;
-import com.azure.resourcemanager.hanaonazure.models.NetworkProfile;
-import com.azure.resourcemanager.hanaonazure.models.OSProfile;
-import com.azure.resourcemanager.hanaonazure.models.StorageProfile;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import java.util.Map;
-
-/** HANA instance info on Azure (ARM properties and HANA properties). */
-@JsonFlatten
-@Fluent
-public class HanaInstanceInner extends Resource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(HanaInstanceInner.class);
-
- /*
- * Specifies the hardware settings for the HANA instance.
- */
- @JsonProperty(value = "properties.hardwareProfile")
- private HardwareProfile hardwareProfile;
-
- /*
- * Specifies the storage settings for the HANA instance disks.
- */
- @JsonProperty(value = "properties.storageProfile")
- private StorageProfile storageProfile;
-
- /*
- * Specifies the operating system settings for the HANA instance.
- */
- @JsonProperty(value = "properties.osProfile")
- private OSProfile osProfile;
-
- /*
- * Specifies the network settings for the HANA instance.
- */
- @JsonProperty(value = "properties.networkProfile")
- private NetworkProfile networkProfile;
-
- /*
- * Specifies the HANA instance unique ID.
- */
- @JsonProperty(value = "properties.hanaInstanceId")
- private String hanaInstanceId;
-
- /*
- * Resource power state
- */
- @JsonProperty(value = "properties.powerState")
- private HanaInstancePowerStateEnum powerState;
-
- /*
- * Resource proximity placement group
- */
- @JsonProperty(value = "properties.proximityPlacementGroup")
- private String proximityPlacementGroup;
-
- /*
- * Hardware revision of a HANA instance
- */
- @JsonProperty(value = "properties.hwRevision")
- private String hwRevision;
-
- /*
- * ARM ID of another HanaInstance that will share a network with this
- * HanaInstance
- */
- @JsonProperty(value = "properties.partnerNodeId")
- private String partnerNodeId;
-
- /*
- * State of provisioning of the HanaInstance
- */
- @JsonProperty(value = "properties.provisioningState")
- private HanaProvisioningStatesEnum provisioningState;
-
- /**
- * Get the hardwareProfile property: Specifies the hardware settings for the HANA instance.
- *
- * @return the hardwareProfile value.
- */
- public HardwareProfile hardwareProfile() {
- return this.hardwareProfile;
- }
-
- /**
- * Set the hardwareProfile property: Specifies the hardware settings for the HANA instance.
- *
- * @param hardwareProfile the hardwareProfile value to set.
- * @return the HanaInstanceInner object itself.
- */
- public HanaInstanceInner withHardwareProfile(HardwareProfile hardwareProfile) {
- this.hardwareProfile = hardwareProfile;
- return this;
- }
-
- /**
- * Get the storageProfile property: Specifies the storage settings for the HANA instance disks.
- *
- * @return the storageProfile value.
- */
- public StorageProfile storageProfile() {
- return this.storageProfile;
- }
-
- /**
- * Set the storageProfile property: Specifies the storage settings for the HANA instance disks.
- *
- * @param storageProfile the storageProfile value to set.
- * @return the HanaInstanceInner object itself.
- */
- public HanaInstanceInner withStorageProfile(StorageProfile storageProfile) {
- this.storageProfile = storageProfile;
- return this;
- }
-
- /**
- * Get the osProfile property: Specifies the operating system settings for the HANA instance.
- *
- * @return the osProfile value.
- */
- public OSProfile osProfile() {
- return this.osProfile;
- }
-
- /**
- * Set the osProfile property: Specifies the operating system settings for the HANA instance.
- *
- * @param osProfile the osProfile value to set.
- * @return the HanaInstanceInner object itself.
- */
- public HanaInstanceInner withOsProfile(OSProfile osProfile) {
- this.osProfile = osProfile;
- return this;
- }
-
- /**
- * Get the networkProfile property: Specifies the network settings for the HANA instance.
- *
- * @return the networkProfile value.
- */
- public NetworkProfile networkProfile() {
- return this.networkProfile;
- }
-
- /**
- * Set the networkProfile property: Specifies the network settings for the HANA instance.
- *
- * @param networkProfile the networkProfile value to set.
- * @return the HanaInstanceInner object itself.
- */
- public HanaInstanceInner withNetworkProfile(NetworkProfile networkProfile) {
- this.networkProfile = networkProfile;
- return this;
- }
-
- /**
- * Get the hanaInstanceId property: Specifies the HANA instance unique ID.
- *
- * @return the hanaInstanceId value.
- */
- public String hanaInstanceId() {
- return this.hanaInstanceId;
- }
-
- /**
- * Set the hanaInstanceId property: Specifies the HANA instance unique ID.
- *
- * @param hanaInstanceId the hanaInstanceId value to set.
- * @return the HanaInstanceInner object itself.
- */
- public HanaInstanceInner withHanaInstanceId(String hanaInstanceId) {
- this.hanaInstanceId = hanaInstanceId;
- return this;
- }
-
- /**
- * Get the powerState property: Resource power state.
- *
- * @return the powerState value.
- */
- public HanaInstancePowerStateEnum powerState() {
- return this.powerState;
- }
-
- /**
- * Set the powerState property: Resource power state.
- *
- * @param powerState the powerState value to set.
- * @return the HanaInstanceInner object itself.
- */
- public HanaInstanceInner withPowerState(HanaInstancePowerStateEnum powerState) {
- this.powerState = powerState;
- return this;
- }
-
- /**
- * Get the proximityPlacementGroup property: Resource proximity placement group.
- *
- * @return the proximityPlacementGroup value.
- */
- public String proximityPlacementGroup() {
- return this.proximityPlacementGroup;
- }
-
- /**
- * Set the proximityPlacementGroup property: Resource proximity placement group.
- *
- * @param proximityPlacementGroup the proximityPlacementGroup value to set.
- * @return the HanaInstanceInner object itself.
- */
- public HanaInstanceInner withProximityPlacementGroup(String proximityPlacementGroup) {
- this.proximityPlacementGroup = proximityPlacementGroup;
- return this;
- }
-
- /**
- * Get the hwRevision property: Hardware revision of a HANA instance.
- *
- * @return the hwRevision value.
- */
- public String hwRevision() {
- return this.hwRevision;
- }
-
- /**
- * Set the hwRevision property: Hardware revision of a HANA instance.
- *
- * @param hwRevision the hwRevision value to set.
- * @return the HanaInstanceInner object itself.
- */
- public HanaInstanceInner withHwRevision(String hwRevision) {
- this.hwRevision = hwRevision;
- return this;
- }
-
- /**
- * Get the partnerNodeId property: ARM ID of another HanaInstance that will share a network with this HanaInstance.
- *
- * @return the partnerNodeId value.
- */
- public String partnerNodeId() {
- return this.partnerNodeId;
- }
-
- /**
- * Set the partnerNodeId property: ARM ID of another HanaInstance that will share a network with this HanaInstance.
- *
- * @param partnerNodeId the partnerNodeId value to set.
- * @return the HanaInstanceInner object itself.
- */
- public HanaInstanceInner withPartnerNodeId(String partnerNodeId) {
- this.partnerNodeId = partnerNodeId;
- return this;
- }
-
- /**
- * Get the provisioningState property: State of provisioning of the HanaInstance.
- *
- * @return the provisioningState value.
- */
- public HanaProvisioningStatesEnum provisioningState() {
- return this.provisioningState;
- }
-
- /**
- * Set the provisioningState property: State of provisioning of the HanaInstance.
- *
- * @param provisioningState the provisioningState value to set.
- * @return the HanaInstanceInner object itself.
- */
- public HanaInstanceInner withProvisioningState(HanaProvisioningStatesEnum provisioningState) {
- this.provisioningState = provisioningState;
- return this;
- }
-
- /** {@inheritDoc} */
- @Override
- public HanaInstanceInner withLocation(String location) {
- super.withLocation(location);
- return this;
- }
-
- /** {@inheritDoc} */
- @Override
- public HanaInstanceInner withTags(Map tags) {
- super.withTags(tags);
- return this;
- }
-
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- if (hardwareProfile() != null) {
- hardwareProfile().validate();
- }
- if (storageProfile() != null) {
- storageProfile().validate();
- }
- if (osProfile() != null) {
- osProfile().validate();
- }
- if (networkProfile() != null) {
- networkProfile().validate();
- }
- }
-}
diff --git a/sdk/hanaonazure/azure-resourcemanager-hanaonazure/src/main/java/com/azure/resourcemanager/hanaonazure/fluent/models/ProviderInstanceInner.java b/sdk/hanaonazure/azure-resourcemanager-hanaonazure/src/main/java/com/azure/resourcemanager/hanaonazure/fluent/models/ProviderInstanceInner.java
new file mode 100644
index 0000000000000..a651ff38d07f9
--- /dev/null
+++ b/sdk/hanaonazure/azure-resourcemanager-hanaonazure/src/main/java/com/azure/resourcemanager/hanaonazure/fluent/models/ProviderInstanceInner.java
@@ -0,0 +1,121 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.hanaonazure.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.annotation.JsonFlatten;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.hanaonazure.models.HanaProvisioningStatesEnum;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** A provider instance associated with a SAP monitor. */
+@JsonFlatten
+@Fluent
+public class ProviderInstanceInner extends ProxyResource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(ProviderInstanceInner.class);
+
+ /*
+ * The type of provider instance.
+ */
+ @JsonProperty(value = "properties.type")
+ private String typePropertiesType;
+
+ /*
+ * A JSON string containing the properties of the provider instance.
+ */
+ @JsonProperty(value = "properties.properties")
+ private String properties;
+
+ /*
+ * A JSON string containing metadata of the provider instance.
+ */
+ @JsonProperty(value = "properties.metadata")
+ private String metadata;
+
+ /*
+ * State of provisioning of the provider instance
+ */
+ @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY)
+ private HanaProvisioningStatesEnum provisioningState;
+
+ /**
+ * Get the typePropertiesType property: The type of provider instance.
+ *
+ * @return the typePropertiesType value.
+ */
+ public String typePropertiesType() {
+ return this.typePropertiesType;
+ }
+
+ /**
+ * Set the typePropertiesType property: The type of provider instance.
+ *
+ * @param typePropertiesType the typePropertiesType value to set.
+ * @return the ProviderInstanceInner object itself.
+ */
+ public ProviderInstanceInner withTypePropertiesType(String typePropertiesType) {
+ this.typePropertiesType = typePropertiesType;
+ return this;
+ }
+
+ /**
+ * Get the properties property: A JSON string containing the properties of the provider instance.
+ *
+ * @return the properties value.
+ */
+ public String properties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: A JSON string containing the properties of the provider instance.
+ *
+ * @param properties the properties value to set.
+ * @return the ProviderInstanceInner object itself.
+ */
+ public ProviderInstanceInner withProperties(String properties) {
+ this.properties = properties;
+ return this;
+ }
+
+ /**
+ * Get the metadata property: A JSON string containing metadata of the provider instance.
+ *
+ * @return the metadata value.
+ */
+ public String metadata() {
+ return this.metadata;
+ }
+
+ /**
+ * Set the metadata property: A JSON string containing metadata of the provider instance.
+ *
+ * @param metadata the metadata value to set.
+ * @return the ProviderInstanceInner object itself.
+ */
+ public ProviderInstanceInner withMetadata(String metadata) {
+ this.metadata = metadata;
+ return this;
+ }
+
+ /**
+ * Get the provisioningState property: State of provisioning of the provider instance.
+ *
+ * @return the provisioningState value.
+ */
+ public HanaProvisioningStatesEnum provisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/hanaonazure/azure-resourcemanager-hanaonazure/src/main/java/com/azure/resourcemanager/hanaonazure/fluent/models/SapMonitorInner.java b/sdk/hanaonazure/azure-resourcemanager-hanaonazure/src/main/java/com/azure/resourcemanager/hanaonazure/fluent/models/SapMonitorInner.java
new file mode 100644
index 0000000000000..2f6cacb7a0cc2
--- /dev/null
+++ b/sdk/hanaonazure/azure-resourcemanager-hanaonazure/src/main/java/com/azure/resourcemanager/hanaonazure/fluent/models/SapMonitorInner.java
@@ -0,0 +1,228 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.hanaonazure.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.resourcemanager.hanaonazure.models.HanaProvisioningStatesEnum;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.Map;
+
+/** SAP monitor info on Azure (ARM properties and SAP monitor properties). */
+@JsonFlatten
+@Fluent
+public class SapMonitorInner extends Resource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(SapMonitorInner.class);
+
+ /*
+ * State of provisioning of the HanaInstance
+ */
+ @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY)
+ private HanaProvisioningStatesEnum provisioningState;
+
+ /*
+ * The name of the resource group the SAP Monitor resources get deployed
+ * into.
+ */
+ @JsonProperty(value = "properties.managedResourceGroupName", access = JsonProperty.Access.WRITE_ONLY)
+ private String managedResourceGroupName;
+
+ /*
+ * The ARM ID of the Log Analytics Workspace that is used for monitoring
+ */
+ @JsonProperty(value = "properties.logAnalyticsWorkspaceArmId")
+ private String logAnalyticsWorkspaceArmId;
+
+ /*
+ * The value indicating whether to send analytics to Microsoft
+ */
+ @JsonProperty(value = "properties.enableCustomerAnalytics")
+ private Boolean enableCustomerAnalytics;
+
+ /*
+ * The workspace ID of the log analytics workspace to be used for
+ * monitoring
+ */
+ @JsonProperty(value = "properties.logAnalyticsWorkspaceId")
+ private String logAnalyticsWorkspaceId;
+
+ /*
+ * The shared key of the log analytics workspace that is used for
+ * monitoring
+ */
+ @JsonProperty(value = "properties.logAnalyticsWorkspaceSharedKey")
+ private String logAnalyticsWorkspaceSharedKey;
+
+ /*
+ * The version of the payload running in the Collector VM
+ */
+ @JsonProperty(value = "properties.sapMonitorCollectorVersion", access = JsonProperty.Access.WRITE_ONLY)
+ private String sapMonitorCollectorVersion;
+
+ /*
+ * The subnet which the SAP monitor will be deployed in
+ */
+ @JsonProperty(value = "properties.monitorSubnet")
+ private String monitorSubnet;
+
+ /**
+ * Get the provisioningState property: State of provisioning of the HanaInstance.
+ *
+ * @return the provisioningState value.
+ */
+ public HanaProvisioningStatesEnum provisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * Get the managedResourceGroupName property: The name of the resource group the SAP Monitor resources get deployed
+ * into.
+ *
+ * @return the managedResourceGroupName value.
+ */
+ public String managedResourceGroupName() {
+ return this.managedResourceGroupName;
+ }
+
+ /**
+ * Get the logAnalyticsWorkspaceArmId property: The ARM ID of the Log Analytics Workspace that is used for
+ * monitoring.
+ *
+ * @return the logAnalyticsWorkspaceArmId value.
+ */
+ public String logAnalyticsWorkspaceArmId() {
+ return this.logAnalyticsWorkspaceArmId;
+ }
+
+ /**
+ * Set the logAnalyticsWorkspaceArmId property: The ARM ID of the Log Analytics Workspace that is used for
+ * monitoring.
+ *
+ * @param logAnalyticsWorkspaceArmId the logAnalyticsWorkspaceArmId value to set.
+ * @return the SapMonitorInner object itself.
+ */
+ public SapMonitorInner withLogAnalyticsWorkspaceArmId(String logAnalyticsWorkspaceArmId) {
+ this.logAnalyticsWorkspaceArmId = logAnalyticsWorkspaceArmId;
+ return this;
+ }
+
+ /**
+ * Get the enableCustomerAnalytics property: The value indicating whether to send analytics to Microsoft.
+ *
+ * @return the enableCustomerAnalytics value.
+ */
+ public Boolean enableCustomerAnalytics() {
+ return this.enableCustomerAnalytics;
+ }
+
+ /**
+ * Set the enableCustomerAnalytics property: The value indicating whether to send analytics to Microsoft.
+ *
+ * @param enableCustomerAnalytics the enableCustomerAnalytics value to set.
+ * @return the SapMonitorInner object itself.
+ */
+ public SapMonitorInner withEnableCustomerAnalytics(Boolean enableCustomerAnalytics) {
+ this.enableCustomerAnalytics = enableCustomerAnalytics;
+ return this;
+ }
+
+ /**
+ * Get the logAnalyticsWorkspaceId property: The workspace ID of the log analytics workspace to be used for
+ * monitoring.
+ *
+ * @return the logAnalyticsWorkspaceId value.
+ */
+ public String logAnalyticsWorkspaceId() {
+ return this.logAnalyticsWorkspaceId;
+ }
+
+ /**
+ * Set the logAnalyticsWorkspaceId property: The workspace ID of the log analytics workspace to be used for
+ * monitoring.
+ *
+ * @param logAnalyticsWorkspaceId the logAnalyticsWorkspaceId value to set.
+ * @return the SapMonitorInner object itself.
+ */
+ public SapMonitorInner withLogAnalyticsWorkspaceId(String logAnalyticsWorkspaceId) {
+ this.logAnalyticsWorkspaceId = logAnalyticsWorkspaceId;
+ return this;
+ }
+
+ /**
+ * Get the logAnalyticsWorkspaceSharedKey property: The shared key of the log analytics workspace that is used for
+ * monitoring.
+ *
+ * @return the logAnalyticsWorkspaceSharedKey value.
+ */
+ public String logAnalyticsWorkspaceSharedKey() {
+ return this.logAnalyticsWorkspaceSharedKey;
+ }
+
+ /**
+ * Set the logAnalyticsWorkspaceSharedKey property: The shared key of the log analytics workspace that is used for
+ * monitoring.
+ *
+ * @param logAnalyticsWorkspaceSharedKey the logAnalyticsWorkspaceSharedKey value to set.
+ * @return the SapMonitorInner object itself.
+ */
+ public SapMonitorInner withLogAnalyticsWorkspaceSharedKey(String logAnalyticsWorkspaceSharedKey) {
+ this.logAnalyticsWorkspaceSharedKey = logAnalyticsWorkspaceSharedKey;
+ return this;
+ }
+
+ /**
+ * Get the sapMonitorCollectorVersion property: The version of the payload running in the Collector VM.
+ *
+ * @return the sapMonitorCollectorVersion value.
+ */
+ public String sapMonitorCollectorVersion() {
+ return this.sapMonitorCollectorVersion;
+ }
+
+ /**
+ * Get the monitorSubnet property: The subnet which the SAP monitor will be deployed in.
+ *
+ * @return the monitorSubnet value.
+ */
+ public String monitorSubnet() {
+ return this.monitorSubnet;
+ }
+
+ /**
+ * Set the monitorSubnet property: The subnet which the SAP monitor will be deployed in.
+ *
+ * @param monitorSubnet the monitorSubnet value to set.
+ * @return the SapMonitorInner object itself.
+ */
+ public SapMonitorInner withMonitorSubnet(String monitorSubnet) {
+ this.monitorSubnet = monitorSubnet;
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public SapMonitorInner withLocation(String location) {
+ super.withLocation(location);
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public SapMonitorInner withTags(Map tags) {
+ super.withTags(tags);
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/hanaonazure/azure-resourcemanager-hanaonazure/src/main/java/com/azure/resourcemanager/hanaonazure/implementation/HanaInstanceImpl.java b/sdk/hanaonazure/azure-resourcemanager-hanaonazure/src/main/java/com/azure/resourcemanager/hanaonazure/implementation/HanaInstanceImpl.java
deleted file mode 100644
index 4a8705359fc3c..0000000000000
--- a/sdk/hanaonazure/azure-resourcemanager-hanaonazure/src/main/java/com/azure/resourcemanager/hanaonazure/implementation/HanaInstanceImpl.java
+++ /dev/null
@@ -1,291 +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.hanaonazure.implementation;
-
-import com.azure.core.management.Region;
-import com.azure.core.util.Context;
-import com.azure.resourcemanager.hanaonazure.fluent.models.HanaInstanceInner;
-import com.azure.resourcemanager.hanaonazure.models.HanaInstance;
-import com.azure.resourcemanager.hanaonazure.models.HanaInstancePowerStateEnum;
-import com.azure.resourcemanager.hanaonazure.models.HanaProvisioningStatesEnum;
-import com.azure.resourcemanager.hanaonazure.models.HardwareProfile;
-import com.azure.resourcemanager.hanaonazure.models.NetworkProfile;
-import com.azure.resourcemanager.hanaonazure.models.OSProfile;
-import com.azure.resourcemanager.hanaonazure.models.StorageProfile;
-import com.azure.resourcemanager.hanaonazure.models.Tags;
-import java.util.Collections;
-import java.util.Map;
-
-public final class HanaInstanceImpl implements HanaInstance, HanaInstance.Definition, HanaInstance.Update {
- private HanaInstanceInner innerObject;
-
- private final com.azure.resourcemanager.hanaonazure.HanaManager serviceManager;
-
- public String id() {
- return this.innerModel().id();
- }
-
- public String name() {
- return this.innerModel().name();
- }
-
- public String type() {
- return this.innerModel().type();
- }
-
- public String location() {
- return this.innerModel().location();
- }
-
- public Map tags() {
- Map inner = this.innerModel().tags();
- if (inner != null) {
- return Collections.unmodifiableMap(inner);
- } else {
- return Collections.emptyMap();
- }
- }
-
- public HardwareProfile hardwareProfile() {
- return this.innerModel().hardwareProfile();
- }
-
- public StorageProfile storageProfile() {
- return this.innerModel().storageProfile();
- }
-
- public OSProfile osProfile() {
- return this.innerModel().osProfile();
- }
-
- public NetworkProfile networkProfile() {
- return this.innerModel().networkProfile();
- }
-
- public String hanaInstanceId() {
- return this.innerModel().hanaInstanceId();
- }
-
- public HanaInstancePowerStateEnum powerState() {
- return this.innerModel().powerState();
- }
-
- public String proximityPlacementGroup() {
- return this.innerModel().proximityPlacementGroup();
- }
-
- public String hwRevision() {
- return this.innerModel().hwRevision();
- }
-
- public String partnerNodeId() {
- return this.innerModel().partnerNodeId();
- }
-
- public HanaProvisioningStatesEnum provisioningState() {
- return this.innerModel().provisioningState();
- }
-
- public Region region() {
- return Region.fromName(this.regionName());
- }
-
- public String regionName() {
- return this.location();
- }
-
- public HanaInstanceInner innerModel() {
- return this.innerObject;
- }
-
- private com.azure.resourcemanager.hanaonazure.HanaManager manager() {
- return this.serviceManager;
- }
-
- private String resourceGroupName;
-
- private String hanaInstanceName;
-
- private Tags updateTagsParameter;
-
- public HanaInstanceImpl withExistingResourceGroup(String resourceGroupName) {
- this.resourceGroupName = resourceGroupName;
- return this;
- }
-
- public HanaInstance create() {
- this.innerObject =
- serviceManager
- .serviceClient()
- .getHanaInstances()
- .create(resourceGroupName, hanaInstanceName, this.innerModel(), Context.NONE);
- return this;
- }
-
- public HanaInstance create(Context context) {
- this.innerObject =
- serviceManager
- .serviceClient()
- .getHanaInstances()
- .create(resourceGroupName, hanaInstanceName, this.innerModel(), context);
- return this;
- }
-
- HanaInstanceImpl(String name, com.azure.resourcemanager.hanaonazure.HanaManager serviceManager) {
- this.innerObject = new HanaInstanceInner();
- this.serviceManager = serviceManager;
- this.hanaInstanceName = name;
- }
-
- public HanaInstanceImpl update() {
- this.updateTagsParameter = new Tags();
- return this;
- }
-
- public HanaInstance apply() {
- this.innerObject =
- serviceManager
- .serviceClient()
- .getHanaInstances()
- .updateWithResponse(resourceGroupName, hanaInstanceName, updateTagsParameter, Context.NONE)
- .getValue();
- return this;
- }
-
- public HanaInstance apply(Context context) {
- this.innerObject =
- serviceManager
- .serviceClient()
- .getHanaInstances()
- .updateWithResponse(resourceGroupName, hanaInstanceName, updateTagsParameter, context)
- .getValue();
- return this;
- }
-
- HanaInstanceImpl(HanaInstanceInner innerObject, com.azure.resourcemanager.hanaonazure.HanaManager serviceManager) {
- this.innerObject = innerObject;
- this.serviceManager = serviceManager;
- this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups");
- this.hanaInstanceName = Utils.getValueFromIdByName(innerObject.id(), "hanaInstances");
- }
-
- public HanaInstance refresh() {
- this.innerObject =
- serviceManager
- .serviceClient()
- .getHanaInstances()
- .getByResourceGroupWithResponse(resourceGroupName, hanaInstanceName, Context.NONE)
- .getValue();
- return this;
- }
-
- public HanaInstance refresh(Context context) {
- this.innerObject =
- serviceManager
- .serviceClient()
- .getHanaInstances()
- .getByResourceGroupWithResponse(resourceGroupName, hanaInstanceName, context)
- .getValue();
- return this;
- }
-
- public void restart() {
- serviceManager.hanaInstances().restart(resourceGroupName, hanaInstanceName);
- }
-
- public void restart(Context context) {
- serviceManager.hanaInstances().restart(resourceGroupName, hanaInstanceName, context);
- }
-
- public void start() {
- serviceManager.hanaInstances().start(resourceGroupName, hanaInstanceName);
- }
-
- public void start(Context context) {
- serviceManager.hanaInstances().start(resourceGroupName, hanaInstanceName, context);
- }
-
- public void shutdown() {
- serviceManager.hanaInstances().shutdown(resourceGroupName, hanaInstanceName);
- }
-
- public void shutdown(Context context) {
- serviceManager.hanaInstances().shutdown(resourceGroupName, hanaInstanceName, context);
- }
-
- public HanaInstanceImpl withRegion(Region location) {
- this.innerModel().withLocation(location.toString());
- return this;
- }
-
- public HanaInstanceImpl withRegion(String location) {
- this.innerModel().withLocation(location);
- return this;
- }
-
- public HanaInstanceImpl withTags(Map tags) {
- if (isInCreateMode()) {
- this.innerModel().withTags(tags);
- return this;
- } else {
- this.updateTagsParameter.withTags(tags);
- return this;
- }
- }
-
- public HanaInstanceImpl withHardwareProfile(HardwareProfile hardwareProfile) {
- this.innerModel().withHardwareProfile(hardwareProfile);
- return this;
- }
-
- public HanaInstanceImpl withStorageProfile(StorageProfile storageProfile) {
- this.innerModel().withStorageProfile(storageProfile);
- return this;
- }
-
- public HanaInstanceImpl withOsProfile(OSProfile osProfile) {
- this.innerModel().withOsProfile(osProfile);
- return this;
- }
-
- public HanaInstanceImpl withNetworkProfile(NetworkProfile networkProfile) {
- this.innerModel().withNetworkProfile(networkProfile);
- return this;
- }
-
- public HanaInstanceImpl withHanaInstanceId(String hanaInstanceId) {
- this.innerModel().withHanaInstanceId(hanaInstanceId);
- return this;
- }
-
- public HanaInstanceImpl withPowerState(HanaInstancePowerStateEnum powerState) {
- this.innerModel().withPowerState(powerState);
- return this;
- }
-
- public HanaInstanceImpl withProximityPlacementGroup(String proximityPlacementGroup) {
- this.innerModel().withProximityPlacementGroup(proximityPlacementGroup);
- return this;
- }
-
- public HanaInstanceImpl withHwRevision(String hwRevision) {
- this.innerModel().withHwRevision(hwRevision);
- return this;
- }
-
- public HanaInstanceImpl withPartnerNodeId(String partnerNodeId) {
- this.innerModel().withPartnerNodeId(partnerNodeId);
- return this;
- }
-
- public HanaInstanceImpl withProvisioningState(HanaProvisioningStatesEnum provisioningState) {
- this.innerModel().withProvisioningState(provisioningState);
- return this;
- }
-
- private boolean isInCreateMode() {
- return this.innerModel().id() == null;
- }
-}
diff --git a/sdk/hanaonazure/azure-resourcemanager-hanaonazure/src/main/java/com/azure/resourcemanager/hanaonazure/implementation/HanaInstancesClientImpl.java b/sdk/hanaonazure/azure-resourcemanager-hanaonazure/src/main/java/com/azure/resourcemanager/hanaonazure/implementation/HanaInstancesClientImpl.java
deleted file mode 100644
index c59a01efaca01..0000000000000
--- a/sdk/hanaonazure/azure-resourcemanager-hanaonazure/src/main/java/com/azure/resourcemanager/hanaonazure/implementation/HanaInstancesClientImpl.java
+++ /dev/null
@@ -1,2193 +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.hanaonazure.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.Post;
-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.logging.ClientLogger;
-import com.azure.core.util.polling.PollerFlux;
-import com.azure.core.util.polling.SyncPoller;
-import com.azure.resourcemanager.hanaonazure.fluent.HanaInstancesClient;
-import com.azure.resourcemanager.hanaonazure.fluent.models.HanaInstanceInner;
-import com.azure.resourcemanager.hanaonazure.models.HanaInstancesListResult;
-import com.azure.resourcemanager.hanaonazure.models.Tags;
-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 HanaInstancesClient. */
-public final class HanaInstancesClientImpl implements HanaInstancesClient {
- private final ClientLogger logger = new ClientLogger(HanaInstancesClientImpl.class);
-
- /** The proxy service used to perform REST calls. */
- private final HanaInstancesService service;
-
- /** The service client containing this operation class. */
- private final HanaManagementClientImpl client;
-
- /**
- * Initializes an instance of HanaInstancesClientImpl.
- *
- * @param client the instance of the service client containing this operation class.
- */
- HanaInstancesClientImpl(HanaManagementClientImpl client) {
- this.service =
- RestProxy.create(HanaInstancesService.class, client.getHttpPipeline(), client.getSerializerAdapter());
- this.client = client;
- }
-
- /**
- * The interface defining all the services for HanaManagementClientHanaInstances to be used by the proxy service to
- * perform REST calls.
- */
- @Host("{$host}")
- @ServiceInterface(name = "HanaManagementClient")
- private interface HanaInstancesService {
- @Headers({"Content-Type: application/json"})
- @Get("/subscriptions/{subscriptionId}/providers/Microsoft.HanaOnAzure/hanaInstances")
- @ExpectedResponses({200})
- @UnexpectedResponseExceptionType(ManagementException.class)
- Mono> list(
- @HostParam("$host") String endpoint,
- @QueryParam("api-version") String apiVersion,
- @PathParam("subscriptionId") String subscriptionId,
- @HeaderParam("Accept") String accept,
- Context context);
-
- @Headers({"Content-Type: application/json"})
- @Get(
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HanaOnAzure"
- + "/hanaInstances")
- @ExpectedResponses({200})
- @UnexpectedResponseExceptionType(ManagementException.class)
- Mono> listByResourceGroup(
- @HostParam("$host") String endpoint,
- @QueryParam("api-version") String apiVersion,
- @PathParam("subscriptionId") String subscriptionId,
- @PathParam("resourceGroupName") String resourceGroupName,
- @HeaderParam("Accept") String accept,
- Context context);
-
- @Headers({"Content-Type: application/json"})
- @Get(
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HanaOnAzure"
- + "/hanaInstances/{hanaInstanceName}")
- @ExpectedResponses({200})
- @UnexpectedResponseExceptionType(ManagementException.class)
- Mono> getByResourceGroup(
- @HostParam("$host") String endpoint,
- @QueryParam("api-version") String apiVersion,
- @PathParam("subscriptionId") String subscriptionId,
- @PathParam("resourceGroupName") String resourceGroupName,
- @PathParam("hanaInstanceName") String hanaInstanceName,
- @HeaderParam("Accept") String accept,
- Context context);
-
- @Headers({"Content-Type: application/json"})
- @Put(
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HanaOnAzure"
- + "/hanaInstances/{hanaInstanceName}")
- @ExpectedResponses({200, 201})
- @UnexpectedResponseExceptionType(ManagementException.class)
- Mono>> create(
- @HostParam("$host") String endpoint,
- @QueryParam("api-version") String apiVersion,
- @PathParam("subscriptionId") String subscriptionId,
- @PathParam("resourceGroupName") String resourceGroupName,
- @PathParam("hanaInstanceName") String hanaInstanceName,
- @BodyParam("application/json") HanaInstanceInner hanaInstanceParameter,
- @HeaderParam("Accept") String accept,
- Context context);
-
- @Headers({"Content-Type: application/json"})
- @Delete(
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HanaOnAzure"
- + "/hanaInstances/{hanaInstanceName}")
- @ExpectedResponses({200, 202, 204})
- @UnexpectedResponseExceptionType(ManagementException.class)
- Mono>> delete(
- @HostParam("$host") String endpoint,
- @QueryParam("api-version") String apiVersion,
- @PathParam("subscriptionId") String subscriptionId,
- @PathParam("resourceGroupName") String resourceGroupName,
- @PathParam("hanaInstanceName") String hanaInstanceName,
- @HeaderParam("Accept") String accept,
- Context context);
-
- @Headers({"Content-Type: application/json"})
- @Patch(
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HanaOnAzure"
- + "/hanaInstances/{hanaInstanceName}")
- @ExpectedResponses({200})
- @UnexpectedResponseExceptionType(ManagementException.class)
- Mono> update(
- @HostParam("$host") String endpoint,
- @QueryParam("api-version") String apiVersion,
- @PathParam("subscriptionId") String subscriptionId,
- @PathParam("resourceGroupName") String resourceGroupName,
- @PathParam("hanaInstanceName") String hanaInstanceName,
- @BodyParam("application/json") Tags tagsParameter,
- @HeaderParam("Accept") String accept,
- Context context);
-
- @Headers({"Content-Type: application/json"})
- @Post(
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HanaOnAzure"
- + "/hanaInstances/{hanaInstanceName}/restart")
- @ExpectedResponses({200, 202})
- @UnexpectedResponseExceptionType(ManagementException.class)
- Mono>> restart(
- @HostParam("$host") String endpoint,
- @QueryParam("api-version") String apiVersion,
- @PathParam("subscriptionId") String subscriptionId,
- @PathParam("resourceGroupName") String resourceGroupName,
- @PathParam("hanaInstanceName") String hanaInstanceName,
- @HeaderParam("Accept") String accept,
- Context context);
-
- @Headers({"Content-Type: application/json"})
- @Post(
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HanaOnAzure"
- + "/hanaInstances/{hanaInstanceName}/start")
- @ExpectedResponses({200, 202})
- @UnexpectedResponseExceptionType(ManagementException.class)
- Mono>> start(
- @HostParam("$host") String endpoint,
- @QueryParam("api-version") String apiVersion,
- @PathParam("subscriptionId") String subscriptionId,
- @PathParam("resourceGroupName") String resourceGroupName,
- @PathParam("hanaInstanceName") String hanaInstanceName,
- @HeaderParam("Accept") String accept,
- Context context);
-
- @Headers({"Content-Type: application/json"})
- @Post(
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HanaOnAzure"
- + "/hanaInstances/{hanaInstanceName}/shutdown")
- @ExpectedResponses({200, 202})
- @UnexpectedResponseExceptionType(ManagementException.class)
- Mono>> shutdown(
- @HostParam("$host") String endpoint,
- @QueryParam("api-version") String apiVersion,
- @PathParam("subscriptionId") String subscriptionId,
- @PathParam("resourceGroupName") String resourceGroupName,
- @PathParam("hanaInstanceName") String hanaInstanceName,
- @HeaderParam("Accept") String accept,
- Context context);
-
- @Headers({"Content-Type: application/json"})
- @Get("{nextLink}")
- @ExpectedResponses({200})
- @UnexpectedResponseExceptionType(ManagementException.class)
- Mono> listNext(
- @PathParam(value = "nextLink", encoded = true) String nextLink,
- @HostParam("$host") String endpoint,
- @HeaderParam("Accept") String accept,
- Context context);
-
- @Headers({"Content-Type: application/json"})
- @Get("{nextLink}")
- @ExpectedResponses({200})
- @UnexpectedResponseExceptionType(ManagementException.class)
- Mono> listByResourceGroupNext(
- @PathParam(value = "nextLink", encoded = true) String nextLink,
- @HostParam("$host") String endpoint,
- @HeaderParam("Accept") String accept,
- Context context);
- }
-
- /**
- * Gets a list of SAP HANA instances in the specified subscription. The operations returns various properties of
- * each SAP HANA on Azure instance.
- *
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a list of SAP HANA instances in the specified subscription.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listSinglePageAsync() {
- if (this.client.getEndpoint() == null) {
- return Mono
- .error(
- new IllegalArgumentException(
- "Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (this.client.getSubscriptionId() == null) {
- return Mono
- .error(
- new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
- final String accept = "application/json";
- return FluxUtil
- .withContext(
- context ->
- service
- .list(
- this.client.getEndpoint(),
- this.client.getApiVersion(),
- this.client.getSubscriptionId(),
- accept,
- context))
- .>map(
- res ->
- new PagedResponseBase<>(
- res.getRequest(),
- res.getStatusCode(),
- res.getHeaders(),
- res.getValue().value(),
- res.getValue().nextLink(),
- null))
- .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
- }
-
- /**
- * Gets a list of SAP HANA instances in the specified subscription. The operations returns various properties of
- * each SAP HANA on Azure instance.
- *
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a list of SAP HANA instances in the specified subscription.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listSinglePageAsync(Context context) {
- if (this.client.getEndpoint() == null) {
- return Mono
- .error(
- new IllegalArgumentException(
- "Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (this.client.getSubscriptionId() == null) {
- return Mono
- .error(
- new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service
- .list(
- this.client.getEndpoint(),
- this.client.getApiVersion(),
- this.client.getSubscriptionId(),
- accept,
- context)
- .map(
- res ->
- new PagedResponseBase<>(
- res.getRequest(),
- res.getStatusCode(),
- res.getHeaders(),
- res.getValue().value(),
- res.getValue().nextLink(),
- null));
- }
-
- /**
- * Gets a list of SAP HANA instances in the specified subscription. The operations returns various properties of
- * each SAP HANA on Azure instance.
- *
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a list of SAP HANA instances in the specified subscription.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- private PagedFlux listAsync() {
- return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink));
- }
-
- /**
- * Gets a list of SAP HANA instances in the specified subscription. The operations returns various properties of
- * each SAP HANA on Azure instance.
- *
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a list of SAP HANA instances in the specified subscription.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- private PagedFlux listAsync(Context context) {
- return new PagedFlux<>(
- () -> listSinglePageAsync(context), nextLink -> listNextSinglePageAsync(nextLink, context));
- }
-
- /**
- * Gets a list of SAP HANA instances in the specified subscription. The operations returns various properties of
- * each SAP HANA on Azure instance.
- *
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a list of SAP HANA instances in the specified subscription.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- public PagedIterable list() {
- return new PagedIterable<>(listAsync());
- }
-
- /**
- * Gets a list of SAP HANA instances in the specified subscription. The operations returns various properties of
- * each SAP HANA on Azure instance.
- *
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a list of SAP HANA instances in the specified subscription.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- public PagedIterable list(Context context) {
- return new PagedIterable<>(listAsync(context));
- }
-
- /**
- * Gets a list of SAP HANA instances in the specified subscription and the resource group. The operations returns
- * various properties of each SAP HANA on Azure instance.
- *
- * @param resourceGroupName Name of the resource group.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a list of SAP HANA instances in the specified subscription and the resource group.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) {
- if (this.client.getEndpoint() == null) {
- return Mono
- .error(
- new IllegalArgumentException(
- "Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- 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."));
- }
- final String accept = "application/json";
- return FluxUtil
- .withContext(
- context ->
- service
- .listByResourceGroup(
- this.client.getEndpoint(),
- this.client.getApiVersion(),
- this.client.getSubscriptionId(),
- resourceGroupName,
- accept,
- context))
- .>map(
- res ->
- new PagedResponseBase<>(
- res.getRequest(),
- res.getStatusCode(),
- res.getHeaders(),
- res.getValue().value(),
- res.getValue().nextLink(),
- null))
- .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
- }
-
- /**
- * Gets a list of SAP HANA instances in the specified subscription and the resource group. The operations returns
- * various properties of each SAP HANA on Azure instance.
- *
- * @param resourceGroupName Name of the resource group.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a list of SAP HANA instances in the specified subscription and the resource group.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listByResourceGroupSinglePageAsync(
- String resourceGroupName, Context context) {
- if (this.client.getEndpoint() == null) {
- return Mono
- .error(
- new IllegalArgumentException(
- "Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- 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."));
- }
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service
- .listByResourceGroup(
- this.client.getEndpoint(),
- this.client.getApiVersion(),
- this.client.getSubscriptionId(),
- resourceGroupName,
- accept,
- context)
- .map(
- res ->
- new PagedResponseBase<>(
- res.getRequest(),
- res.getStatusCode(),
- res.getHeaders(),
- res.getValue().value(),
- res.getValue().nextLink(),
- null));
- }
-
- /**
- * Gets a list of SAP HANA instances in the specified subscription and the resource group. The operations returns
- * various properties of each SAP HANA on Azure instance.
- *
- * @param resourceGroupName Name of the resource group.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a list of SAP HANA instances in the specified subscription and the resource group.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- private PagedFlux listByResourceGroupAsync(String resourceGroupName) {
- return new PagedFlux<>(
- () -> listByResourceGroupSinglePageAsync(resourceGroupName),
- nextLink -> listByResourceGroupNextSinglePageAsync(nextLink));
- }
-
- /**
- * Gets a list of SAP HANA instances in the specified subscription and the resource group. The operations returns
- * various properties of each SAP HANA on Azure instance.
- *
- * @param resourceGroupName Name of the resource group.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a list of SAP HANA instances in the specified subscription and the resource group.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) {
- return new PagedFlux<>(
- () -> listByResourceGroupSinglePageAsync(resourceGroupName, context),
- nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context));
- }
-
- /**
- * Gets a list of SAP HANA instances in the specified subscription and the resource group. The operations returns
- * various properties of each SAP HANA on Azure instance.
- *
- * @param resourceGroupName Name of the resource group.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a list of SAP HANA instances in the specified subscription and the resource group.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- public PagedIterable listByResourceGroup(String resourceGroupName) {
- return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName));
- }
-
- /**
- * Gets a list of SAP HANA instances in the specified subscription and the resource group. The operations returns
- * various properties of each SAP HANA on Azure instance.
- *
- * @param resourceGroupName Name of the resource group.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a list of SAP HANA instances in the specified subscription and the resource group.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- public PagedIterable listByResourceGroup(String resourceGroupName, Context context) {
- return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context));
- }
-
- /**
- * Gets properties of a SAP HANA instance for the specified subscription, resource group, and instance name.
- *
- * @param resourceGroupName Name of the resource group.
- * @param hanaInstanceName Name of the SAP HANA on Azure instance.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return properties of a SAP HANA instance for the specified subscription, resource group, and instance name.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> getByResourceGroupWithResponseAsync(
- String resourceGroupName, String hanaInstanceName) {
- 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 (hanaInstanceName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter hanaInstanceName is required and cannot be null."));
- }
- final String accept = "application/json";
- return FluxUtil
- .withContext(
- context ->
- service
- .getByResourceGroup(
- this.client.getEndpoint(),
- this.client.getApiVersion(),
- this.client.getSubscriptionId(),
- resourceGroupName,
- hanaInstanceName,
- accept,
- context))
- .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
- }
-
- /**
- * Gets properties of a SAP HANA instance for the specified subscription, resource group, and instance name.
- *
- * @param resourceGroupName Name of the resource group.
- * @param hanaInstanceName Name of the SAP HANA on Azure instance.
- * @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 properties of a SAP HANA instance for the specified subscription, resource group, and instance name.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> getByResourceGroupWithResponseAsync(
- String resourceGroupName, String hanaInstanceName, 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 (hanaInstanceName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter hanaInstanceName is required and cannot be null."));
- }
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service
- .getByResourceGroup(
- this.client.getEndpoint(),
- this.client.getApiVersion(),
- this.client.getSubscriptionId(),
- resourceGroupName,
- hanaInstanceName,
- accept,
- context);
- }
-
- /**
- * Gets properties of a SAP HANA instance for the specified subscription, resource group, and instance name.
- *
- * @param resourceGroupName Name of the resource group.
- * @param hanaInstanceName Name of the SAP HANA on Azure instance.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return properties of a SAP HANA instance for the specified subscription, resource group, and instance name.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono getByResourceGroupAsync(String resourceGroupName, String hanaInstanceName) {
- return getByResourceGroupWithResponseAsync(resourceGroupName, hanaInstanceName)
- .flatMap(
- (Response res) -> {
- if (res.getValue() != null) {
- return Mono.just(res.getValue());
- } else {
- return Mono.empty();
- }
- });
- }
-
- /**
- * Gets properties of a SAP HANA instance for the specified subscription, resource group, and instance name.
- *
- * @param resourceGroupName Name of the resource group.
- * @param hanaInstanceName Name of the SAP HANA on Azure instance.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return properties of a SAP HANA instance for the specified subscription, resource group, and instance name.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public HanaInstanceInner getByResourceGroup(String resourceGroupName, String hanaInstanceName) {
- return getByResourceGroupAsync(resourceGroupName, hanaInstanceName).block();
- }
-
- /**
- * Gets properties of a SAP HANA instance for the specified subscription, resource group, and instance name.
- *
- * @param resourceGroupName Name of the resource group.
- * @param hanaInstanceName Name of the SAP HANA on Azure instance.
- * @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 properties of a SAP HANA instance for the specified subscription, resource group, and instance name.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public Response getByResourceGroupWithResponse(
- String resourceGroupName, String hanaInstanceName, Context context) {
- return getByResourceGroupWithResponseAsync(resourceGroupName, hanaInstanceName, context).block();
- }
-
- /**
- * Creates a SAP HANA instance for the specified subscription, resource group, and instance name.
- *
- * @param resourceGroupName Name of the resource group.
- * @param hanaInstanceName Name of the SAP HANA on Azure instance.
- * @param hanaInstanceParameter Request body representing a HanaInstance.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return hANA instance info on Azure (ARM properties and HANA properties).
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>> createWithResponseAsync(
- String resourceGroupName, String hanaInstanceName, HanaInstanceInner hanaInstanceParameter) {
- 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 (hanaInstanceName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter hanaInstanceName is required and cannot be null."));
- }
- if (hanaInstanceParameter == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter hanaInstanceParameter is required and cannot be null."));
- } else {
- hanaInstanceParameter.validate();
- }
- final String accept = "application/json";
- return FluxUtil
- .withContext(
- context ->
- service
- .create(
- this.client.getEndpoint(),
- this.client.getApiVersion(),
- this.client.getSubscriptionId(),
- resourceGroupName,
- hanaInstanceName,
- hanaInstanceParameter,
- accept,
- context))
- .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
- }
-
- /**
- * Creates a SAP HANA instance for the specified subscription, resource group, and instance name.
- *
- * @param resourceGroupName Name of the resource group.
- * @param hanaInstanceName Name of the SAP HANA on Azure instance.
- * @param hanaInstanceParameter Request body representing a HanaInstance.
- * @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 hANA instance info on Azure (ARM properties and HANA properties).
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>> createWithResponseAsync(
- String resourceGroupName, String hanaInstanceName, HanaInstanceInner hanaInstanceParameter, 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 (hanaInstanceName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter hanaInstanceName is required and cannot be null."));
- }
- if (hanaInstanceParameter == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter hanaInstanceParameter is required and cannot be null."));
- } else {
- hanaInstanceParameter.validate();
- }
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service
- .create(
- this.client.getEndpoint(),
- this.client.getApiVersion(),
- this.client.getSubscriptionId(),
- resourceGroupName,
- hanaInstanceName,
- hanaInstanceParameter,
- accept,
- context);
- }
-
- /**
- * Creates a SAP HANA instance for the specified subscription, resource group, and instance name.
- *
- * @param resourceGroupName Name of the resource group.
- * @param hanaInstanceName Name of the SAP HANA on Azure instance.
- * @param hanaInstanceParameter Request body representing a HanaInstance.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return hANA instance info on Azure (ARM properties and HANA properties).
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private PollerFlux, HanaInstanceInner> beginCreateAsync(
- String resourceGroupName, String hanaInstanceName, HanaInstanceInner hanaInstanceParameter) {
- Mono>> mono =
- createWithResponseAsync(resourceGroupName, hanaInstanceName, hanaInstanceParameter);
- return this
- .client
- .getLroResult(
- mono, this.client.getHttpPipeline(), HanaInstanceInner.class, HanaInstanceInner.class, Context.NONE);
- }
-
- /**
- * Creates a SAP HANA instance for the specified subscription, resource group, and instance name.
- *
- * @param resourceGroupName Name of the resource group.
- * @param hanaInstanceName Name of the SAP HANA on Azure instance.
- * @param hanaInstanceParameter Request body representing a HanaInstance.
- * @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 hANA instance info on Azure (ARM properties and HANA properties).
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private PollerFlux, HanaInstanceInner> beginCreateAsync(
- String resourceGroupName, String hanaInstanceName, HanaInstanceInner hanaInstanceParameter, Context context) {
- context = this.client.mergeContext(context);
- Mono>> mono =
- createWithResponseAsync(resourceGroupName, hanaInstanceName, hanaInstanceParameter, context);
- return this
- .client
- .getLroResult(
- mono, this.client.getHttpPipeline(), HanaInstanceInner.class, HanaInstanceInner.class, context);
- }
-
- /**
- * Creates a SAP HANA instance for the specified subscription, resource group, and instance name.
- *
- * @param resourceGroupName Name of the resource group.
- * @param hanaInstanceName Name of the SAP HANA on Azure instance.
- * @param hanaInstanceParameter Request body representing a HanaInstance.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return hANA instance info on Azure (ARM properties and HANA properties).
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public SyncPoller, HanaInstanceInner> beginCreate(
- String resourceGroupName, String hanaInstanceName, HanaInstanceInner hanaInstanceParameter) {
- return beginCreateAsync(resourceGroupName, hanaInstanceName, hanaInstanceParameter).getSyncPoller();
- }
-
- /**
- * Creates a SAP HANA instance for the specified subscription, resource group, and instance name.
- *
- * @param resourceGroupName Name of the resource group.
- * @param hanaInstanceName Name of the SAP HANA on Azure instance.
- * @param hanaInstanceParameter Request body representing a HanaInstance.
- * @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 hANA instance info on Azure (ARM properties and HANA properties).
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public SyncPoller, HanaInstanceInner> beginCreate(
- String resourceGroupName, String hanaInstanceName, HanaInstanceInner hanaInstanceParameter, Context context) {
- return beginCreateAsync(resourceGroupName, hanaInstanceName, hanaInstanceParameter, context).getSyncPoller();
- }
-
- /**
- * Creates a SAP HANA instance for the specified subscription, resource group, and instance name.
- *
- * @param resourceGroupName Name of the resource group.
- * @param hanaInstanceName Name of the SAP HANA on Azure instance.
- * @param hanaInstanceParameter Request body representing a HanaInstance.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return hANA instance info on Azure (ARM properties and HANA properties).
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono createAsync(
- String resourceGroupName, String hanaInstanceName, HanaInstanceInner hanaInstanceParameter) {
- return beginCreateAsync(resourceGroupName, hanaInstanceName, hanaInstanceParameter)
- .last()
- .flatMap(this.client::getLroFinalResultOrError);
- }
-
- /**
- * Creates a SAP HANA instance for the specified subscription, resource group, and instance name.
- *
- * @param resourceGroupName Name of the resource group.
- * @param hanaInstanceName Name of the SAP HANA on Azure instance.
- * @param hanaInstanceParameter Request body representing a HanaInstance.
- * @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 hANA instance info on Azure (ARM properties and HANA properties).
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono createAsync(
- String resourceGroupName, String hanaInstanceName, HanaInstanceInner hanaInstanceParameter, Context context) {
- return beginCreateAsync(resourceGroupName, hanaInstanceName, hanaInstanceParameter, context)
- .last()
- .flatMap(this.client::getLroFinalResultOrError);
- }
-
- /**
- * Creates a SAP HANA instance for the specified subscription, resource group, and instance name.
- *
- * @param resourceGroupName Name of the resource group.
- * @param hanaInstanceName Name of the SAP HANA on Azure instance.
- * @param hanaInstanceParameter Request body representing a HanaInstance.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return hANA instance info on Azure (ARM properties and HANA properties).
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public HanaInstanceInner create(
- String resourceGroupName, String hanaInstanceName, HanaInstanceInner hanaInstanceParameter) {
- return createAsync(resourceGroupName, hanaInstanceName, hanaInstanceParameter).block();
- }
-
- /**
- * Creates a SAP HANA instance for the specified subscription, resource group, and instance name.
- *
- * @param resourceGroupName Name of the resource group.
- * @param hanaInstanceName Name of the SAP HANA on Azure instance.
- * @param hanaInstanceParameter Request body representing a HanaInstance.
- * @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 hANA instance info on Azure (ARM properties and HANA properties).
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public HanaInstanceInner create(
- String resourceGroupName, String hanaInstanceName, HanaInstanceInner hanaInstanceParameter, Context context) {
- return createAsync(resourceGroupName, hanaInstanceName, hanaInstanceParameter, context).block();
- }
-
- /**
- * Deletes a SAP HANA instance with the specified subscription, resource group, and instance name.
- *
- * @param resourceGroupName Name of the resource group.
- * @param hanaInstanceName Name of the SAP HANA on Azure instance.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException 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.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>> deleteWithResponseAsync(
- String resourceGroupName, String hanaInstanceName) {
- 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 (hanaInstanceName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter hanaInstanceName is required and cannot be null."));
- }
- final String accept = "application/json";
- return FluxUtil
- .withContext(
- context ->
- service
- .delete(
- this.client.getEndpoint(),
- this.client.getApiVersion(),
- this.client.getSubscriptionId(),
- resourceGroupName,
- hanaInstanceName,
- accept,
- context))
- .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
- }
-
- /**
- * Deletes a SAP HANA instance with the specified subscription, resource group, and instance name.
- *
- * @param resourceGroupName Name of the resource group.
- * @param hanaInstanceName Name of the SAP HANA on Azure instance.
- * @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 completion.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>> deleteWithResponseAsync(
- String resourceGroupName, String hanaInstanceName, 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 (hanaInstanceName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter hanaInstanceName is required and cannot be null."));
- }
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service
- .delete(
- this.client.getEndpoint(),
- this.client.getApiVersion(),
- this.client.getSubscriptionId(),
- resourceGroupName,
- hanaInstanceName,
- accept,
- context);
- }
-
- /**
- * Deletes a SAP HANA instance with the specified subscription, resource group, and instance name.
- *
- * @param resourceGroupName Name of the resource group.
- * @param hanaInstanceName Name of the SAP HANA on Azure instance.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException 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.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String hanaInstanceName) {
- Mono>> mono = deleteWithResponseAsync(resourceGroupName, hanaInstanceName);
- return this
- .client
- .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE);
- }
-
- /**
- * Deletes a SAP HANA instance with the specified subscription, resource group, and instance name.
- *
- * @param resourceGroupName Name of the resource group.
- * @param hanaInstanceName Name of the SAP HANA on Azure instance.
- * @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 completion.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private PollerFlux, Void> beginDeleteAsync(
- String resourceGroupName, String hanaInstanceName, Context context) {
- context = this.client.mergeContext(context);
- Mono>> mono = deleteWithResponseAsync(resourceGroupName, hanaInstanceName, context);
- return this
- .client
- .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context);
- }
-
- /**
- * Deletes a SAP HANA instance with the specified subscription, resource group, and instance name.
- *
- * @param resourceGroupName Name of the resource group.
- * @param hanaInstanceName Name of the SAP HANA on Azure instance.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException 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.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public SyncPoller, Void> beginDelete(String resourceGroupName, String hanaInstanceName) {
- return beginDeleteAsync(resourceGroupName, hanaInstanceName).getSyncPoller();
- }
-
- /**
- * Deletes a SAP HANA instance with the specified subscription, resource group, and instance name.
- *
- * @param resourceGroupName Name of the resource group.
- * @param hanaInstanceName Name of the SAP HANA on Azure instance.
- * @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 completion.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public SyncPoller, Void> beginDelete(
- String resourceGroupName, String hanaInstanceName, Context context) {
- return beginDeleteAsync(resourceGroupName, hanaInstanceName, context).getSyncPoller();
- }
-
- /**
- * Deletes a SAP HANA instance with the specified subscription, resource group, and instance name.
- *
- * @param resourceGroupName Name of the resource group.
- * @param hanaInstanceName Name of the SAP HANA on Azure instance.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException 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.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono deleteAsync(String resourceGroupName, String hanaInstanceName) {
- return beginDeleteAsync(resourceGroupName, hanaInstanceName)
- .last()
- .flatMap(this.client::getLroFinalResultOrError);
- }
-
- /**
- * Deletes a SAP HANA instance with the specified subscription, resource group, and instance name.
- *
- * @param resourceGroupName Name of the resource group.
- * @param hanaInstanceName Name of the SAP HANA on Azure instance.
- * @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 completion.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono deleteAsync(String resourceGroupName, String hanaInstanceName, Context context) {
- return beginDeleteAsync(resourceGroupName, hanaInstanceName, context)
- .last()
- .flatMap(this.client::getLroFinalResultOrError);
- }
-
- /**
- * Deletes a SAP HANA instance with the specified subscription, resource group, and instance name.
- *
- * @param resourceGroupName Name of the resource group.
- * @param hanaInstanceName Name of the SAP HANA on Azure instance.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @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 hanaInstanceName) {
- deleteAsync(resourceGroupName, hanaInstanceName).block();
- }
-
- /**
- * Deletes a SAP HANA instance with the specified subscription, resource group, and instance name.
- *
- * @param resourceGroupName Name of the resource group.
- * @param hanaInstanceName Name of the SAP HANA on Azure instance.
- * @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 hanaInstanceName, Context context) {
- deleteAsync(resourceGroupName, hanaInstanceName, context).block();
- }
-
- /**
- * Patches the Tags field of a SAP HANA instance for the specified subscription, resource group, and instance name.
- *
- * @param resourceGroupName Name of the resource group.
- * @param hanaInstanceName Name of the SAP HANA on Azure instance.
- * @param tagsParameter Request body that only contains the new Tags field.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return hANA instance info on Azure (ARM properties and HANA properties).
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> updateWithResponseAsync(
- String resourceGroupName, String hanaInstanceName, Tags tagsParameter) {
- 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 (hanaInstanceName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter hanaInstanceName is required and cannot be null."));
- }
- if (tagsParameter == null) {
- return Mono.error(new IllegalArgumentException("Parameter tagsParameter is required and cannot be null."));
- } else {
- tagsParameter.validate();
- }
- final String accept = "application/json";
- return FluxUtil
- .withContext(
- context ->
- service
- .update(
- this.client.getEndpoint(),
- this.client.getApiVersion(),
- this.client.getSubscriptionId(),
- resourceGroupName,
- hanaInstanceName,
- tagsParameter,
- accept,
- context))
- .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
- }
-
- /**
- * Patches the Tags field of a SAP HANA instance for the specified subscription, resource group, and instance name.
- *
- * @param resourceGroupName Name of the resource group.
- * @param hanaInstanceName Name of the SAP HANA on Azure instance.
- * @param tagsParameter Request body that only contains the new Tags field.
- * @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 hANA instance info on Azure (ARM properties and HANA properties).
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> updateWithResponseAsync(
- String resourceGroupName, String hanaInstanceName, Tags tagsParameter, 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 (hanaInstanceName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter hanaInstanceName is required and cannot be null."));
- }
- if (tagsParameter == null) {
- return Mono.error(new IllegalArgumentException("Parameter tagsParameter is required and cannot be null."));
- } else {
- tagsParameter.validate();
- }
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service
- .update(
- this.client.getEndpoint(),
- this.client.getApiVersion(),
- this.client.getSubscriptionId(),
- resourceGroupName,
- hanaInstanceName,
- tagsParameter,
- accept,
- context);
- }
-
- /**
- * Patches the Tags field of a SAP HANA instance for the specified subscription, resource group, and instance name.
- *
- * @param resourceGroupName Name of the resource group.
- * @param hanaInstanceName Name of the SAP HANA on Azure instance.
- * @param tagsParameter Request body that only contains the new Tags field.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return hANA instance info on Azure (ARM properties and HANA properties).
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono updateAsync(String resourceGroupName, String hanaInstanceName, Tags tagsParameter) {
- return updateWithResponseAsync(resourceGroupName, hanaInstanceName, tagsParameter)
- .flatMap(
- (Response res) -> {
- if (res.getValue() != null) {
- return Mono.just(res.getValue());
- } else {
- return Mono.empty();
- }
- });
- }
-
- /**
- * Patches the Tags field of a SAP HANA instance for the specified subscription, resource group, and instance name.
- *
- * @param resourceGroupName Name of the resource group.
- * @param hanaInstanceName Name of the SAP HANA on Azure instance.
- * @param tagsParameter Request body that only contains the new Tags field.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return hANA instance info on Azure (ARM properties and HANA properties).
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public HanaInstanceInner update(String resourceGroupName, String hanaInstanceName, Tags tagsParameter) {
- return updateAsync(resourceGroupName, hanaInstanceName, tagsParameter).block();
- }
-
- /**
- * Patches the Tags field of a SAP HANA instance for the specified subscription, resource group, and instance name.
- *
- * @param resourceGroupName Name of the resource group.
- * @param hanaInstanceName Name of the SAP HANA on Azure instance.
- * @param tagsParameter Request body that only contains the new Tags field.
- * @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 hANA instance info on Azure (ARM properties and HANA properties).
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public Response updateWithResponse(
- String resourceGroupName, String hanaInstanceName, Tags tagsParameter, Context context) {
- return updateWithResponseAsync(resourceGroupName, hanaInstanceName, tagsParameter, context).block();
- }
-
- /**
- * The operation to restart a SAP HANA instance.
- *
- * @param resourceGroupName Name of the resource group.
- * @param hanaInstanceName Name of the SAP HANA on Azure instance.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException 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.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>> restartWithResponseAsync(
- String resourceGroupName, String hanaInstanceName) {
- 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 (hanaInstanceName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter hanaInstanceName is required and cannot be null."));
- }
- final String accept = "application/json";
- return FluxUtil
- .withContext(
- context ->
- service
- .restart(
- this.client.getEndpoint(),
- this.client.getApiVersion(),
- this.client.getSubscriptionId(),
- resourceGroupName,
- hanaInstanceName,
- accept,
- context))
- .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
- }
-
- /**
- * The operation to restart a SAP HANA instance.
- *
- * @param resourceGroupName Name of the resource group.
- * @param hanaInstanceName Name of the SAP HANA on Azure instance.
- * @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 completion.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>> restartWithResponseAsync(
- String resourceGroupName, String hanaInstanceName, 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 (hanaInstanceName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter hanaInstanceName is required and cannot be null."));
- }
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service
- .restart(
- this.client.getEndpoint(),
- this.client.getApiVersion(),
- this.client.getSubscriptionId(),
- resourceGroupName,
- hanaInstanceName,
- accept,
- context);
- }
-
- /**
- * The operation to restart a SAP HANA instance.
- *
- * @param resourceGroupName Name of the resource group.
- * @param hanaInstanceName Name of the SAP HANA on Azure instance.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException 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.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private PollerFlux, Void> beginRestartAsync(String resourceGroupName, String hanaInstanceName) {
- Mono>> mono = restartWithResponseAsync(resourceGroupName, hanaInstanceName);
- return this
- .client
- .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE);
- }
-
- /**
- * The operation to restart a SAP HANA instance.
- *
- * @param resourceGroupName Name of the resource group.
- * @param hanaInstanceName Name of the SAP HANA on Azure instance.
- * @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 completion.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private PollerFlux, Void> beginRestartAsync(
- String resourceGroupName, String hanaInstanceName, Context context) {
- context = this.client.mergeContext(context);
- Mono>> mono = restartWithResponseAsync(resourceGroupName, hanaInstanceName, context);
- return this
- .client
- .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context);
- }
-
- /**
- * The operation to restart a SAP HANA instance.
- *
- * @param resourceGroupName Name of the resource group.
- * @param hanaInstanceName Name of the SAP HANA on Azure instance.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException 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.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public SyncPoller, Void> beginRestart(String resourceGroupName, String hanaInstanceName) {
- return beginRestartAsync(resourceGroupName, hanaInstanceName).getSyncPoller();
- }
-
- /**
- * The operation to restart a SAP HANA instance.
- *
- * @param resourceGroupName Name of the resource group.
- * @param hanaInstanceName Name of the SAP HANA on Azure instance.
- * @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 completion.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public SyncPoller, Void> beginRestart(
- String resourceGroupName, String hanaInstanceName, Context context) {
- return beginRestartAsync(resourceGroupName, hanaInstanceName, context).getSyncPoller();
- }
-
- /**
- * The operation to restart a SAP HANA instance.
- *
- * @param resourceGroupName Name of the resource group.
- * @param hanaInstanceName Name of the SAP HANA on Azure instance.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException 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.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono restartAsync(String resourceGroupName, String hanaInstanceName) {
- return beginRestartAsync(resourceGroupName, hanaInstanceName)
- .last()
- .flatMap(this.client::getLroFinalResultOrError);
- }
-
- /**
- * The operation to restart a SAP HANA instance.
- *
- * @param resourceGroupName Name of the resource group.
- * @param hanaInstanceName Name of the SAP HANA on Azure instance.
- * @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 completion.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono restartAsync(String resourceGroupName, String hanaInstanceName, Context context) {
- return beginRestartAsync(resourceGroupName, hanaInstanceName, context)
- .last()
- .flatMap(this.client::getLroFinalResultOrError);
- }
-
- /**
- * The operation to restart a SAP HANA instance.
- *
- * @param resourceGroupName Name of the resource group.
- * @param hanaInstanceName Name of the SAP HANA on Azure instance.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @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 restart(String resourceGroupName, String hanaInstanceName) {
- restartAsync(resourceGroupName, hanaInstanceName).block();
- }
-
- /**
- * The operation to restart a SAP HANA instance.
- *
- * @param resourceGroupName Name of the resource group.
- * @param hanaInstanceName Name of the SAP HANA on Azure instance.
- * @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 restart(String resourceGroupName, String hanaInstanceName, Context context) {
- restartAsync(resourceGroupName, hanaInstanceName, context).block();
- }
-
- /**
- * The operation to start a SAP HANA instance.
- *
- * @param resourceGroupName Name of the resource group.
- * @param hanaInstanceName Name of the SAP HANA on Azure instance.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException 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.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>> startWithResponseAsync(String resourceGroupName, String hanaInstanceName) {
- 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 (hanaInstanceName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter hanaInstanceName is required and cannot be null."));
- }
- final String accept = "application/json";
- return FluxUtil
- .withContext(
- context ->
- service
- .start(
- this.client.getEndpoint(),
- this.client.getApiVersion(),
- this.client.getSubscriptionId(),
- resourceGroupName,
- hanaInstanceName,
- accept,
- context))
- .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
- }
-
- /**
- * The operation to start a SAP HANA instance.
- *
- * @param resourceGroupName Name of the resource group.
- * @param hanaInstanceName Name of the SAP HANA on Azure instance.
- * @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 completion.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>> startWithResponseAsync(
- String resourceGroupName, String hanaInstanceName, 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 (hanaInstanceName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter hanaInstanceName is required and cannot be null."));
- }
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service
- .start(
- this.client.getEndpoint(),
- this.client.getApiVersion(),
- this.client.getSubscriptionId(),
- resourceGroupName,
- hanaInstanceName,
- accept,
- context);
- }
-
- /**
- * The operation to start a SAP HANA instance.
- *
- * @param resourceGroupName Name of the resource group.
- * @param hanaInstanceName Name of the SAP HANA on Azure instance.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException 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.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private PollerFlux, Void> beginStartAsync(String resourceGroupName, String hanaInstanceName) {
- Mono>> mono = startWithResponseAsync(resourceGroupName, hanaInstanceName);
- return this
- .client
- .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE);
- }
-
- /**
- * The operation to start a SAP HANA instance.
- *
- * @param resourceGroupName Name of the resource group.
- * @param hanaInstanceName Name of the SAP HANA on Azure instance.
- * @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 completion.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private PollerFlux, Void> beginStartAsync(
- String resourceGroupName, String hanaInstanceName, Context context) {
- context = this.client.mergeContext(context);
- Mono>> mono = startWithResponseAsync(resourceGroupName, hanaInstanceName, context);
- return this
- .client
- .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context);
- }
-
- /**
- * The operation to start a SAP HANA instance.
- *
- * @param resourceGroupName Name of the resource group.
- * @param hanaInstanceName Name of the SAP HANA on Azure instance.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException 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.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public SyncPoller, Void> beginStart(String resourceGroupName, String hanaInstanceName) {
- return beginStartAsync(resourceGroupName, hanaInstanceName).getSyncPoller();
- }
-
- /**
- * The operation to start a SAP HANA instance.
- *
- * @param resourceGroupName Name of the resource group.
- * @param hanaInstanceName Name of the SAP HANA on Azure instance.
- * @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 completion.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public SyncPoller, Void> beginStart(
- String resourceGroupName, String hanaInstanceName, Context context) {
- return beginStartAsync(resourceGroupName, hanaInstanceName, context).getSyncPoller();
- }
-
- /**
- * The operation to start a SAP HANA instance.
- *
- * @param resourceGroupName Name of the resource group.
- * @param hanaInstanceName Name of the SAP HANA on Azure instance.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException 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.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono startAsync(String resourceGroupName, String hanaInstanceName) {
- return beginStartAsync(resourceGroupName, hanaInstanceName)
- .last()
- .flatMap(this.client::getLroFinalResultOrError);
- }
-
- /**
- * The operation to start a SAP HANA instance.
- *
- * @param resourceGroupName Name of the resource group.
- * @param hanaInstanceName Name of the SAP HANA on Azure instance.
- * @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 completion.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono startAsync(String resourceGroupName, String hanaInstanceName, Context context) {
- return beginStartAsync(resourceGroupName, hanaInstanceName, context)
- .last()
- .flatMap(this.client::getLroFinalResultOrError);
- }
-
- /**
- * The operation to start a SAP HANA instance.
- *
- * @param resourceGroupName Name of the resource group.
- * @param hanaInstanceName Name of the SAP HANA on Azure instance.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @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 start(String resourceGroupName, String hanaInstanceName) {
- startAsync(resourceGroupName, hanaInstanceName).block();
- }
-
- /**
- * The operation to start a SAP HANA instance.
- *
- * @param resourceGroupName Name of the resource group.
- * @param hanaInstanceName Name of the SAP HANA on Azure instance.
- * @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 start(String resourceGroupName, String hanaInstanceName, Context context) {
- startAsync(resourceGroupName, hanaInstanceName, context).block();
- }
-
- /**
- * The operation to shutdown a SAP HANA instance.
- *
- * @param resourceGroupName Name of the resource group.
- * @param hanaInstanceName Name of the SAP HANA on Azure instance.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException 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.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>> shutdownWithResponseAsync(
- String resourceGroupName, String hanaInstanceName) {
- 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 (hanaInstanceName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter hanaInstanceName is required and cannot be null."));
- }
- final String accept = "application/json";
- return FluxUtil
- .withContext(
- context ->
- service
- .shutdown(
- this.client.getEndpoint(),
- this.client.getApiVersion(),
- this.client.getSubscriptionId(),
- resourceGroupName,
- hanaInstanceName,
- accept,
- context))
- .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
- }
-
- /**
- * The operation to shutdown a SAP HANA instance.
- *
- * @param resourceGroupName Name of the resource group.
- * @param hanaInstanceName Name of the SAP HANA on Azure instance.
- * @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 completion.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>> shutdownWithResponseAsync(
- String resourceGroupName, String hanaInstanceName, 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 (hanaInstanceName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter hanaInstanceName is required and cannot be null."));
- }
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service
- .shutdown(
- this.client.getEndpoint(),
- this.client.getApiVersion(),
- this.client.getSubscriptionId(),
- resourceGroupName,
- hanaInstanceName,
- accept,
- context);
- }
-
- /**
- * The operation to shutdown a SAP HANA instance.
- *
- * @param resourceGroupName Name of the resource group.
- * @param hanaInstanceName Name of the SAP HANA on Azure instance.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException 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.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private PollerFlux, Void> beginShutdownAsync(String resourceGroupName, String hanaInstanceName) {
- Mono>> mono = shutdownWithResponseAsync(resourceGroupName, hanaInstanceName);
- return this
- .client
- .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE);
- }
-
- /**
- * The operation to shutdown a SAP HANA instance.
- *
- * @param resourceGroupName Name of the resource group.
- * @param hanaInstanceName Name of the SAP HANA on Azure instance.
- * @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 completion.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private PollerFlux, Void> beginShutdownAsync(
- String resourceGroupName, String hanaInstanceName, Context context) {
- context = this.client.mergeContext(context);
- Mono>> mono = shutdownWithResponseAsync(resourceGroupName, hanaInstanceName, context);
- return this
- .client
- .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context);
- }
-
- /**
- * The operation to shutdown a SAP HANA instance.
- *
- * @param resourceGroupName Name of the resource group.
- * @param hanaInstanceName Name of the SAP HANA on Azure instance.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException 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.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public SyncPoller, Void> beginShutdown(String resourceGroupName, String hanaInstanceName) {
- return beginShutdownAsync(resourceGroupName, hanaInstanceName).getSyncPoller();
- }
-
- /**
- * The operation to shutdown a SAP HANA instance.
- *
- * @param resourceGroupName Name of the resource group.
- * @param hanaInstanceName Name of the SAP HANA on Azure instance.
- * @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 completion.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public SyncPoller, Void> beginShutdown(
- String resourceGroupName, String hanaInstanceName, Context context) {
- return beginShutdownAsync(resourceGroupName, hanaInstanceName, context).getSyncPoller();
- }
-
- /**
- * The operation to shutdown a SAP HANA instance.
- *
- * @param resourceGroupName Name of the resource group.
- * @param hanaInstanceName Name of the SAP HANA on Azure instance.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException 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.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono shutdownAsync(String resourceGroupName, String hanaInstanceName) {
- return beginShutdownAsync(resourceGroupName, hanaInstanceName)
- .last()
- .flatMap(this.client::getLroFinalResultOrError);
- }
-
- /**
- * The operation to shutdown a SAP HANA instance.
- *
- * @param resourceGroupName Name of the resource group.
- * @param hanaInstanceName Name of the SAP HANA on Azure instance.
- * @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 completion.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono shutdownAsync(String resourceGroupName, String hanaInstanceName, Context context) {
- return beginShutdownAsync(resourceGroupName, hanaInstanceName, context)
- .last()
- .flatMap(this.client::getLroFinalResultOrError);
- }
-
- /**
- * The operation to shutdown a SAP HANA instance.
- *
- * @param resourceGroupName Name of the resource group.
- * @param hanaInstanceName Name of the SAP HANA on Azure instance.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @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 shutdown(String resourceGroupName, String hanaInstanceName) {
- shutdownAsync(resourceGroupName, hanaInstanceName).block();
- }
-
- /**
- * The operation to shutdown a SAP HANA instance.
- *
- * @param resourceGroupName Name of the resource group.
- * @param hanaInstanceName Name of the SAP HANA on Azure instance.
- * @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 shutdown(String resourceGroupName, String hanaInstanceName, Context context) {
- shutdownAsync(resourceGroupName, hanaInstanceName, 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 the response from the List HANA Instances operation.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listNextSinglePageAsync(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.listNext(nextLink, this.client.getEndpoint(), accept, context))
- .>map(
- res ->
- new PagedResponseBase<>(
- res.getRequest(),
- res.getStatusCode(),
- res.getHeaders(),
- res.getValue().value(),
- res.getValue().nextLink(),
- null))
- .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
- }
-
- /**
- * Get the next page of items.
- *
- * @param nextLink The 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 the response from the List HANA Instances operation.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listNextSinglePageAsync(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
- .listNext(nextLink, this.client.getEndpoint(), accept, context)
- .map(
- res ->
- new PagedResponseBase<>(
- res.getRequest(),
- res.getStatusCode(),
- res.getHeaders(),
- res.getValue().value(),
- res.getValue().nextLink(),
- null));
- }
-
- /**
- * Get the next page of items.
- *
- * @param nextLink The 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 the response from the List HANA Instances operation.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listByResourceGroupNextSinglePageAsync(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.listByResourceGroupNext(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 the response from the List HANA Instances operation.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listByResourceGroupNextSinglePageAsync(
- 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
- .listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)
- .map(
- res ->
- new PagedResponseBase<>(
- res.getRequest(),
- res.getStatusCode(),
- res.getHeaders(),
- res.getValue().value(),
- res.getValue().nextLink(),
- null));
- }
-}
diff --git a/sdk/hanaonazure/azure-resourcemanager-hanaonazure/src/main/java/com/azure/resourcemanager/hanaonazure/implementation/HanaInstancesImpl.java b/sdk/hanaonazure/azure-resourcemanager-hanaonazure/src/main/java/com/azure/resourcemanager/hanaonazure/implementation/HanaInstancesImpl.java
deleted file mode 100644
index 7c07e070e9d15..0000000000000
--- a/sdk/hanaonazure/azure-resourcemanager-hanaonazure/src/main/java/com/azure/resourcemanager/hanaonazure/implementation/HanaInstancesImpl.java
+++ /dev/null
@@ -1,194 +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.hanaonazure.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.hanaonazure.fluent.HanaInstancesClient;
-import com.azure.resourcemanager.hanaonazure.fluent.models.HanaInstanceInner;
-import com.azure.resourcemanager.hanaonazure.models.HanaInstance;
-import com.azure.resourcemanager.hanaonazure.models.HanaInstances;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-
-public final class HanaInstancesImpl implements HanaInstances {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(HanaInstancesImpl.class);
-
- private final HanaInstancesClient innerClient;
-
- private final com.azure.resourcemanager.hanaonazure.HanaManager serviceManager;
-
- public HanaInstancesImpl(
- HanaInstancesClient innerClient, com.azure.resourcemanager.hanaonazure.HanaManager serviceManager) {
- this.innerClient = innerClient;
- this.serviceManager = serviceManager;
- }
-
- public PagedIterable list() {
- PagedIterable inner = this.serviceClient().list();
- return Utils.mapPage(inner, inner1 -> new HanaInstanceImpl(inner1, this.manager()));
- }
-
- public PagedIterable list(Context context) {
- PagedIterable inner = this.serviceClient().list(context);
- return Utils.mapPage(inner, inner1 -> new HanaInstanceImpl(inner1, this.manager()));
- }
-
- public PagedIterable listByResourceGroup(String resourceGroupName) {
- PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName);
- return Utils.mapPage(inner, inner1 -> new HanaInstanceImpl(inner1, this.manager()));
- }
-
- public PagedIterable listByResourceGroup(String resourceGroupName, Context context) {
- PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName, context);
- return Utils.mapPage(inner, inner1 -> new HanaInstanceImpl(inner1, this.manager()));
- }
-
- public HanaInstance getByResourceGroup(String resourceGroupName, String hanaInstanceName) {
- HanaInstanceInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, hanaInstanceName);
- if (inner != null) {
- return new HanaInstanceImpl(inner, this.manager());
- } else {
- return null;
- }
- }
-
- public Response getByResourceGroupWithResponse(
- String resourceGroupName, String hanaInstanceName, Context context) {
- Response inner =
- this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, hanaInstanceName, context);
- if (inner != null) {
- return new SimpleResponse<>(
- inner.getRequest(),
- inner.getStatusCode(),
- inner.getHeaders(),
- new HanaInstanceImpl(inner.getValue(), this.manager()));
- } else {
- return null;
- }
- }
-
- public void deleteByResourceGroup(String resourceGroupName, String hanaInstanceName) {
- this.serviceClient().delete(resourceGroupName, hanaInstanceName);
- }
-
- public void delete(String resourceGroupName, String hanaInstanceName, Context context) {
- this.serviceClient().delete(resourceGroupName, hanaInstanceName, context);
- }
-
- public void restart(String resourceGroupName, String hanaInstanceName) {
- this.serviceClient().restart(resourceGroupName, hanaInstanceName);
- }
-
- public void restart(String resourceGroupName, String hanaInstanceName, Context context) {
- this.serviceClient().restart(resourceGroupName, hanaInstanceName, context);
- }
-
- public void start(String resourceGroupName, String hanaInstanceName) {
- this.serviceClient().start(resourceGroupName, hanaInstanceName);
- }
-
- public void start(String resourceGroupName, String hanaInstanceName, Context context) {
- this.serviceClient().start(resourceGroupName, hanaInstanceName, context);
- }
-
- public void shutdown(String resourceGroupName, String hanaInstanceName) {
- this.serviceClient().shutdown(resourceGroupName, hanaInstanceName);
- }
-
- public void shutdown(String resourceGroupName, String hanaInstanceName, Context context) {
- this.serviceClient().shutdown(resourceGroupName, hanaInstanceName, context);
- }
-
- public HanaInstance 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 hanaInstanceName = Utils.getValueFromIdByName(id, "hanaInstances");
- if (hanaInstanceName == null) {
- throw logger
- .logExceptionAsError(
- new IllegalArgumentException(
- String.format("The resource ID '%s' is not valid. Missing path segment 'hanaInstances'.", id)));
- }
- return this.getByResourceGroupWithResponse(resourceGroupName, hanaInstanceName, 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 hanaInstanceName = Utils.getValueFromIdByName(id, "hanaInstances");
- if (hanaInstanceName == null) {
- throw logger
- .logExceptionAsError(
- new IllegalArgumentException(
- String.format("The resource ID '%s' is not valid. Missing path segment 'hanaInstances'.", id)));
- }
- return this.getByResourceGroupWithResponse(resourceGroupName, hanaInstanceName, 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 hanaInstanceName = Utils.getValueFromIdByName(id, "hanaInstances");
- if (hanaInstanceName == null) {
- throw logger
- .logExceptionAsError(
- new IllegalArgumentException(
- String.format("The resource ID '%s' is not valid. Missing path segment 'hanaInstances'.", id)));
- }
- this.delete(resourceGroupName, hanaInstanceName, 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 hanaInstanceName = Utils.getValueFromIdByName(id, "hanaInstances");
- if (hanaInstanceName == null) {
- throw logger
- .logExceptionAsError(
- new IllegalArgumentException(
- String.format("The resource ID '%s' is not valid. Missing path segment 'hanaInstances'.", id)));
- }
- this.delete(resourceGroupName, hanaInstanceName, context);
- }
-
- private HanaInstancesClient serviceClient() {
- return this.innerClient;
- }
-
- private com.azure.resourcemanager.hanaonazure.HanaManager manager() {
- return this.serviceManager;
- }
-
- public HanaInstanceImpl define(String name) {
- return new HanaInstanceImpl(name, this.manager());
- }
-}
diff --git a/sdk/hanaonazure/azure-resourcemanager-hanaonazure/src/main/java/com/azure/resourcemanager/hanaonazure/implementation/HanaManagementClientImpl.java b/sdk/hanaonazure/azure-resourcemanager-hanaonazure/src/main/java/com/azure/resourcemanager/hanaonazure/implementation/HanaManagementClientImpl.java
index c51117fcf238b..e55d10d22784f 100644
--- a/sdk/hanaonazure/azure-resourcemanager-hanaonazure/src/main/java/com/azure/resourcemanager/hanaonazure/implementation/HanaManagementClientImpl.java
+++ b/sdk/hanaonazure/azure-resourcemanager-hanaonazure/src/main/java/com/azure/resourcemanager/hanaonazure/implementation/HanaManagementClientImpl.java
@@ -21,9 +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.hanaonazure.fluent.HanaInstancesClient;
import com.azure.resourcemanager.hanaonazure.fluent.HanaManagementClient;
import com.azure.resourcemanager.hanaonazure.fluent.OperationsClient;
+import com.azure.resourcemanager.hanaonazure.fluent.ProviderInstancesClient;
+import com.azure.resourcemanager.hanaonazure.fluent.SapMonitorsClient;
import java.io.IOException;
import java.lang.reflect.Type;
import java.nio.ByteBuffer;
@@ -127,16 +128,28 @@ public OperationsClient getOperations() {
return this.operations;
}
- /** The HanaInstancesClient object to access its operations. */
- private final HanaInstancesClient hanaInstances;
+ /** The SapMonitorsClient object to access its operations. */
+ private final SapMonitorsClient sapMonitors;
/**
- * Gets the HanaInstancesClient object to access its operations.
+ * Gets the SapMonitorsClient object to access its operations.
*
- * @return the HanaInstancesClient object.
+ * @return the SapMonitorsClient object.
*/
- public HanaInstancesClient getHanaInstances() {
- return this.hanaInstances;
+ public SapMonitorsClient getSapMonitors() {
+ return this.sapMonitors;
+ }
+
+ /** The ProviderInstancesClient object to access its operations. */
+ private final ProviderInstancesClient providerInstances;
+
+ /**
+ * Gets the ProviderInstancesClient object to access its operations.
+ *
+ * @return the ProviderInstancesClient object.
+ */
+ public ProviderInstancesClient getProviderInstances() {
+ return this.providerInstances;
}
/**
@@ -162,9 +175,10 @@ public HanaInstancesClient getHanaInstances() {
this.defaultPollInterval = defaultPollInterval;
this.subscriptionId = subscriptionId;
this.endpoint = endpoint;
- this.apiVersion = "2017-11-03-preview";
+ this.apiVersion = "2020-02-07-preview";
this.operations = new OperationsClientImpl(this);
- this.hanaInstances = new HanaInstancesClientImpl(this);
+ this.sapMonitors = new SapMonitorsClientImpl(this);
+ this.providerInstances = new ProviderInstancesClientImpl(this);
}
/**
diff --git a/sdk/hanaonazure/azure-resourcemanager-hanaonazure/src/main/java/com/azure/resourcemanager/hanaonazure/implementation/ProviderInstanceImpl.java b/sdk/hanaonazure/azure-resourcemanager-hanaonazure/src/main/java/com/azure/resourcemanager/hanaonazure/implementation/ProviderInstanceImpl.java
new file mode 100644
index 0000000000000..7f421d2021d61
--- /dev/null
+++ b/sdk/hanaonazure/azure-resourcemanager-hanaonazure/src/main/java/com/azure/resourcemanager/hanaonazure/implementation/ProviderInstanceImpl.java
@@ -0,0 +1,129 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.hanaonazure.implementation;
+
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.hanaonazure.fluent.models.ProviderInstanceInner;
+import com.azure.resourcemanager.hanaonazure.models.HanaProvisioningStatesEnum;
+import com.azure.resourcemanager.hanaonazure.models.ProviderInstance;
+
+public final class ProviderInstanceImpl implements ProviderInstance, ProviderInstance.Definition {
+ private ProviderInstanceInner innerObject;
+
+ private final com.azure.resourcemanager.hanaonazure.HanaManager serviceManager;
+
+ ProviderInstanceImpl(
+ ProviderInstanceInner innerObject, com.azure.resourcemanager.hanaonazure.HanaManager 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 String typePropertiesType() {
+ return this.innerModel().typePropertiesType();
+ }
+
+ public String properties() {
+ return this.innerModel().properties();
+ }
+
+ public String metadata() {
+ return this.innerModel().metadata();
+ }
+
+ public HanaProvisioningStatesEnum provisioningState() {
+ return this.innerModel().provisioningState();
+ }
+
+ public ProviderInstanceInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.hanaonazure.HanaManager manager() {
+ return this.serviceManager;
+ }
+
+ private String resourceGroupName;
+
+ private String sapMonitorName;
+
+ private String providerInstanceName;
+
+ public ProviderInstanceImpl withExistingSapMonitor(String resourceGroupName, String sapMonitorName) {
+ this.resourceGroupName = resourceGroupName;
+ this.sapMonitorName = sapMonitorName;
+ return this;
+ }
+
+ public ProviderInstance create() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getProviderInstances()
+ .create(resourceGroupName, sapMonitorName, providerInstanceName, this.innerModel(), Context.NONE);
+ return this;
+ }
+
+ public ProviderInstance create(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getProviderInstances()
+ .create(resourceGroupName, sapMonitorName, providerInstanceName, this.innerModel(), context);
+ return this;
+ }
+
+ ProviderInstanceImpl(String name, com.azure.resourcemanager.hanaonazure.HanaManager serviceManager) {
+ this.innerObject = new ProviderInstanceInner();
+ this.serviceManager = serviceManager;
+ this.providerInstanceName = name;
+ }
+
+ public ProviderInstance refresh() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getProviderInstances()
+ .getWithResponse(resourceGroupName, sapMonitorName, providerInstanceName, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public ProviderInstance refresh(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getProviderInstances()
+ .getWithResponse(resourceGroupName, sapMonitorName, providerInstanceName, context)
+ .getValue();
+ return this;
+ }
+
+ public ProviderInstanceImpl withTypePropertiesType(String typePropertiesType) {
+ this.innerModel().withTypePropertiesType(typePropertiesType);
+ return this;
+ }
+
+ public ProviderInstanceImpl withProperties(String properties) {
+ this.innerModel().withProperties(properties);
+ return this;
+ }
+
+ public ProviderInstanceImpl withMetadata(String metadata) {
+ this.innerModel().withMetadata(metadata);
+ return this;
+ }
+}
diff --git a/sdk/hanaonazure/azure-resourcemanager-hanaonazure/src/main/java/com/azure/resourcemanager/hanaonazure/implementation/ProviderInstancesClientImpl.java b/sdk/hanaonazure/azure-resourcemanager-hanaonazure/src/main/java/com/azure/resourcemanager/hanaonazure/implementation/ProviderInstancesClientImpl.java
new file mode 100644
index 0000000000000..3b8c6c19a858f
--- /dev/null
+++ b/sdk/hanaonazure/azure-resourcemanager-hanaonazure/src/main/java/com/azure/resourcemanager/hanaonazure/implementation/ProviderInstancesClientImpl.java
@@ -0,0 +1,1163 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.hanaonazure.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.logging.ClientLogger;
+import com.azure.core.util.polling.PollerFlux;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.hanaonazure.fluent.ProviderInstancesClient;
+import com.azure.resourcemanager.hanaonazure.fluent.models.ProviderInstanceInner;
+import com.azure.resourcemanager.hanaonazure.models.ProviderInstanceListResult;
+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 ProviderInstancesClient. */
+public final class ProviderInstancesClientImpl implements ProviderInstancesClient {
+ private final ClientLogger logger = new ClientLogger(ProviderInstancesClientImpl.class);
+
+ /** The proxy service used to perform REST calls. */
+ private final ProviderInstancesService service;
+
+ /** The service client containing this operation class. */
+ private final HanaManagementClientImpl client;
+
+ /**
+ * Initializes an instance of ProviderInstancesClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ ProviderInstancesClientImpl(HanaManagementClientImpl client) {
+ this.service =
+ RestProxy.create(ProviderInstancesService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for HanaManagementClientProviderInstances to be used by the proxy service
+ * to perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "HanaManagementClient")
+ private interface ProviderInstancesService {
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HanaOnAzure"
+ + "/sapMonitors/{sapMonitorName}/providerInstances")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> list(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("sapMonitorName") String sapMonitorName,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HanaOnAzure"
+ + "/sapMonitors/{sapMonitorName}/providerInstances/{providerInstanceName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> get(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("sapMonitorName") String sapMonitorName,
+ @PathParam("providerInstanceName") String providerInstanceName,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Put(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HanaOnAzure"
+ + "/sapMonitors/{sapMonitorName}/providerInstances/{providerInstanceName}")
+ @ExpectedResponses({200, 201})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> create(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("sapMonitorName") String sapMonitorName,
+ @PathParam("providerInstanceName") String providerInstanceName,
+ @BodyParam("application/json") ProviderInstanceInner providerInstanceParameter,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Delete(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HanaOnAzure"
+ + "/sapMonitors/{sapMonitorName}/providerInstances/{providerInstanceName}")
+ @ExpectedResponses({200, 202, 204})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> delete(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("sapMonitorName") String sapMonitorName,
+ @PathParam("providerInstanceName") String providerInstanceName,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("{nextLink}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * Gets a list of provider instances in the specified SAP monitor. The operations returns various properties of each
+ * provider instances.
+ *
+ * @param resourceGroupName Name of the resource group.
+ * @param sapMonitorName Name of the SAP monitor resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of provider instances in the specified SAP monitor.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(
+ String resourceGroupName, String sapMonitorName) {
+ 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 (sapMonitorName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter sapMonitorName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .list(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ sapMonitorName,
+ 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()));
+ }
+
+ /**
+ * Gets a list of provider instances in the specified SAP monitor. The operations returns various properties of each
+ * provider instances.
+ *
+ * @param resourceGroupName Name of the resource group.
+ * @param sapMonitorName Name of the SAP monitor resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of provider instances in the specified SAP monitor.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(
+ String resourceGroupName, String sapMonitorName, 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 (sapMonitorName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter sapMonitorName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .list(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ sapMonitorName,
+ accept,
+ context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * Gets a list of provider instances in the specified SAP monitor. The operations returns various properties of each
+ * provider instances.
+ *
+ * @param resourceGroupName Name of the resource group.
+ * @param sapMonitorName Name of the SAP monitor resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of provider instances in the specified SAP monitor.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(String resourceGroupName, String sapMonitorName) {
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(resourceGroupName, sapMonitorName),
+ nextLink -> listNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Gets a list of provider instances in the specified SAP monitor. The operations returns various properties of each
+ * provider instances.
+ *
+ * @param resourceGroupName Name of the resource group.
+ * @param sapMonitorName Name of the SAP monitor resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of provider instances in the specified SAP monitor.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(
+ String resourceGroupName, String sapMonitorName, Context context) {
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(resourceGroupName, sapMonitorName, context),
+ nextLink -> listNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * Gets a list of provider instances in the specified SAP monitor. The operations returns various properties of each
+ * provider instances.
+ *
+ * @param resourceGroupName Name of the resource group.
+ * @param sapMonitorName Name of the SAP monitor resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of provider instances in the specified SAP monitor.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(String resourceGroupName, String sapMonitorName) {
+ return new PagedIterable<>(listAsync(resourceGroupName, sapMonitorName));
+ }
+
+ /**
+ * Gets a list of provider instances in the specified SAP monitor. The operations returns various properties of each
+ * provider instances.
+ *
+ * @param resourceGroupName Name of the resource group.
+ * @param sapMonitorName Name of the SAP monitor resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of provider instances in the specified SAP monitor.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(String resourceGroupName, String sapMonitorName, Context context) {
+ return new PagedIterable<>(listAsync(resourceGroupName, sapMonitorName, context));
+ }
+
+ /**
+ * Gets properties of a provider instance for the specified subscription, resource group, SapMonitor name, and
+ * resource name.
+ *
+ * @param resourceGroupName Name of the resource group.
+ * @param sapMonitorName Name of the SAP monitor resource.
+ * @param providerInstanceName Name of the provider instance.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return properties of a provider instance for the specified subscription, resource group, SapMonitor name, and
+ * resource name.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String resourceGroupName, String sapMonitorName, String providerInstanceName) {
+ 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 (sapMonitorName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter sapMonitorName is required and cannot be null."));
+ }
+ if (providerInstanceName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter providerInstanceName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .get(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ sapMonitorName,
+ providerInstanceName,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Gets properties of a provider instance for the specified subscription, resource group, SapMonitor name, and
+ * resource name.
+ *
+ * @param resourceGroupName Name of the resource group.
+ * @param sapMonitorName Name of the SAP monitor resource.
+ * @param providerInstanceName Name of the provider instance.
+ * @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 properties of a provider instance for the specified subscription, resource group, SapMonitor name, and
+ * resource name.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String resourceGroupName, String sapMonitorName, String providerInstanceName, 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 (sapMonitorName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter sapMonitorName is required and cannot be null."));
+ }
+ if (providerInstanceName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter providerInstanceName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .get(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ sapMonitorName,
+ providerInstanceName,
+ accept,
+ context);
+ }
+
+ /**
+ * Gets properties of a provider instance for the specified subscription, resource group, SapMonitor name, and
+ * resource name.
+ *
+ * @param resourceGroupName Name of the resource group.
+ * @param sapMonitorName Name of the SAP monitor resource.
+ * @param providerInstanceName Name of the provider instance.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return properties of a provider instance for the specified subscription, resource group, SapMonitor name, and
+ * resource name.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync(
+ String resourceGroupName, String sapMonitorName, String providerInstanceName) {
+ return getWithResponseAsync(resourceGroupName, sapMonitorName, providerInstanceName)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * Gets properties of a provider instance for the specified subscription, resource group, SapMonitor name, and
+ * resource name.
+ *
+ * @param resourceGroupName Name of the resource group.
+ * @param sapMonitorName Name of the SAP monitor resource.
+ * @param providerInstanceName Name of the provider instance.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return properties of a provider instance for the specified subscription, resource group, SapMonitor name, and
+ * resource name.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public ProviderInstanceInner get(String resourceGroupName, String sapMonitorName, String providerInstanceName) {
+ return getAsync(resourceGroupName, sapMonitorName, providerInstanceName).block();
+ }
+
+ /**
+ * Gets properties of a provider instance for the specified subscription, resource group, SapMonitor name, and
+ * resource name.
+ *
+ * @param resourceGroupName Name of the resource group.
+ * @param sapMonitorName Name of the SAP monitor resource.
+ * @param providerInstanceName Name of the provider instance.
+ * @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 properties of a provider instance for the specified subscription, resource group, SapMonitor name, and
+ * resource name.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getWithResponse(
+ String resourceGroupName, String sapMonitorName, String providerInstanceName, Context context) {
+ return getWithResponseAsync(resourceGroupName, sapMonitorName, providerInstanceName, context).block();
+ }
+
+ /**
+ * Creates a provider instance for the specified subscription, resource group, SapMonitor name, and resource name.
+ *
+ * @param resourceGroupName Name of the resource group.
+ * @param sapMonitorName Name of the SAP monitor resource.
+ * @param providerInstanceName Name of the provider instance.
+ * @param providerInstanceParameter Request body representing a provider instance.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 provider instance associated with a SAP monitor.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createWithResponseAsync(
+ String resourceGroupName,
+ String sapMonitorName,
+ String providerInstanceName,
+ ProviderInstanceInner providerInstanceParameter) {
+ 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 (sapMonitorName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter sapMonitorName is required and cannot be null."));
+ }
+ if (providerInstanceName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter providerInstanceName is required and cannot be null."));
+ }
+ if (providerInstanceParameter == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter providerInstanceParameter is required and cannot be null."));
+ } else {
+ providerInstanceParameter.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .create(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ sapMonitorName,
+ providerInstanceName,
+ providerInstanceParameter,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Creates a provider instance for the specified subscription, resource group, SapMonitor name, and resource name.
+ *
+ * @param resourceGroupName Name of the resource group.
+ * @param sapMonitorName Name of the SAP monitor resource.
+ * @param providerInstanceName Name of the provider instance.
+ * @param providerInstanceParameter Request body representing a provider instance.
+ * @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 provider instance associated with a SAP monitor.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createWithResponseAsync(
+ String resourceGroupName,
+ String sapMonitorName,
+ String providerInstanceName,
+ ProviderInstanceInner providerInstanceParameter,
+ 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 (sapMonitorName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter sapMonitorName is required and cannot be null."));
+ }
+ if (providerInstanceName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter providerInstanceName is required and cannot be null."));
+ }
+ if (providerInstanceParameter == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter providerInstanceParameter is required and cannot be null."));
+ } else {
+ providerInstanceParameter.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .create(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ sapMonitorName,
+ providerInstanceName,
+ providerInstanceParameter,
+ accept,
+ context);
+ }
+
+ /**
+ * Creates a provider instance for the specified subscription, resource group, SapMonitor name, and resource name.
+ *
+ * @param resourceGroupName Name of the resource group.
+ * @param sapMonitorName Name of the SAP monitor resource.
+ * @param providerInstanceName Name of the provider instance.
+ * @param providerInstanceParameter Request body representing a provider instance.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 provider instance associated with a SAP monitor.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PollerFlux, ProviderInstanceInner> beginCreateAsync(
+ String resourceGroupName,
+ String sapMonitorName,
+ String providerInstanceName,
+ ProviderInstanceInner providerInstanceParameter) {
+ Mono>> mono =
+ createWithResponseAsync(resourceGroupName, sapMonitorName, providerInstanceName, providerInstanceParameter);
+ return this
+ .client
+ .getLroResult(
+ mono,
+ this.client.getHttpPipeline(),
+ ProviderInstanceInner.class,
+ ProviderInstanceInner.class,
+ Context.NONE);
+ }
+
+ /**
+ * Creates a provider instance for the specified subscription, resource group, SapMonitor name, and resource name.
+ *
+ * @param resourceGroupName Name of the resource group.
+ * @param sapMonitorName Name of the SAP monitor resource.
+ * @param providerInstanceName Name of the provider instance.
+ * @param providerInstanceParameter Request body representing a provider instance.
+ * @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 provider instance associated with a SAP monitor.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PollerFlux, ProviderInstanceInner> beginCreateAsync(
+ String resourceGroupName,
+ String sapMonitorName,
+ String providerInstanceName,
+ ProviderInstanceInner providerInstanceParameter,
+ Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono =
+ createWithResponseAsync(
+ resourceGroupName, sapMonitorName, providerInstanceName, providerInstanceParameter, context);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), ProviderInstanceInner.class, ProviderInstanceInner.class, context);
+ }
+
+ /**
+ * Creates a provider instance for the specified subscription, resource group, SapMonitor name, and resource name.
+ *
+ * @param resourceGroupName Name of the resource group.
+ * @param sapMonitorName Name of the SAP monitor resource.
+ * @param providerInstanceName Name of the provider instance.
+ * @param providerInstanceParameter Request body representing a provider instance.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 provider instance associated with a SAP monitor.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public SyncPoller, ProviderInstanceInner> beginCreate(
+ String resourceGroupName,
+ String sapMonitorName,
+ String providerInstanceName,
+ ProviderInstanceInner providerInstanceParameter) {
+ return beginCreateAsync(resourceGroupName, sapMonitorName, providerInstanceName, providerInstanceParameter)
+ .getSyncPoller();
+ }
+
+ /**
+ * Creates a provider instance for the specified subscription, resource group, SapMonitor name, and resource name.
+ *
+ * @param resourceGroupName Name of the resource group.
+ * @param sapMonitorName Name of the SAP monitor resource.
+ * @param providerInstanceName Name of the provider instance.
+ * @param providerInstanceParameter Request body representing a provider instance.
+ * @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 provider instance associated with a SAP monitor.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public SyncPoller, ProviderInstanceInner> beginCreate(
+ String resourceGroupName,
+ String sapMonitorName,
+ String providerInstanceName,
+ ProviderInstanceInner providerInstanceParameter,
+ Context context) {
+ return beginCreateAsync(
+ resourceGroupName, sapMonitorName, providerInstanceName, providerInstanceParameter, context)
+ .getSyncPoller();
+ }
+
+ /**
+ * Creates a provider instance for the specified subscription, resource group, SapMonitor name, and resource name.
+ *
+ * @param resourceGroupName Name of the resource group.
+ * @param sapMonitorName Name of the SAP monitor resource.
+ * @param providerInstanceName Name of the provider instance.
+ * @param providerInstanceParameter Request body representing a provider instance.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 provider instance associated with a SAP monitor.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createAsync(
+ String resourceGroupName,
+ String sapMonitorName,
+ String providerInstanceName,
+ ProviderInstanceInner providerInstanceParameter) {
+ return beginCreateAsync(resourceGroupName, sapMonitorName, providerInstanceName, providerInstanceParameter)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Creates a provider instance for the specified subscription, resource group, SapMonitor name, and resource name.
+ *
+ * @param resourceGroupName Name of the resource group.
+ * @param sapMonitorName Name of the SAP monitor resource.
+ * @param providerInstanceName Name of the provider instance.
+ * @param providerInstanceParameter Request body representing a provider instance.
+ * @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 provider instance associated with a SAP monitor.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createAsync(
+ String resourceGroupName,
+ String sapMonitorName,
+ String providerInstanceName,
+ ProviderInstanceInner providerInstanceParameter,
+ Context context) {
+ return beginCreateAsync(
+ resourceGroupName, sapMonitorName, providerInstanceName, providerInstanceParameter, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Creates a provider instance for the specified subscription, resource group, SapMonitor name, and resource name.
+ *
+ * @param resourceGroupName Name of the resource group.
+ * @param sapMonitorName Name of the SAP monitor resource.
+ * @param providerInstanceName Name of the provider instance.
+ * @param providerInstanceParameter Request body representing a provider instance.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 provider instance associated with a SAP monitor.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public ProviderInstanceInner create(
+ String resourceGroupName,
+ String sapMonitorName,
+ String providerInstanceName,
+ ProviderInstanceInner providerInstanceParameter) {
+ return createAsync(resourceGroupName, sapMonitorName, providerInstanceName, providerInstanceParameter).block();
+ }
+
+ /**
+ * Creates a provider instance for the specified subscription, resource group, SapMonitor name, and resource name.
+ *
+ * @param resourceGroupName Name of the resource group.
+ * @param sapMonitorName Name of the SAP monitor resource.
+ * @param providerInstanceName Name of the provider instance.
+ * @param providerInstanceParameter Request body representing a provider instance.
+ * @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 provider instance associated with a SAP monitor.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public ProviderInstanceInner create(
+ String resourceGroupName,
+ String sapMonitorName,
+ String providerInstanceName,
+ ProviderInstanceInner providerInstanceParameter,
+ Context context) {
+ return createAsync(resourceGroupName, sapMonitorName, providerInstanceName, providerInstanceParameter, context)
+ .block();
+ }
+
+ /**
+ * Deletes a provider instance for the specified subscription, resource group, SapMonitor name, and resource name.
+ *
+ * @param resourceGroupName Name of the resource group.
+ * @param sapMonitorName Name of the SAP monitor resource.
+ * @param providerInstanceName Name of the provider instance.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> deleteWithResponseAsync(
+ String resourceGroupName, String sapMonitorName, String providerInstanceName) {
+ 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 (sapMonitorName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter sapMonitorName is required and cannot be null."));
+ }
+ if (providerInstanceName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter providerInstanceName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .delete(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ sapMonitorName,
+ providerInstanceName,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Deletes a provider instance for the specified subscription, resource group, SapMonitor name, and resource name.
+ *
+ * @param resourceGroupName Name of the resource group.
+ * @param sapMonitorName Name of the SAP monitor resource.
+ * @param providerInstanceName Name of the provider instance.
+ * @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 completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> deleteWithResponseAsync(
+ String resourceGroupName, String sapMonitorName, String providerInstanceName, 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 (sapMonitorName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter sapMonitorName is required and cannot be null."));
+ }
+ if (providerInstanceName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter providerInstanceName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .delete(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ sapMonitorName,
+ providerInstanceName,
+ accept,
+ context);
+ }
+
+ /**
+ * Deletes a provider instance for the specified subscription, resource group, SapMonitor name, and resource name.
+ *
+ * @param resourceGroupName Name of the resource group.
+ * @param sapMonitorName Name of the SAP monitor resource.
+ * @param providerInstanceName Name of the provider instance.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PollerFlux, Void> beginDeleteAsync(
+ String resourceGroupName, String sapMonitorName, String providerInstanceName) {
+ Mono>> mono =
+ deleteWithResponseAsync(resourceGroupName, sapMonitorName, providerInstanceName);
+ return this
+ .client
+ .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE);
+ }
+
+ /**
+ * Deletes a provider instance for the specified subscription, resource group, SapMonitor name, and resource name.
+ *
+ * @param resourceGroupName Name of the resource group.
+ * @param sapMonitorName Name of the SAP monitor resource.
+ * @param providerInstanceName Name of the provider instance.
+ * @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 completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PollerFlux, Void> beginDeleteAsync(
+ String resourceGroupName, String sapMonitorName, String providerInstanceName, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono =
+ deleteWithResponseAsync(resourceGroupName, sapMonitorName, providerInstanceName, context);
+ return this
+ .client
+ .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context);
+ }
+
+ /**
+ * Deletes a provider instance for the specified subscription, resource group, SapMonitor name, and resource name.
+ *
+ * @param resourceGroupName Name of the resource group.
+ * @param sapMonitorName Name of the SAP monitor resource.
+ * @param providerInstanceName Name of the provider instance.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public SyncPoller, Void> beginDelete(
+ String resourceGroupName, String sapMonitorName, String providerInstanceName) {
+ return beginDeleteAsync(resourceGroupName, sapMonitorName, providerInstanceName).getSyncPoller();
+ }
+
+ /**
+ * Deletes a provider instance for the specified subscription, resource group, SapMonitor name, and resource name.
+ *
+ * @param resourceGroupName Name of the resource group.
+ * @param sapMonitorName Name of the SAP monitor resource.
+ * @param providerInstanceName Name of the provider instance.
+ * @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 completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public SyncPoller, Void> beginDelete(
+ String resourceGroupName, String sapMonitorName, String providerInstanceName, Context context) {
+ return beginDeleteAsync(resourceGroupName, sapMonitorName, providerInstanceName, context).getSyncPoller();
+ }
+
+ /**
+ * Deletes a provider instance for the specified subscription, resource group, SapMonitor name, and resource name.
+ *
+ * @param resourceGroupName Name of the resource group.
+ * @param sapMonitorName Name of the SAP monitor resource.
+ * @param providerInstanceName Name of the provider instance.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono deleteAsync(String resourceGroupName, String sapMonitorName, String providerInstanceName) {
+ return beginDeleteAsync(resourceGroupName, sapMonitorName, providerInstanceName)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Deletes a provider instance for the specified subscription, resource group, SapMonitor name, and resource name.
+ *
+ * @param resourceGroupName Name of the resource group.
+ * @param sapMonitorName Name of the SAP monitor resource.
+ * @param providerInstanceName Name of the provider instance.
+ * @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 completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono deleteAsync(
+ String resourceGroupName, String sapMonitorName, String providerInstanceName, Context context) {
+ return beginDeleteAsync(resourceGroupName, sapMonitorName, providerInstanceName, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Deletes a provider instance for the specified subscription, resource group, SapMonitor name, and resource name.
+ *
+ * @param resourceGroupName Name of the resource group.
+ * @param sapMonitorName Name of the SAP monitor resource.
+ * @param providerInstanceName Name of the provider instance.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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 sapMonitorName, String providerInstanceName) {
+ deleteAsync(resourceGroupName, sapMonitorName, providerInstanceName).block();
+ }
+
+ /**
+ * Deletes a provider instance for the specified subscription, resource group, SapMonitor name, and resource name.
+ *
+ * @param resourceGroupName Name of the resource group.
+ * @param sapMonitorName Name of the SAP monitor resource.
+ * @param providerInstanceName Name of the provider instance.
+ * @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 sapMonitorName, String providerInstanceName, Context context) {
+ deleteAsync(resourceGroupName, sapMonitorName, providerInstanceName, 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 the response from the List provider instances operation.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listNextSinglePageAsync(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.listNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The 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 the response from the List provider instances operation.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listNextSinglePageAsync(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
+ .listNext(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/hanaonazure/azure-resourcemanager-hanaonazure/src/main/java/com/azure/resourcemanager/hanaonazure/implementation/ProviderInstancesImpl.java b/sdk/hanaonazure/azure-resourcemanager-hanaonazure/src/main/java/com/azure/resourcemanager/hanaonazure/implementation/ProviderInstancesImpl.java
new file mode 100644
index 0000000000000..6008b240c68c0
--- /dev/null
+++ b/sdk/hanaonazure/azure-resourcemanager-hanaonazure/src/main/java/com/azure/resourcemanager/hanaonazure/implementation/ProviderInstancesImpl.java
@@ -0,0 +1,197 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.hanaonazure.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.hanaonazure.fluent.ProviderInstancesClient;
+import com.azure.resourcemanager.hanaonazure.fluent.models.ProviderInstanceInner;
+import com.azure.resourcemanager.hanaonazure.models.ProviderInstance;
+import com.azure.resourcemanager.hanaonazure.models.ProviderInstances;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+
+public final class ProviderInstancesImpl implements ProviderInstances {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(ProviderInstancesImpl.class);
+
+ private final ProviderInstancesClient innerClient;
+
+ private final com.azure.resourcemanager.hanaonazure.HanaManager serviceManager;
+
+ public ProviderInstancesImpl(
+ ProviderInstancesClient innerClient, com.azure.resourcemanager.hanaonazure.HanaManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public PagedIterable list(String resourceGroupName, String sapMonitorName) {
+ PagedIterable inner = this.serviceClient().list(resourceGroupName, sapMonitorName);
+ return Utils.mapPage(inner, inner1 -> new ProviderInstanceImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list(String resourceGroupName, String sapMonitorName, Context context) {
+ PagedIterable inner =
+ this.serviceClient().list(resourceGroupName, sapMonitorName, context);
+ return Utils.mapPage(inner, inner1 -> new ProviderInstanceImpl(inner1, this.manager()));
+ }
+
+ public ProviderInstance get(String resourceGroupName, String sapMonitorName, String providerInstanceName) {
+ ProviderInstanceInner inner = this.serviceClient().get(resourceGroupName, sapMonitorName, providerInstanceName);
+ if (inner != null) {
+ return new ProviderInstanceImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response getWithResponse(
+ String resourceGroupName, String sapMonitorName, String providerInstanceName, Context context) {
+ Response inner =
+ this.serviceClient().getWithResponse(resourceGroupName, sapMonitorName, providerInstanceName, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new ProviderInstanceImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public void delete(String resourceGroupName, String sapMonitorName, String providerInstanceName) {
+ this.serviceClient().delete(resourceGroupName, sapMonitorName, providerInstanceName);
+ }
+
+ public void delete(String resourceGroupName, String sapMonitorName, String providerInstanceName, Context context) {
+ this.serviceClient().delete(resourceGroupName, sapMonitorName, providerInstanceName, context);
+ }
+
+ public ProviderInstance 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 sapMonitorName = Utils.getValueFromIdByName(id, "sapMonitors");
+ if (sapMonitorName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'sapMonitors'.", id)));
+ }
+ String providerInstanceName = Utils.getValueFromIdByName(id, "providerInstances");
+ if (providerInstanceName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format(
+ "The resource ID '%s' is not valid. Missing path segment 'providerInstances'.", id)));
+ }
+ return this.getWithResponse(resourceGroupName, sapMonitorName, providerInstanceName, 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 sapMonitorName = Utils.getValueFromIdByName(id, "sapMonitors");
+ if (sapMonitorName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'sapMonitors'.", id)));
+ }
+ String providerInstanceName = Utils.getValueFromIdByName(id, "providerInstances");
+ if (providerInstanceName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format(
+ "The resource ID '%s' is not valid. Missing path segment 'providerInstances'.", id)));
+ }
+ return this.getWithResponse(resourceGroupName, sapMonitorName, providerInstanceName, 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 sapMonitorName = Utils.getValueFromIdByName(id, "sapMonitors");
+ if (sapMonitorName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'sapMonitors'.", id)));
+ }
+ String providerInstanceName = Utils.getValueFromIdByName(id, "providerInstances");
+ if (providerInstanceName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format(
+ "The resource ID '%s' is not valid. Missing path segment 'providerInstances'.", id)));
+ }
+ this.delete(resourceGroupName, sapMonitorName, providerInstanceName, 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 sapMonitorName = Utils.getValueFromIdByName(id, "sapMonitors");
+ if (sapMonitorName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'sapMonitors'.", id)));
+ }
+ String providerInstanceName = Utils.getValueFromIdByName(id, "providerInstances");
+ if (providerInstanceName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format(
+ "The resource ID '%s' is not valid. Missing path segment 'providerInstances'.", id)));
+ }
+ this.delete(resourceGroupName, sapMonitorName, providerInstanceName, context);
+ }
+
+ private ProviderInstancesClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.hanaonazure.HanaManager manager() {
+ return this.serviceManager;
+ }
+
+ public ProviderInstanceImpl define(String name) {
+ return new ProviderInstanceImpl(name, this.manager());
+ }
+}
diff --git a/sdk/hanaonazure/azure-resourcemanager-hanaonazure/src/main/java/com/azure/resourcemanager/hanaonazure/implementation/SapMonitorImpl.java b/sdk/hanaonazure/azure-resourcemanager-hanaonazure/src/main/java/com/azure/resourcemanager/hanaonazure/implementation/SapMonitorImpl.java
new file mode 100644
index 0000000000000..eaf546df3f4af
--- /dev/null
+++ b/sdk/hanaonazure/azure-resourcemanager-hanaonazure/src/main/java/com/azure/resourcemanager/hanaonazure/implementation/SapMonitorImpl.java
@@ -0,0 +1,229 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.hanaonazure.implementation;
+
+import com.azure.core.management.Region;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.hanaonazure.fluent.models.SapMonitorInner;
+import com.azure.resourcemanager.hanaonazure.models.HanaProvisioningStatesEnum;
+import com.azure.resourcemanager.hanaonazure.models.SapMonitor;
+import com.azure.resourcemanager.hanaonazure.models.Tags;
+import java.util.Collections;
+import java.util.Map;
+
+public final class SapMonitorImpl implements SapMonitor, SapMonitor.Definition, SapMonitor.Update {
+ private SapMonitorInner innerObject;
+
+ private final com.azure.resourcemanager.hanaonazure.HanaManager serviceManager;
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
+ public String location() {
+ return this.innerModel().location();
+ }
+
+ public Map tags() {
+ Map inner = this.innerModel().tags();
+ if (inner != null) {
+ return Collections.unmodifiableMap(inner);
+ } else {
+ return Collections.emptyMap();
+ }
+ }
+
+ public HanaProvisioningStatesEnum provisioningState() {
+ return this.innerModel().provisioningState();
+ }
+
+ public String managedResourceGroupName() {
+ return this.innerModel().managedResourceGroupName();
+ }
+
+ public String logAnalyticsWorkspaceArmId() {
+ return this.innerModel().logAnalyticsWorkspaceArmId();
+ }
+
+ public Boolean enableCustomerAnalytics() {
+ return this.innerModel().enableCustomerAnalytics();
+ }
+
+ public String logAnalyticsWorkspaceId() {
+ return this.innerModel().logAnalyticsWorkspaceId();
+ }
+
+ public String logAnalyticsWorkspaceSharedKey() {
+ return this.innerModel().logAnalyticsWorkspaceSharedKey();
+ }
+
+ public String sapMonitorCollectorVersion() {
+ return this.innerModel().sapMonitorCollectorVersion();
+ }
+
+ public String monitorSubnet() {
+ return this.innerModel().monitorSubnet();
+ }
+
+ public Region region() {
+ return Region.fromName(this.regionName());
+ }
+
+ public String regionName() {
+ return this.location();
+ }
+
+ public SapMonitorInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.hanaonazure.HanaManager manager() {
+ return this.serviceManager;
+ }
+
+ private String resourceGroupName;
+
+ private String sapMonitorName;
+
+ private Tags updateTagsParameter;
+
+ public SapMonitorImpl withExistingResourceGroup(String resourceGroupName) {
+ this.resourceGroupName = resourceGroupName;
+ return this;
+ }
+
+ public SapMonitor create() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getSapMonitors()
+ .create(resourceGroupName, sapMonitorName, this.innerModel(), Context.NONE);
+ return this;
+ }
+
+ public SapMonitor create(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getSapMonitors()
+ .create(resourceGroupName, sapMonitorName, this.innerModel(), context);
+ return this;
+ }
+
+ SapMonitorImpl(String name, com.azure.resourcemanager.hanaonazure.HanaManager serviceManager) {
+ this.innerObject = new SapMonitorInner();
+ this.serviceManager = serviceManager;
+ this.sapMonitorName = name;
+ }
+
+ public SapMonitorImpl update() {
+ this.updateTagsParameter = new Tags();
+ return this;
+ }
+
+ public SapMonitor apply() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getSapMonitors()
+ .updateWithResponse(resourceGroupName, sapMonitorName, updateTagsParameter, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public SapMonitor apply(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getSapMonitors()
+ .updateWithResponse(resourceGroupName, sapMonitorName, updateTagsParameter, context)
+ .getValue();
+ return this;
+ }
+
+ SapMonitorImpl(SapMonitorInner innerObject, com.azure.resourcemanager.hanaonazure.HanaManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups");
+ this.sapMonitorName = Utils.getValueFromIdByName(innerObject.id(), "sapMonitors");
+ }
+
+ public SapMonitor refresh() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getSapMonitors()
+ .getByResourceGroupWithResponse(resourceGroupName, sapMonitorName, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public SapMonitor refresh(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getSapMonitors()
+ .getByResourceGroupWithResponse(resourceGroupName, sapMonitorName, context)
+ .getValue();
+ return this;
+ }
+
+ public SapMonitorImpl withRegion(Region location) {
+ this.innerModel().withLocation(location.toString());
+ return this;
+ }
+
+ public SapMonitorImpl withRegion(String location) {
+ this.innerModel().withLocation(location);
+ return this;
+ }
+
+ public SapMonitorImpl withTags(Map tags) {
+ if (isInCreateMode()) {
+ this.innerModel().withTags(tags);
+ return this;
+ } else {
+ this.updateTagsParameter.withTags(tags);
+ return this;
+ }
+ }
+
+ public SapMonitorImpl withLogAnalyticsWorkspaceArmId(String logAnalyticsWorkspaceArmId) {
+ this.innerModel().withLogAnalyticsWorkspaceArmId(logAnalyticsWorkspaceArmId);
+ return this;
+ }
+
+ public SapMonitorImpl withEnableCustomerAnalytics(Boolean enableCustomerAnalytics) {
+ this.innerModel().withEnableCustomerAnalytics(enableCustomerAnalytics);
+ return this;
+ }
+
+ public SapMonitorImpl withLogAnalyticsWorkspaceId(String logAnalyticsWorkspaceId) {
+ this.innerModel().withLogAnalyticsWorkspaceId(logAnalyticsWorkspaceId);
+ return this;
+ }
+
+ public SapMonitorImpl withLogAnalyticsWorkspaceSharedKey(String logAnalyticsWorkspaceSharedKey) {
+ this.innerModel().withLogAnalyticsWorkspaceSharedKey(logAnalyticsWorkspaceSharedKey);
+ return this;
+ }
+
+ public SapMonitorImpl withMonitorSubnet(String monitorSubnet) {
+ this.innerModel().withMonitorSubnet(monitorSubnet);
+ return this;
+ }
+
+ private boolean isInCreateMode() {
+ return this.innerModel().id() == null;
+ }
+}
diff --git a/sdk/hanaonazure/azure-resourcemanager-hanaonazure/src/main/java/com/azure/resourcemanager/hanaonazure/implementation/SapMonitorsClientImpl.java b/sdk/hanaonazure/azure-resourcemanager-hanaonazure/src/main/java/com/azure/resourcemanager/hanaonazure/implementation/SapMonitorsClientImpl.java
new file mode 100644
index 0000000000000..b5827fdb04c91
--- /dev/null
+++ b/sdk/hanaonazure/azure-resourcemanager-hanaonazure/src/main/java/com/azure/resourcemanager/hanaonazure/implementation/SapMonitorsClientImpl.java
@@ -0,0 +1,1180 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.hanaonazure.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.logging.ClientLogger;
+import com.azure.core.util.polling.PollerFlux;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.hanaonazure.fluent.SapMonitorsClient;
+import com.azure.resourcemanager.hanaonazure.fluent.models.SapMonitorInner;
+import com.azure.resourcemanager.hanaonazure.models.SapMonitorListResult;
+import com.azure.resourcemanager.hanaonazure.models.Tags;
+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 SapMonitorsClient. */
+public final class SapMonitorsClientImpl implements SapMonitorsClient {
+ private final ClientLogger logger = new ClientLogger(SapMonitorsClientImpl.class);
+
+ /** The proxy service used to perform REST calls. */
+ private final SapMonitorsService service;
+
+ /** The service client containing this operation class. */
+ private final HanaManagementClientImpl client;
+
+ /**
+ * Initializes an instance of SapMonitorsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ SapMonitorsClientImpl(HanaManagementClientImpl client) {
+ this.service =
+ RestProxy.create(SapMonitorsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for HanaManagementClientSapMonitors to be used by the proxy service to
+ * perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "HanaManagementClient")
+ private interface SapMonitorsService {
+ @Headers({"Content-Type: application/json"})
+ @Get("/subscriptions/{subscriptionId}/providers/Microsoft.HanaOnAzure/sapMonitors")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> list(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HanaOnAzure"
+ + "/sapMonitors/{sapMonitorName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> getByResourceGroup(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("sapMonitorName") String sapMonitorName,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Put(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HanaOnAzure"
+ + "/sapMonitors/{sapMonitorName}")
+ @ExpectedResponses({200, 201})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> create(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("sapMonitorName") String sapMonitorName,
+ @BodyParam("application/json") SapMonitorInner sapMonitorParameter,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Delete(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HanaOnAzure"
+ + "/sapMonitors/{sapMonitorName}")
+ @ExpectedResponses({200, 202, 204})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> delete(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("sapMonitorName") String sapMonitorName,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Patch(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HanaOnAzure"
+ + "/sapMonitors/{sapMonitorName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> update(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("sapMonitorName") String sapMonitorName,
+ @BodyParam("application/json") Tags tagsParameter,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("{nextLink}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * Gets a list of SAP monitors in the specified subscription. The operations returns various properties of each SAP
+ * monitor.
+ *
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of SAP monitors in the specified subscription.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync() {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .list(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ accept,
+ context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Gets a list of SAP monitors in the specified subscription. The operations returns various properties of each SAP
+ * monitor.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of SAP monitors in the specified subscription.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .list(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ accept,
+ context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * Gets a list of SAP monitors in the specified subscription. The operations returns various properties of each SAP
+ * monitor.
+ *
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of SAP monitors in the specified subscription.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync() {
+ return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Gets a list of SAP monitors in the specified subscription. The operations returns various properties of each SAP
+ * monitor.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of SAP monitors in the specified subscription.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(Context context) {
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(context), nextLink -> listNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * Gets a list of SAP monitors in the specified subscription. The operations returns various properties of each SAP
+ * monitor.
+ *
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of SAP monitors in the specified subscription.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list() {
+ return new PagedIterable<>(listAsync());
+ }
+
+ /**
+ * Gets a list of SAP monitors in the specified subscription. The operations returns various properties of each SAP
+ * monitor.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of SAP monitors in the specified subscription.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(Context context) {
+ return new PagedIterable<>(listAsync(context));
+ }
+
+ /**
+ * Gets properties of a SAP monitor for the specified subscription, resource group, and resource name.
+ *
+ * @param resourceGroupName Name of the resource group.
+ * @param sapMonitorName Name of the SAP monitor resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return properties of a SAP monitor for the specified subscription, resource group, and resource name.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getByResourceGroupWithResponseAsync(
+ String resourceGroupName, String sapMonitorName) {
+ 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 (sapMonitorName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter sapMonitorName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .getByResourceGroup(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ sapMonitorName,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Gets properties of a SAP monitor for the specified subscription, resource group, and resource name.
+ *
+ * @param resourceGroupName Name of the resource group.
+ * @param sapMonitorName Name of the SAP monitor resource.
+ * @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 properties of a SAP monitor for the specified subscription, resource group, and resource name.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getByResourceGroupWithResponseAsync(
+ String resourceGroupName, String sapMonitorName, 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 (sapMonitorName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter sapMonitorName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .getByResourceGroup(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ sapMonitorName,
+ accept,
+ context);
+ }
+
+ /**
+ * Gets properties of a SAP monitor for the specified subscription, resource group, and resource name.
+ *
+ * @param resourceGroupName Name of the resource group.
+ * @param sapMonitorName Name of the SAP monitor resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return properties of a SAP monitor for the specified subscription, resource group, and resource name.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getByResourceGroupAsync(String resourceGroupName, String sapMonitorName) {
+ return getByResourceGroupWithResponseAsync(resourceGroupName, sapMonitorName)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * Gets properties of a SAP monitor for the specified subscription, resource group, and resource name.
+ *
+ * @param resourceGroupName Name of the resource group.
+ * @param sapMonitorName Name of the SAP monitor resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return properties of a SAP monitor for the specified subscription, resource group, and resource name.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public SapMonitorInner getByResourceGroup(String resourceGroupName, String sapMonitorName) {
+ return getByResourceGroupAsync(resourceGroupName, sapMonitorName).block();
+ }
+
+ /**
+ * Gets properties of a SAP monitor for the specified subscription, resource group, and resource name.
+ *
+ * @param resourceGroupName Name of the resource group.
+ * @param sapMonitorName Name of the SAP monitor resource.
+ * @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 properties of a SAP monitor for the specified subscription, resource group, and resource name.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getByResourceGroupWithResponse(
+ String resourceGroupName, String sapMonitorName, Context context) {
+ return getByResourceGroupWithResponseAsync(resourceGroupName, sapMonitorName, context).block();
+ }
+
+ /**
+ * Creates a SAP monitor for the specified subscription, resource group, and resource name.
+ *
+ * @param resourceGroupName Name of the resource group.
+ * @param sapMonitorName Name of the SAP monitor resource.
+ * @param sapMonitorParameter Request body representing a SAP Monitor.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return sAP monitor info on Azure (ARM properties and SAP monitor properties).
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createWithResponseAsync(
+ String resourceGroupName, String sapMonitorName, SapMonitorInner sapMonitorParameter) {
+ 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 (sapMonitorName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter sapMonitorName is required and cannot be null."));
+ }
+ if (sapMonitorParameter == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter sapMonitorParameter is required and cannot be null."));
+ } else {
+ sapMonitorParameter.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .create(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ sapMonitorName,
+ sapMonitorParameter,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Creates a SAP monitor for the specified subscription, resource group, and resource name.
+ *
+ * @param resourceGroupName Name of the resource group.
+ * @param sapMonitorName Name of the SAP monitor resource.
+ * @param sapMonitorParameter Request body representing a SAP Monitor.
+ * @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 sAP monitor info on Azure (ARM properties and SAP monitor properties).
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createWithResponseAsync(
+ String resourceGroupName, String sapMonitorName, SapMonitorInner sapMonitorParameter, 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 (sapMonitorName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter sapMonitorName is required and cannot be null."));
+ }
+ if (sapMonitorParameter == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter sapMonitorParameter is required and cannot be null."));
+ } else {
+ sapMonitorParameter.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .create(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ sapMonitorName,
+ sapMonitorParameter,
+ accept,
+ context);
+ }
+
+ /**
+ * Creates a SAP monitor for the specified subscription, resource group, and resource name.
+ *
+ * @param resourceGroupName Name of the resource group.
+ * @param sapMonitorName Name of the SAP monitor resource.
+ * @param sapMonitorParameter Request body representing a SAP Monitor.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return sAP monitor info on Azure (ARM properties and SAP monitor properties).
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PollerFlux, SapMonitorInner> beginCreateAsync(
+ String resourceGroupName, String sapMonitorName, SapMonitorInner sapMonitorParameter) {
+ Mono>> mono =
+ createWithResponseAsync(resourceGroupName, sapMonitorName, sapMonitorParameter);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), SapMonitorInner.class, SapMonitorInner.class, Context.NONE);
+ }
+
+ /**
+ * Creates a SAP monitor for the specified subscription, resource group, and resource name.
+ *
+ * @param resourceGroupName Name of the resource group.
+ * @param sapMonitorName Name of the SAP monitor resource.
+ * @param sapMonitorParameter Request body representing a SAP Monitor.
+ * @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 sAP monitor info on Azure (ARM properties and SAP monitor properties).
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PollerFlux, SapMonitorInner> beginCreateAsync(
+ String resourceGroupName, String sapMonitorName, SapMonitorInner sapMonitorParameter, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono =
+ createWithResponseAsync(resourceGroupName, sapMonitorName, sapMonitorParameter, context);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), SapMonitorInner.class, SapMonitorInner.class, context);
+ }
+
+ /**
+ * Creates a SAP monitor for the specified subscription, resource group, and resource name.
+ *
+ * @param resourceGroupName Name of the resource group.
+ * @param sapMonitorName Name of the SAP monitor resource.
+ * @param sapMonitorParameter Request body representing a SAP Monitor.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return sAP monitor info on Azure (ARM properties and SAP monitor properties).
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public SyncPoller, SapMonitorInner> beginCreate(
+ String resourceGroupName, String sapMonitorName, SapMonitorInner sapMonitorParameter) {
+ return beginCreateAsync(resourceGroupName, sapMonitorName, sapMonitorParameter).getSyncPoller();
+ }
+
+ /**
+ * Creates a SAP monitor for the specified subscription, resource group, and resource name.
+ *
+ * @param resourceGroupName Name of the resource group.
+ * @param sapMonitorName Name of the SAP monitor resource.
+ * @param sapMonitorParameter Request body representing a SAP Monitor.
+ * @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 sAP monitor info on Azure (ARM properties and SAP monitor properties).
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public SyncPoller, SapMonitorInner> beginCreate(
+ String resourceGroupName, String sapMonitorName, SapMonitorInner sapMonitorParameter, Context context) {
+ return beginCreateAsync(resourceGroupName, sapMonitorName, sapMonitorParameter, context).getSyncPoller();
+ }
+
+ /**
+ * Creates a SAP monitor for the specified subscription, resource group, and resource name.
+ *
+ * @param resourceGroupName Name of the resource group.
+ * @param sapMonitorName Name of the SAP monitor resource.
+ * @param sapMonitorParameter Request body representing a SAP Monitor.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return sAP monitor info on Azure (ARM properties and SAP monitor properties).
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createAsync(
+ String resourceGroupName, String sapMonitorName, SapMonitorInner sapMonitorParameter) {
+ return beginCreateAsync(resourceGroupName, sapMonitorName, sapMonitorParameter)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Creates a SAP monitor for the specified subscription, resource group, and resource name.
+ *
+ * @param resourceGroupName Name of the resource group.
+ * @param sapMonitorName Name of the SAP monitor resource.
+ * @param sapMonitorParameter Request body representing a SAP Monitor.
+ * @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 sAP monitor info on Azure (ARM properties and SAP monitor properties).
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createAsync(
+ String resourceGroupName, String sapMonitorName, SapMonitorInner sapMonitorParameter, Context context) {
+ return beginCreateAsync(resourceGroupName, sapMonitorName, sapMonitorParameter, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Creates a SAP monitor for the specified subscription, resource group, and resource name.
+ *
+ * @param resourceGroupName Name of the resource group.
+ * @param sapMonitorName Name of the SAP monitor resource.
+ * @param sapMonitorParameter Request body representing a SAP Monitor.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return sAP monitor info on Azure (ARM properties and SAP monitor properties).
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public SapMonitorInner create(
+ String resourceGroupName, String sapMonitorName, SapMonitorInner sapMonitorParameter) {
+ return createAsync(resourceGroupName, sapMonitorName, sapMonitorParameter).block();
+ }
+
+ /**
+ * Creates a SAP monitor for the specified subscription, resource group, and resource name.
+ *
+ * @param resourceGroupName Name of the resource group.
+ * @param sapMonitorName Name of the SAP monitor resource.
+ * @param sapMonitorParameter Request body representing a SAP Monitor.
+ * @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 sAP monitor info on Azure (ARM properties and SAP monitor properties).
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public SapMonitorInner create(
+ String resourceGroupName, String sapMonitorName, SapMonitorInner sapMonitorParameter, Context context) {
+ return createAsync(resourceGroupName, sapMonitorName, sapMonitorParameter, context).block();
+ }
+
+ /**
+ * Deletes a SAP monitor with the specified subscription, resource group, and monitor name.
+ *
+ * @param resourceGroupName Name of the resource group.
+ * @param sapMonitorName Name of the SAP monitor resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> deleteWithResponseAsync(String resourceGroupName, String sapMonitorName) {
+ 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 (sapMonitorName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter sapMonitorName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .delete(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ sapMonitorName,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Deletes a SAP monitor with the specified subscription, resource group, and monitor name.
+ *
+ * @param resourceGroupName Name of the resource group.
+ * @param sapMonitorName Name of the SAP monitor resource.
+ * @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 completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> deleteWithResponseAsync(
+ String resourceGroupName, String sapMonitorName, 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 (sapMonitorName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter sapMonitorName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .delete(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ sapMonitorName,
+ accept,
+ context);
+ }
+
+ /**
+ * Deletes a SAP monitor with the specified subscription, resource group, and monitor name.
+ *
+ * @param resourceGroupName Name of the resource group.
+ * @param sapMonitorName Name of the SAP monitor resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String sapMonitorName) {
+ Mono>> mono = deleteWithResponseAsync(resourceGroupName, sapMonitorName);
+ return this
+ .client
+ .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE);
+ }
+
+ /**
+ * Deletes a SAP monitor with the specified subscription, resource group, and monitor name.
+ *
+ * @param resourceGroupName Name of the resource group.
+ * @param sapMonitorName Name of the SAP monitor resource.
+ * @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 completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PollerFlux, Void> beginDeleteAsync(
+ String resourceGroupName, String sapMonitorName, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono = deleteWithResponseAsync(resourceGroupName, sapMonitorName, context);
+ return this
+ .client
+ .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context);
+ }
+
+ /**
+ * Deletes a SAP monitor with the specified subscription, resource group, and monitor name.
+ *
+ * @param resourceGroupName Name of the resource group.
+ * @param sapMonitorName Name of the SAP monitor resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public SyncPoller, Void> beginDelete(String resourceGroupName, String sapMonitorName) {
+ return beginDeleteAsync(resourceGroupName, sapMonitorName).getSyncPoller();
+ }
+
+ /**
+ * Deletes a SAP monitor with the specified subscription, resource group, and monitor name.
+ *
+ * @param resourceGroupName Name of the resource group.
+ * @param sapMonitorName Name of the SAP monitor resource.
+ * @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 completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public SyncPoller, Void> beginDelete(
+ String resourceGroupName, String sapMonitorName, Context context) {
+ return beginDeleteAsync(resourceGroupName, sapMonitorName, context).getSyncPoller();
+ }
+
+ /**
+ * Deletes a SAP monitor with the specified subscription, resource group, and monitor name.
+ *
+ * @param resourceGroupName Name of the resource group.
+ * @param sapMonitorName Name of the SAP monitor resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono deleteAsync(String resourceGroupName, String sapMonitorName) {
+ return beginDeleteAsync(resourceGroupName, sapMonitorName)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Deletes a SAP monitor with the specified subscription, resource group, and monitor name.
+ *
+ * @param resourceGroupName Name of the resource group.
+ * @param sapMonitorName Name of the SAP monitor resource.
+ * @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 completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono deleteAsync(String resourceGroupName, String sapMonitorName, Context context) {
+ return beginDeleteAsync(resourceGroupName, sapMonitorName, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Deletes a SAP monitor with the specified subscription, resource group, and monitor name.
+ *
+ * @param resourceGroupName Name of the resource group.
+ * @param sapMonitorName Name of the SAP monitor resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void delete(String resourceGroupName, String sapMonitorName) {
+ deleteAsync(resourceGroupName, sapMonitorName).block();
+ }
+
+ /**
+ * Deletes a SAP monitor with the specified subscription, resource group, and monitor name.
+ *
+ * @param resourceGroupName Name of the resource group.
+ * @param sapMonitorName Name of the SAP monitor resource.
+ * @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 sapMonitorName, Context context) {
+ deleteAsync(resourceGroupName, sapMonitorName, context).block();
+ }
+
+ /**
+ * Patches the Tags field of a SAP monitor for the specified subscription, resource group, and monitor name.
+ *
+ * @param resourceGroupName Name of the resource group.
+ * @param sapMonitorName Name of the SAP monitor resource.
+ * @param tagsParameter Request body that only contains the new Tags field.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return sAP monitor info on Azure (ARM properties and SAP monitor properties).
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> updateWithResponseAsync(
+ String resourceGroupName, String sapMonitorName, Tags tagsParameter) {
+ 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 (sapMonitorName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter sapMonitorName is required and cannot be null."));
+ }
+ if (tagsParameter == null) {
+ return Mono.error(new IllegalArgumentException("Parameter tagsParameter is required and cannot be null."));
+ } else {
+ tagsParameter.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .update(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ sapMonitorName,
+ tagsParameter,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Patches the Tags field of a SAP monitor for the specified subscription, resource group, and monitor name.
+ *
+ * @param resourceGroupName Name of the resource group.
+ * @param sapMonitorName Name of the SAP monitor resource.
+ * @param tagsParameter Request body that only contains the new Tags field.
+ * @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 sAP monitor info on Azure (ARM properties and SAP monitor properties).
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> updateWithResponseAsync(
+ String resourceGroupName, String sapMonitorName, Tags tagsParameter, 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 (sapMonitorName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter sapMonitorName is required and cannot be null."));
+ }
+ if (tagsParameter == null) {
+ return Mono.error(new IllegalArgumentException("Parameter tagsParameter is required and cannot be null."));
+ } else {
+ tagsParameter.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .update(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ sapMonitorName,
+ tagsParameter,
+ accept,
+ context);
+ }
+
+ /**
+ * Patches the Tags field of a SAP monitor for the specified subscription, resource group, and monitor name.
+ *
+ * @param resourceGroupName Name of the resource group.
+ * @param sapMonitorName Name of the SAP monitor resource.
+ * @param tagsParameter Request body that only contains the new Tags field.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return sAP monitor info on Azure (ARM properties and SAP monitor properties).
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono updateAsync(String resourceGroupName, String sapMonitorName, Tags tagsParameter) {
+ return updateWithResponseAsync(resourceGroupName, sapMonitorName, tagsParameter)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * Patches the Tags field of a SAP monitor for the specified subscription, resource group, and monitor name.
+ *
+ * @param resourceGroupName Name of the resource group.
+ * @param sapMonitorName Name of the SAP monitor resource.
+ * @param tagsParameter Request body that only contains the new Tags field.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return sAP monitor info on Azure (ARM properties and SAP monitor properties).
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public SapMonitorInner update(String resourceGroupName, String sapMonitorName, Tags tagsParameter) {
+ return updateAsync(resourceGroupName, sapMonitorName, tagsParameter).block();
+ }
+
+ /**
+ * Patches the Tags field of a SAP monitor for the specified subscription, resource group, and monitor name.
+ *
+ * @param resourceGroupName Name of the resource group.
+ * @param sapMonitorName Name of the SAP monitor resource.
+ * @param tagsParameter Request body that only contains the new Tags field.
+ * @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 sAP monitor info on Azure (ARM properties and SAP monitor properties).
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response updateWithResponse(
+ String resourceGroupName, String sapMonitorName, Tags tagsParameter, Context context) {
+ return updateWithResponseAsync(resourceGroupName, sapMonitorName, tagsParameter, 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 the response from the List SAP monitors operation.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listNextSinglePageAsync(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.listNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The 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 the response from the List SAP monitors operation.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listNextSinglePageAsync(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
+ .listNext(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/hanaonazure/azure-resourcemanager-hanaonazure/src/main/java/com/azure/resourcemanager/hanaonazure/implementation/SapMonitorsImpl.java b/sdk/hanaonazure/azure-resourcemanager-hanaonazure/src/main/java/com/azure/resourcemanager/hanaonazure/implementation/SapMonitorsImpl.java
new file mode 100644
index 0000000000000..0dd4e25003e82
--- /dev/null
+++ b/sdk/hanaonazure/azure-resourcemanager-hanaonazure/src/main/java/com/azure/resourcemanager/hanaonazure/implementation/SapMonitorsImpl.java
@@ -0,0 +1,160 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.hanaonazure.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.hanaonazure.fluent.SapMonitorsClient;
+import com.azure.resourcemanager.hanaonazure.fluent.models.SapMonitorInner;
+import com.azure.resourcemanager.hanaonazure.models.SapMonitor;
+import com.azure.resourcemanager.hanaonazure.models.SapMonitors;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+
+public final class SapMonitorsImpl implements SapMonitors {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(SapMonitorsImpl.class);
+
+ private final SapMonitorsClient innerClient;
+
+ private final com.azure.resourcemanager.hanaonazure.HanaManager serviceManager;
+
+ public SapMonitorsImpl(
+ SapMonitorsClient innerClient, com.azure.resourcemanager.hanaonazure.HanaManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public PagedIterable