diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt
index 8fd37cf545ed..edc0985192f7 100644
--- a/eng/versioning/version_client.txt
+++ b/eng/versioning/version_client.txt
@@ -300,6 +300,7 @@ com.azure.resourcemanager:azure-resourcemanager-maps;1.0.0-beta.1;1.0.0-beta.2
com.azure.resourcemanager:azure-resourcemanager-botservice;1.0.0-beta.1;1.0.0-beta.2
com.azure.resourcemanager:azure-resourcemanager-recoveryservicesbackup;1.0.0-beta.1;1.0.0-beta.2
com.azure.resourcemanager:azure-resourcemanager-deviceprovisioningservices;1.0.0;1.1.0-beta.1
+com.azure.resourcemanager:azure-resourcemanager-workloadmonitor;1.0.0-beta.1;1.0.0-beta.1
# Unreleased dependencies: Copy the entry from above, prepend "unreleased_" and remove the current
# version. Unreleased dependencies are only valid for dependency versions.
diff --git a/pom.xml b/pom.xml
index 8a459dd59a62..b01f8176565c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -707,6 +707,7 @@
eng/code-quality-reportseng/jacoco-test-coveragesdk/advisor
+ sdk/agrifoodsdk/anomalydetectorsdk/apimanagementsdk/appconfiguration
@@ -751,7 +752,6 @@
sdk/digitaltwinssdk/eventgridsdk/eventhubs
- sdk/agrifoodsdk/formrecognizersdk/frontdoorsdk/hanaonazure
@@ -822,6 +822,7 @@
sdk/videoanalyzersdk/vmwarecloudsimplesdk/webpubsub
+ sdk/workloadmonitor
diff --git a/sdk/workloadmonitor/azure-resourcemanager-workloadmonitor/CHANGELOG.md b/sdk/workloadmonitor/azure-resourcemanager-workloadmonitor/CHANGELOG.md
new file mode 100644
index 000000000000..56229f0b5c41
--- /dev/null
+++ b/sdk/workloadmonitor/azure-resourcemanager-workloadmonitor/CHANGELOG.md
@@ -0,0 +1,5 @@
+# Release History
+
+## 1.0.0-beta.1 (2021-06-28)
+
+- Azure Resource Manager WorkloadMonitor client library for Java. This package contains Microsoft Azure SDK for WorkloadMonitor Management SDK. Workload Monitor API. Package tag package-2020-01-13-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
diff --git a/sdk/workloadmonitor/azure-resourcemanager-workloadmonitor/README.md b/sdk/workloadmonitor/azure-resourcemanager-workloadmonitor/README.md
new file mode 100644
index 000000000000..d09ddcda9aed
--- /dev/null
+++ b/sdk/workloadmonitor/azure-resourcemanager-workloadmonitor/README.md
@@ -0,0 +1,101 @@
+# Azure Resource Manager WorkloadMonitor client library for Java
+
+Azure Resource Manager WorkloadMonitor client library for Java.
+
+This package contains Microsoft Azure SDK for WorkloadMonitor Management SDK. Workload Monitor API. Package tag package-2020-01-13-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
+
+We're always working on improving our products and the way we communicate with our users. So we'd love to learn what's working and how we can do better.
+
+If you haven't already, please take a few minutes to [complete this short survey][survey] we have put together.
+
+Thank you in advance for your collaboration. We really appreciate your time!
+
+## Documentation
+
+Various documentation is available to help you get started
+
+- [API reference documentation][docs]
+
+## Getting started
+
+### Prerequisites
+
+- [Java Development Kit (JDK)][jdk] with version 8 or above
+- [Azure Subscription][azure_subscription]
+
+### Adding the package to your product
+
+[//]: # ({x-version-update-start;com.azure.resourcemanager:azure-resourcemanager-workloadmonitor;current})
+```xml
+
+ com.azure.resourcemanager
+ azure-resourcemanager-workloadmonitor
+ 1.0.0-beta.1
+
+```
+[//]: # ({x-version-update-end})
+
+### Include the recommended packages
+
+Azure Management Libraries require a `TokenCredential` implementation for authentication and an `HttpClient` implementation for HTTP client.
+
+[Azure Identity][azure_identity] package and [Azure Core Netty HTTP][azure_core_http_netty] package provide the default implementation.
+
+### Authentication
+
+By default, Azure Active Directory token authentication depends on correct configure of following environment variables.
+
+- `AZURE_CLIENT_ID` for Azure client ID.
+- `AZURE_TENANT_ID` for Azure tenant ID.
+- `AZURE_CLIENT_SECRET` or `AZURE_CLIENT_CERTIFICATE_PATH` for client secret or client certificate.
+
+In addition, Azure subscription ID can be configured via environment variable `AZURE_SUBSCRIPTION_ID`.
+
+With above configuration, `azure` client can be authenticated by following code:
+
+```java
+AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE);
+TokenCredential credential = new DefaultAzureCredentialBuilder()
+ .authorityHost(profile.getEnvironment().getActiveDirectoryEndpoint())
+ .build();
+WorkloadMonitorManager manager = WorkloadMonitorManager
+ .authenticate(credential, profile);
+```
+
+The sample code assumes global Azure. Please change `AzureEnvironment.AZURE` variable if otherwise.
+
+See [Authentication][authenticate] for more options.
+
+## Key concepts
+
+See [API design][design] for general introduction on design and key concepts on Azure Management Libraries.
+
+## Examples
+
+
+
+## Troubleshooting
+
+## Next steps
+
+## Contributing
+
+For details on contributing to this repository, see the [contributing guide](https://github.com/Azure/azure-sdk-for-java/blob/master/CONTRIBUTING.md).
+
+1. Fork it
+1. Create your feature branch (`git checkout -b my-new-feature`)
+1. Commit your changes (`git commit -am 'Add some feature'`)
+1. Push to the branch (`git push origin my-new-feature`)
+1. Create new Pull Request
+
+
+[survey]: https://microsoft.qualtrics.com/jfe/form/SV_ehN0lIk2FKEBkwd?Q_CHL=DOCS
+[docs]: https://azure.github.io/azure-sdk-for-java/
+[jdk]: https://docs.microsoft.com/java/azure/jdk/
+[azure_subscription]: https://azure.microsoft.com/free/
+[azure_identity]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/identity/azure-identity
+[azure_core_http_netty]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/core/azure-core-http-netty
+[authenticate]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/resourcemanager/docs/AUTH.md
+[design]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/resourcemanager/docs/DESIGN.md
diff --git a/sdk/workloadmonitor/azure-resourcemanager-workloadmonitor/pom.xml b/sdk/workloadmonitor/azure-resourcemanager-workloadmonitor/pom.xml
new file mode 100644
index 000000000000..8ff8f78b6ec6
--- /dev/null
+++ b/sdk/workloadmonitor/azure-resourcemanager-workloadmonitor/pom.xml
@@ -0,0 +1,86 @@
+
+ 4.0.0
+
+ com.azure
+ azure-client-sdk-parent
+ 1.7.0
+ ../../parents/azure-client-sdk-parent
+
+
+ com.azure.resourcemanager
+ azure-resourcemanager-workloadmonitor
+ 1.0.0-beta.1
+ jar
+
+ Microsoft Azure SDK for WorkloadMonitor Management
+ This package contains Microsoft Azure SDK for WorkloadMonitor Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Workload Monitor API. Package tag package-2020-01-13-preview.
+ https://github.com/Azure/azure-sdk-for-java
+
+
+
+ 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
+
+
+
+ org.revapi
+ revapi-maven-plugin
+ 0.11.2
+
+
+
+
+ java.method.addedToInterface
+
+
+ true
+ .*
+ com\.azure\.resourcemanager(\.[^.]+)+\.fluent(\.[^.]+)*
+
+
+
+
+
+
+
+
diff --git a/sdk/workloadmonitor/azure-resourcemanager-workloadmonitor/src/main/java/com/azure/resourcemanager/workloadmonitor/WorkloadMonitorManager.java b/sdk/workloadmonitor/azure-resourcemanager-workloadmonitor/src/main/java/com/azure/resourcemanager/workloadmonitor/WorkloadMonitorManager.java
new file mode 100644
index 000000000000..c0787031a649
--- /dev/null
+++ b/sdk/workloadmonitor/azure-resourcemanager-workloadmonitor/src/main/java/com/azure/resourcemanager/workloadmonitor/WorkloadMonitorManager.java
@@ -0,0 +1,238 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.workloadmonitor;
+
+import com.azure.core.credential.TokenCredential;
+import com.azure.core.http.HttpClient;
+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.HttpLogOptions;
+import com.azure.core.http.policy.HttpLoggingPolicy;
+import com.azure.core.http.policy.HttpPipelinePolicy;
+import com.azure.core.http.policy.HttpPolicyProviders;
+import com.azure.core.http.policy.RequestIdPolicy;
+import com.azure.core.http.policy.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.workloadmonitor.fluent.WorkloadMonitorApi;
+import com.azure.resourcemanager.workloadmonitor.implementation.HealthMonitorsImpl;
+import com.azure.resourcemanager.workloadmonitor.implementation.OperationsImpl;
+import com.azure.resourcemanager.workloadmonitor.implementation.WorkloadMonitorApiBuilder;
+import com.azure.resourcemanager.workloadmonitor.models.HealthMonitors;
+import com.azure.resourcemanager.workloadmonitor.models.Operations;
+import java.time.Duration;
+import java.time.temporal.ChronoUnit;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Objects;
+
+/** Entry point to WorkloadMonitorManager. Workload Monitor API. */
+public final class WorkloadMonitorManager {
+ private Operations operations;
+
+ private HealthMonitors healthMonitors;
+
+ private final WorkloadMonitorApi clientObject;
+
+ private WorkloadMonitorManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) {
+ Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null.");
+ Objects.requireNonNull(profile, "'profile' cannot be null.");
+ this.clientObject =
+ new WorkloadMonitorApiBuilder()
+ .pipeline(httpPipeline)
+ .endpoint(profile.getEnvironment().getResourceManagerEndpoint())
+ .defaultPollInterval(defaultPollInterval)
+ .buildClient();
+ }
+
+ /**
+ * Creates an instance of WorkloadMonitor service API entry point.
+ *
+ * @param credential the credential to use.
+ * @param profile the Azure profile for client.
+ * @return the WorkloadMonitor service API instance.
+ */
+ public static WorkloadMonitorManager authenticate(TokenCredential credential, AzureProfile profile) {
+ Objects.requireNonNull(credential, "'credential' cannot be null.");
+ Objects.requireNonNull(profile, "'profile' cannot be null.");
+ return configure().authenticate(credential, profile);
+ }
+
+ /**
+ * Gets a Configurable instance that can be used to create WorkloadMonitorManager with optional configuration.
+ *
+ * @return the Configurable instance allowing configurations.
+ */
+ public static Configurable configure() {
+ return new WorkloadMonitorManager.Configurable();
+ }
+
+ /** The Configurable allowing configurations to be set. */
+ public static final class Configurable {
+ private final ClientLogger logger = new ClientLogger(Configurable.class);
+
+ private HttpClient httpClient;
+ private HttpLogOptions httpLogOptions;
+ private final List policies = new ArrayList<>();
+ private final List scopes = new ArrayList<>();
+ private RetryPolicy retryPolicy;
+ private Duration defaultPollInterval;
+
+ private Configurable() {
+ }
+
+ /**
+ * Sets the http client.
+ *
+ * @param httpClient the HTTP client.
+ * @return the configurable object itself.
+ */
+ public Configurable withHttpClient(HttpClient httpClient) {
+ this.httpClient = Objects.requireNonNull(httpClient, "'httpClient' cannot be null.");
+ return this;
+ }
+
+ /**
+ * Sets the logging options to the HTTP pipeline.
+ *
+ * @param httpLogOptions the HTTP log options.
+ * @return the configurable object itself.
+ */
+ public Configurable withLogOptions(HttpLogOptions httpLogOptions) {
+ this.httpLogOptions = Objects.requireNonNull(httpLogOptions, "'httpLogOptions' cannot be null.");
+ return this;
+ }
+
+ /**
+ * Adds the pipeline policy to the HTTP pipeline.
+ *
+ * @param policy the HTTP pipeline policy.
+ * @return the configurable object itself.
+ */
+ public Configurable withPolicy(HttpPipelinePolicy policy) {
+ this.policies.add(Objects.requireNonNull(policy, "'policy' cannot be null."));
+ 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.
+ *
+ * @param retryPolicy the HTTP pipeline retry policy.
+ * @return the configurable object itself.
+ */
+ public Configurable withRetryPolicy(RetryPolicy retryPolicy) {
+ this.retryPolicy = Objects.requireNonNull(retryPolicy, "'retryPolicy' cannot be null.");
+ return this;
+ }
+
+ /**
+ * Sets the default poll interval, used when service does not provide "Retry-After" header.
+ *
+ * @param defaultPollInterval the default poll interval.
+ * @return the configurable object itself.
+ */
+ public Configurable withDefaultPollInterval(Duration defaultPollInterval) {
+ this.defaultPollInterval = Objects.requireNonNull(defaultPollInterval, "'retryPolicy' cannot be null.");
+ if (this.defaultPollInterval.isNegative()) {
+ throw logger.logExceptionAsError(new IllegalArgumentException("'httpPipeline' cannot be negative"));
+ }
+ return this;
+ }
+
+ /**
+ * Creates an instance of WorkloadMonitor service API entry point.
+ *
+ * @param credential the credential to use.
+ * @param profile the Azure profile for client.
+ * @return the WorkloadMonitor service API instance.
+ */
+ public WorkloadMonitorManager authenticate(TokenCredential credential, AzureProfile profile) {
+ Objects.requireNonNull(credential, "'credential' cannot be null.");
+ Objects.requireNonNull(profile, "'profile' cannot be null.");
+
+ StringBuilder userAgentBuilder = new StringBuilder();
+ userAgentBuilder
+ .append("azsdk-java")
+ .append("-")
+ .append("com.azure.resourcemanager.workloadmonitor")
+ .append("/")
+ .append("1.0.0-beta.1");
+ if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
+ userAgentBuilder
+ .append(" (")
+ .append(Configuration.getGlobalConfiguration().get("java.version"))
+ .append("; ")
+ .append(Configuration.getGlobalConfiguration().get("os.name"))
+ .append("; ")
+ .append(Configuration.getGlobalConfiguration().get("os.version"))
+ .append("; auto-generated)");
+ } else {
+ userAgentBuilder.append(" (auto-generated)");
+ }
+
+ if (scopes.isEmpty()) {
+ scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default");
+ }
+ if (retryPolicy == null) {
+ retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS);
+ }
+ List policies = new ArrayList<>();
+ policies.add(new UserAgentPolicy(userAgentBuilder.toString()));
+ policies.add(new RequestIdPolicy());
+ HttpPolicyProviders.addBeforeRetryPolicies(policies);
+ policies.add(retryPolicy);
+ policies.add(new AddDatePolicy());
+ policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0])));
+ policies.addAll(this.policies);
+ HttpPolicyProviders.addAfterRetryPolicies(policies);
+ policies.add(new HttpLoggingPolicy(httpLogOptions));
+ HttpPipeline httpPipeline =
+ new HttpPipelineBuilder()
+ .httpClient(httpClient)
+ .policies(policies.toArray(new HttpPipelinePolicy[0]))
+ .build();
+ return new WorkloadMonitorManager(httpPipeline, profile, defaultPollInterval);
+ }
+ }
+
+ /** @return Resource collection API of Operations. */
+ public Operations operations() {
+ if (this.operations == null) {
+ this.operations = new OperationsImpl(clientObject.getOperations(), this);
+ }
+ return operations;
+ }
+
+ /** @return Resource collection API of HealthMonitors. */
+ public HealthMonitors healthMonitors() {
+ if (this.healthMonitors == null) {
+ this.healthMonitors = new HealthMonitorsImpl(clientObject.getHealthMonitors(), this);
+ }
+ return healthMonitors;
+ }
+
+ /**
+ * @return Wrapped service client WorkloadMonitorApi providing direct access to the underlying auto-generated API
+ * implementation, based on Azure REST API.
+ */
+ public WorkloadMonitorApi serviceClient() {
+ return this.clientObject;
+ }
+}
diff --git a/sdk/workloadmonitor/azure-resourcemanager-workloadmonitor/src/main/java/com/azure/resourcemanager/workloadmonitor/fluent/HealthMonitorsClient.java b/sdk/workloadmonitor/azure-resourcemanager-workloadmonitor/src/main/java/com/azure/resourcemanager/workloadmonitor/fluent/HealthMonitorsClient.java
new file mode 100644
index 000000000000..c4f0be0a07b5
--- /dev/null
+++ b/sdk/workloadmonitor/azure-resourcemanager-workloadmonitor/src/main/java/com/azure/resourcemanager/workloadmonitor/fluent/HealthMonitorsClient.java
@@ -0,0 +1,242 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.workloadmonitor.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.util.Context;
+import com.azure.resourcemanager.workloadmonitor.fluent.models.HealthMonitorInner;
+import com.azure.resourcemanager.workloadmonitor.fluent.models.HealthMonitorStateChangeInner;
+import java.time.OffsetDateTime;
+
+/** An instance of this class provides access to all the operations defined in HealthMonitorsClient. */
+public interface HealthMonitorsClient {
+ /**
+ * Get the current health status of all monitors of a virtual machine. Optional parameters: $expand (retrieve the
+ * monitor's evidence and configuration) and $filter (filter by monitor name).
+ *
+ * @param subscriptionId The subscription Id of the virtual machine.
+ * @param resourceGroupName The resource group of the virtual machine.
+ * @param providerName The provider name (ex: Microsoft.Compute for virtual machines).
+ * @param resourceCollectionName The resource collection name (ex: virtualMachines for virtual machines).
+ * @param resourceName The name of the virtual machine.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.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 current health status of all monitors of a virtual machine.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(
+ String subscriptionId,
+ String resourceGroupName,
+ String providerName,
+ String resourceCollectionName,
+ String resourceName);
+
+ /**
+ * Get the current health status of all monitors of a virtual machine. Optional parameters: $expand (retrieve the
+ * monitor's evidence and configuration) and $filter (filter by monitor name).
+ *
+ * @param subscriptionId The subscription Id of the virtual machine.
+ * @param resourceGroupName The resource group of the virtual machine.
+ * @param providerName The provider name (ex: Microsoft.Compute for virtual machines).
+ * @param resourceCollectionName The resource collection name (ex: virtualMachines for virtual machines).
+ * @param resourceName The name of the virtual machine.
+ * @param filter Optionally filter by monitor name. Example: $filter=monitorName eq
+ * 'logical-disks|C:|disk-free-space-mb.'.
+ * @param expand Optionally expand the monitor’s evidence and/or configuration. Example:
+ * $expand=evidence,configuration.
+ * @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 current health status of all monitors of a virtual machine.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(
+ String subscriptionId,
+ String resourceGroupName,
+ String providerName,
+ String resourceCollectionName,
+ String resourceName,
+ String filter,
+ String expand,
+ Context context);
+
+ /**
+ * Get the current health status of a monitor of a virtual machine. Optional parameter: $expand (retrieve the
+ * monitor's evidence and configuration).
+ *
+ * @param subscriptionId The subscription Id of the virtual machine.
+ * @param resourceGroupName The resource group of the virtual machine.
+ * @param providerName The provider name (ex: Microsoft.Compute for virtual machines).
+ * @param resourceCollectionName The resource collection name (ex: virtualMachines for virtual machines).
+ * @param resourceName The name of the virtual machine.
+ * @param monitorId The monitor Id of the virtual machine.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.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 current health status of a monitor of a virtual machine.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ HealthMonitorInner get(
+ String subscriptionId,
+ String resourceGroupName,
+ String providerName,
+ String resourceCollectionName,
+ String resourceName,
+ String monitorId);
+
+ /**
+ * Get the current health status of a monitor of a virtual machine. Optional parameter: $expand (retrieve the
+ * monitor's evidence and configuration).
+ *
+ * @param subscriptionId The subscription Id of the virtual machine.
+ * @param resourceGroupName The resource group of the virtual machine.
+ * @param providerName The provider name (ex: Microsoft.Compute for virtual machines).
+ * @param resourceCollectionName The resource collection name (ex: virtualMachines for virtual machines).
+ * @param resourceName The name of the virtual machine.
+ * @param monitorId The monitor Id of the virtual machine.
+ * @param expand Optionally expand the monitor’s evidence and/or configuration. Example:
+ * $expand=evidence,configuration.
+ * @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 current health status of a monitor of a virtual machine.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String subscriptionId,
+ String resourceGroupName,
+ String providerName,
+ String resourceCollectionName,
+ String resourceName,
+ String monitorId,
+ String expand,
+ Context context);
+
+ /**
+ * Get the health state changes of a monitor of a virtual machine within the provided time window (default is the
+ * last 24 hours). Optional parameters: $expand (retrieve the monitor's evidence and configuration) and $filter
+ * (filter by heartbeat condition).
+ *
+ * @param subscriptionId The subscription Id of the virtual machine.
+ * @param resourceGroupName The resource group of the virtual machine.
+ * @param providerName The provider name (ex: Microsoft.Compute for virtual machines).
+ * @param resourceCollectionName The resource collection name (ex: virtualMachines for virtual machines).
+ * @param resourceName The name of the virtual machine.
+ * @param monitorId The monitor Id of the virtual machine.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.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 health state changes of a monitor of a virtual machine within the provided time window (default is
+ * the last 24 hours).
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listStateChanges(
+ String subscriptionId,
+ String resourceGroupName,
+ String providerName,
+ String resourceCollectionName,
+ String resourceName,
+ String monitorId);
+
+ /**
+ * Get the health state changes of a monitor of a virtual machine within the provided time window (default is the
+ * last 24 hours). Optional parameters: $expand (retrieve the monitor's evidence and configuration) and $filter
+ * (filter by heartbeat condition).
+ *
+ * @param subscriptionId The subscription Id of the virtual machine.
+ * @param resourceGroupName The resource group of the virtual machine.
+ * @param providerName The provider name (ex: Microsoft.Compute for virtual machines).
+ * @param resourceCollectionName The resource collection name (ex: virtualMachines for virtual machines).
+ * @param resourceName The name of the virtual machine.
+ * @param monitorId The monitor Id of the virtual machine.
+ * @param filter Optionally filter by heartbeat condition. Example: $filter=isHeartbeat eq false.
+ * @param expand Optionally expand the monitor’s evidence and/or configuration. Example:
+ * $expand=evidence,configuration.
+ * @param startTimestampUtc The start of the time window.
+ * @param endTimestampUtc The end of the time window.
+ * @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 health state changes of a monitor of a virtual machine within the provided time window (default is
+ * the last 24 hours).
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listStateChanges(
+ String subscriptionId,
+ String resourceGroupName,
+ String providerName,
+ String resourceCollectionName,
+ String resourceName,
+ String monitorId,
+ String filter,
+ String expand,
+ OffsetDateTime startTimestampUtc,
+ OffsetDateTime endTimestampUtc,
+ Context context);
+
+ /**
+ * Get the health state change of a monitor of a virtual machine at the provided timestamp. Optional parameter:
+ * $expand (retrieve the monitor's evidence and configuration).
+ *
+ * @param subscriptionId The subscription Id of the virtual machine.
+ * @param resourceGroupName The resource group of the virtual machine.
+ * @param providerName The provider name (ex: Microsoft.Compute for virtual machines).
+ * @param resourceCollectionName The resource collection name (ex: virtualMachines for virtual machines).
+ * @param resourceName The name of the virtual machine.
+ * @param monitorId The monitor Id of the virtual machine.
+ * @param timestampUnix The timestamp of the state change (unix format).
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.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 health state change of a monitor of a virtual machine at the provided timestamp.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ HealthMonitorStateChangeInner getStateChange(
+ String subscriptionId,
+ String resourceGroupName,
+ String providerName,
+ String resourceCollectionName,
+ String resourceName,
+ String monitorId,
+ String timestampUnix);
+
+ /**
+ * Get the health state change of a monitor of a virtual machine at the provided timestamp. Optional parameter:
+ * $expand (retrieve the monitor's evidence and configuration).
+ *
+ * @param subscriptionId The subscription Id of the virtual machine.
+ * @param resourceGroupName The resource group of the virtual machine.
+ * @param providerName The provider name (ex: Microsoft.Compute for virtual machines).
+ * @param resourceCollectionName The resource collection name (ex: virtualMachines for virtual machines).
+ * @param resourceName The name of the virtual machine.
+ * @param monitorId The monitor Id of the virtual machine.
+ * @param timestampUnix The timestamp of the state change (unix format).
+ * @param expand Optionally expand the monitor’s evidence and/or configuration. Example:
+ * $expand=evidence,configuration.
+ * @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 health state change of a monitor of a virtual machine at the provided timestamp.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getStateChangeWithResponse(
+ String subscriptionId,
+ String resourceGroupName,
+ String providerName,
+ String resourceCollectionName,
+ String resourceName,
+ String monitorId,
+ String timestampUnix,
+ String expand,
+ Context context);
+}
diff --git a/sdk/workloadmonitor/azure-resourcemanager-workloadmonitor/src/main/java/com/azure/resourcemanager/workloadmonitor/fluent/OperationsClient.java b/sdk/workloadmonitor/azure-resourcemanager-workloadmonitor/src/main/java/com/azure/resourcemanager/workloadmonitor/fluent/OperationsClient.java
new file mode 100644
index 000000000000..78232fc8a52a
--- /dev/null
+++ b/sdk/workloadmonitor/azure-resourcemanager-workloadmonitor/src/main/java/com/azure/resourcemanager/workloadmonitor/fluent/OperationsClient.java
@@ -0,0 +1,36 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.workloadmonitor.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.workloadmonitor.fluent.models.OperationInner;
+
+/** An instance of this class provides access to all the operations defined in OperationsClient. */
+public interface OperationsClient {
+ /**
+ * Get a list of all available REST API operations.
+ *
+ * @throws com.azure.core.management.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 all available REST API operations.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
+
+ /**
+ * Get a list of all available REST API operations.
+ *
+ * @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 all available REST API operations.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(Context context);
+}
diff --git a/sdk/workloadmonitor/azure-resourcemanager-workloadmonitor/src/main/java/com/azure/resourcemanager/workloadmonitor/fluent/WorkloadMonitorApi.java b/sdk/workloadmonitor/azure-resourcemanager-workloadmonitor/src/main/java/com/azure/resourcemanager/workloadmonitor/fluent/WorkloadMonitorApi.java
new file mode 100644
index 000000000000..1e0287b0970d
--- /dev/null
+++ b/sdk/workloadmonitor/azure-resourcemanager-workloadmonitor/src/main/java/com/azure/resourcemanager/workloadmonitor/fluent/WorkloadMonitorApi.java
@@ -0,0 +1,53 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.workloadmonitor.fluent;
+
+import com.azure.core.http.HttpPipeline;
+import java.time.Duration;
+
+/** The interface for WorkloadMonitorApi class. */
+public interface WorkloadMonitorApi {
+ /**
+ * Gets server parameter.
+ *
+ * @return the endpoint value.
+ */
+ String getEndpoint();
+
+ /**
+ * Gets Api Version.
+ *
+ * @return the apiVersion value.
+ */
+ String getApiVersion();
+
+ /**
+ * Gets The HTTP pipeline to send requests through.
+ *
+ * @return the httpPipeline value.
+ */
+ HttpPipeline getHttpPipeline();
+
+ /**
+ * Gets The default poll interval for long-running operation.
+ *
+ * @return the defaultPollInterval value.
+ */
+ Duration getDefaultPollInterval();
+
+ /**
+ * Gets the OperationsClient object to access its operations.
+ *
+ * @return the OperationsClient object.
+ */
+ OperationsClient getOperations();
+
+ /**
+ * Gets the HealthMonitorsClient object to access its operations.
+ *
+ * @return the HealthMonitorsClient object.
+ */
+ HealthMonitorsClient getHealthMonitors();
+}
diff --git a/sdk/workloadmonitor/azure-resourcemanager-workloadmonitor/src/main/java/com/azure/resourcemanager/workloadmonitor/fluent/models/HealthMonitorInner.java b/sdk/workloadmonitor/azure-resourcemanager-workloadmonitor/src/main/java/com/azure/resourcemanager/workloadmonitor/fluent/models/HealthMonitorInner.java
new file mode 100644
index 000000000000..df47cc211c5b
--- /dev/null
+++ b/sdk/workloadmonitor/azure-resourcemanager-workloadmonitor/src/main/java/com/azure/resourcemanager/workloadmonitor/fluent/models/HealthMonitorInner.java
@@ -0,0 +1,293 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.workloadmonitor.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.workloadmonitor.models.HealthState;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Information about the monitor’s current health status. */
+@JsonFlatten
+@Fluent
+public class HealthMonitorInner extends ProxyResource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(HealthMonitorInner.class);
+
+ /*
+ * Human-readable name of the monitor.
+ */
+ @JsonProperty(value = "properties.monitorName")
+ private String monitorName;
+
+ /*
+ * Type of the monitor.
+ */
+ @JsonProperty(value = "properties.monitorType")
+ private String monitorType;
+
+ /*
+ * Dynamic monitored object of the monitor.
+ */
+ @JsonProperty(value = "properties.monitoredObject")
+ private String monitoredObject;
+
+ /*
+ * Name of the parent monitor.
+ */
+ @JsonProperty(value = "properties.parentMonitorName")
+ private String parentMonitorName;
+
+ /*
+ * Previous health state of the monitor.
+ */
+ @JsonProperty(value = "properties.previousMonitorState", access = JsonProperty.Access.WRITE_ONLY)
+ private HealthState previousMonitorState;
+
+ /*
+ * Current health state of the monitor.
+ */
+ @JsonProperty(value = "properties.currentMonitorState", access = JsonProperty.Access.WRITE_ONLY)
+ private HealthState currentMonitorState;
+
+ /*
+ * Timestamp of the monitor's last health evaluation.
+ */
+ @JsonProperty(value = "properties.evaluationTimestamp")
+ private String evaluationTimestamp;
+
+ /*
+ * Timestamp of the monitor's last health state change.
+ */
+ @JsonProperty(value = "properties.currentStateFirstObservedTimestamp")
+ private String currentStateFirstObservedTimestamp;
+
+ /*
+ * Timestamp of the monitor's last reported health state.
+ */
+ @JsonProperty(value = "properties.lastReportedTimestamp")
+ private String lastReportedTimestamp;
+
+ /*
+ * Evidence validating the monitor's current health state.
+ */
+ @JsonProperty(value = "properties.evidence")
+ private Object evidence;
+
+ /*
+ * The configuration settings at the time of the monitor's health
+ * evaluation.
+ */
+ @JsonProperty(value = "properties.monitorConfiguration")
+ private Object monitorConfiguration;
+
+ /**
+ * Get the monitorName property: Human-readable name of the monitor.
+ *
+ * @return the monitorName value.
+ */
+ public String monitorName() {
+ return this.monitorName;
+ }
+
+ /**
+ * Set the monitorName property: Human-readable name of the monitor.
+ *
+ * @param monitorName the monitorName value to set.
+ * @return the HealthMonitorInner object itself.
+ */
+ public HealthMonitorInner withMonitorName(String monitorName) {
+ this.monitorName = monitorName;
+ return this;
+ }
+
+ /**
+ * Get the monitorType property: Type of the monitor.
+ *
+ * @return the monitorType value.
+ */
+ public String monitorType() {
+ return this.monitorType;
+ }
+
+ /**
+ * Set the monitorType property: Type of the monitor.
+ *
+ * @param monitorType the monitorType value to set.
+ * @return the HealthMonitorInner object itself.
+ */
+ public HealthMonitorInner withMonitorType(String monitorType) {
+ this.monitorType = monitorType;
+ return this;
+ }
+
+ /**
+ * Get the monitoredObject property: Dynamic monitored object of the monitor.
+ *
+ * @return the monitoredObject value.
+ */
+ public String monitoredObject() {
+ return this.monitoredObject;
+ }
+
+ /**
+ * Set the monitoredObject property: Dynamic monitored object of the monitor.
+ *
+ * @param monitoredObject the monitoredObject value to set.
+ * @return the HealthMonitorInner object itself.
+ */
+ public HealthMonitorInner withMonitoredObject(String monitoredObject) {
+ this.monitoredObject = monitoredObject;
+ return this;
+ }
+
+ /**
+ * Get the parentMonitorName property: Name of the parent monitor.
+ *
+ * @return the parentMonitorName value.
+ */
+ public String parentMonitorName() {
+ return this.parentMonitorName;
+ }
+
+ /**
+ * Set the parentMonitorName property: Name of the parent monitor.
+ *
+ * @param parentMonitorName the parentMonitorName value to set.
+ * @return the HealthMonitorInner object itself.
+ */
+ public HealthMonitorInner withParentMonitorName(String parentMonitorName) {
+ this.parentMonitorName = parentMonitorName;
+ return this;
+ }
+
+ /**
+ * Get the previousMonitorState property: Previous health state of the monitor.
+ *
+ * @return the previousMonitorState value.
+ */
+ public HealthState previousMonitorState() {
+ return this.previousMonitorState;
+ }
+
+ /**
+ * Get the currentMonitorState property: Current health state of the monitor.
+ *
+ * @return the currentMonitorState value.
+ */
+ public HealthState currentMonitorState() {
+ return this.currentMonitorState;
+ }
+
+ /**
+ * Get the evaluationTimestamp property: Timestamp of the monitor's last health evaluation.
+ *
+ * @return the evaluationTimestamp value.
+ */
+ public String evaluationTimestamp() {
+ return this.evaluationTimestamp;
+ }
+
+ /**
+ * Set the evaluationTimestamp property: Timestamp of the monitor's last health evaluation.
+ *
+ * @param evaluationTimestamp the evaluationTimestamp value to set.
+ * @return the HealthMonitorInner object itself.
+ */
+ public HealthMonitorInner withEvaluationTimestamp(String evaluationTimestamp) {
+ this.evaluationTimestamp = evaluationTimestamp;
+ return this;
+ }
+
+ /**
+ * Get the currentStateFirstObservedTimestamp property: Timestamp of the monitor's last health state change.
+ *
+ * @return the currentStateFirstObservedTimestamp value.
+ */
+ public String currentStateFirstObservedTimestamp() {
+ return this.currentStateFirstObservedTimestamp;
+ }
+
+ /**
+ * Set the currentStateFirstObservedTimestamp property: Timestamp of the monitor's last health state change.
+ *
+ * @param currentStateFirstObservedTimestamp the currentStateFirstObservedTimestamp value to set.
+ * @return the HealthMonitorInner object itself.
+ */
+ public HealthMonitorInner withCurrentStateFirstObservedTimestamp(String currentStateFirstObservedTimestamp) {
+ this.currentStateFirstObservedTimestamp = currentStateFirstObservedTimestamp;
+ return this;
+ }
+
+ /**
+ * Get the lastReportedTimestamp property: Timestamp of the monitor's last reported health state.
+ *
+ * @return the lastReportedTimestamp value.
+ */
+ public String lastReportedTimestamp() {
+ return this.lastReportedTimestamp;
+ }
+
+ /**
+ * Set the lastReportedTimestamp property: Timestamp of the monitor's last reported health state.
+ *
+ * @param lastReportedTimestamp the lastReportedTimestamp value to set.
+ * @return the HealthMonitorInner object itself.
+ */
+ public HealthMonitorInner withLastReportedTimestamp(String lastReportedTimestamp) {
+ this.lastReportedTimestamp = lastReportedTimestamp;
+ return this;
+ }
+
+ /**
+ * Get the evidence property: Evidence validating the monitor's current health state.
+ *
+ * @return the evidence value.
+ */
+ public Object evidence() {
+ return this.evidence;
+ }
+
+ /**
+ * Set the evidence property: Evidence validating the monitor's current health state.
+ *
+ * @param evidence the evidence value to set.
+ * @return the HealthMonitorInner object itself.
+ */
+ public HealthMonitorInner withEvidence(Object evidence) {
+ this.evidence = evidence;
+ return this;
+ }
+
+ /**
+ * Get the monitorConfiguration property: The configuration settings at the time of the monitor's health evaluation.
+ *
+ * @return the monitorConfiguration value.
+ */
+ public Object monitorConfiguration() {
+ return this.monitorConfiguration;
+ }
+
+ /**
+ * Set the monitorConfiguration property: The configuration settings at the time of the monitor's health evaluation.
+ *
+ * @param monitorConfiguration the monitorConfiguration value to set.
+ * @return the HealthMonitorInner object itself.
+ */
+ public HealthMonitorInner withMonitorConfiguration(Object monitorConfiguration) {
+ this.monitorConfiguration = monitorConfiguration;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/workloadmonitor/azure-resourcemanager-workloadmonitor/src/main/java/com/azure/resourcemanager/workloadmonitor/fluent/models/HealthMonitorStateChangeInner.java b/sdk/workloadmonitor/azure-resourcemanager-workloadmonitor/src/main/java/com/azure/resourcemanager/workloadmonitor/fluent/models/HealthMonitorStateChangeInner.java
new file mode 100644
index 000000000000..77101e0b1fbc
--- /dev/null
+++ b/sdk/workloadmonitor/azure-resourcemanager-workloadmonitor/src/main/java/com/azure/resourcemanager/workloadmonitor/fluent/models/HealthMonitorStateChangeInner.java
@@ -0,0 +1,242 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.workloadmonitor.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.workloadmonitor.models.HealthState;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Information about the monitor’s health state change at the provided timestamp. */
+@JsonFlatten
+@Fluent
+public class HealthMonitorStateChangeInner extends ProxyResource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(HealthMonitorStateChangeInner.class);
+
+ /*
+ * Human-readable name of the monitor.
+ */
+ @JsonProperty(value = "properties.monitorName")
+ private String monitorName;
+
+ /*
+ * Type of the monitor.
+ */
+ @JsonProperty(value = "properties.monitorType")
+ private String monitorType;
+
+ /*
+ * Dynamic monitored object of the monitor.
+ */
+ @JsonProperty(value = "properties.monitoredObject")
+ private String monitoredObject;
+
+ /*
+ * Timestamp of the monitor's last health evaluation.
+ */
+ @JsonProperty(value = "properties.evaluationTimestamp")
+ private String evaluationTimestamp;
+
+ /*
+ * Timestamp of the monitor's last health state change.
+ */
+ @JsonProperty(value = "properties.currentStateFirstObservedTimestamp")
+ private String currentStateFirstObservedTimestamp;
+
+ /*
+ * Previous health state of the monitor.
+ */
+ @JsonProperty(value = "properties.previousMonitorState", access = JsonProperty.Access.WRITE_ONLY)
+ private HealthState previousMonitorState;
+
+ /*
+ * Current health state of the monitor.
+ */
+ @JsonProperty(value = "properties.currentMonitorState", access = JsonProperty.Access.WRITE_ONLY)
+ private HealthState currentMonitorState;
+
+ /*
+ * Evidence validating the monitor's current health state.
+ */
+ @JsonProperty(value = "properties.evidence")
+ private Object evidence;
+
+ /*
+ * The configuration settings at the time of the monitor's health
+ * evaluation.
+ */
+ @JsonProperty(value = "properties.monitorConfiguration")
+ private Object monitorConfiguration;
+
+ /**
+ * Get the monitorName property: Human-readable name of the monitor.
+ *
+ * @return the monitorName value.
+ */
+ public String monitorName() {
+ return this.monitorName;
+ }
+
+ /**
+ * Set the monitorName property: Human-readable name of the monitor.
+ *
+ * @param monitorName the monitorName value to set.
+ * @return the HealthMonitorStateChangeInner object itself.
+ */
+ public HealthMonitorStateChangeInner withMonitorName(String monitorName) {
+ this.monitorName = monitorName;
+ return this;
+ }
+
+ /**
+ * Get the monitorType property: Type of the monitor.
+ *
+ * @return the monitorType value.
+ */
+ public String monitorType() {
+ return this.monitorType;
+ }
+
+ /**
+ * Set the monitorType property: Type of the monitor.
+ *
+ * @param monitorType the monitorType value to set.
+ * @return the HealthMonitorStateChangeInner object itself.
+ */
+ public HealthMonitorStateChangeInner withMonitorType(String monitorType) {
+ this.monitorType = monitorType;
+ return this;
+ }
+
+ /**
+ * Get the monitoredObject property: Dynamic monitored object of the monitor.
+ *
+ * @return the monitoredObject value.
+ */
+ public String monitoredObject() {
+ return this.monitoredObject;
+ }
+
+ /**
+ * Set the monitoredObject property: Dynamic monitored object of the monitor.
+ *
+ * @param monitoredObject the monitoredObject value to set.
+ * @return the HealthMonitorStateChangeInner object itself.
+ */
+ public HealthMonitorStateChangeInner withMonitoredObject(String monitoredObject) {
+ this.monitoredObject = monitoredObject;
+ return this;
+ }
+
+ /**
+ * Get the evaluationTimestamp property: Timestamp of the monitor's last health evaluation.
+ *
+ * @return the evaluationTimestamp value.
+ */
+ public String evaluationTimestamp() {
+ return this.evaluationTimestamp;
+ }
+
+ /**
+ * Set the evaluationTimestamp property: Timestamp of the monitor's last health evaluation.
+ *
+ * @param evaluationTimestamp the evaluationTimestamp value to set.
+ * @return the HealthMonitorStateChangeInner object itself.
+ */
+ public HealthMonitorStateChangeInner withEvaluationTimestamp(String evaluationTimestamp) {
+ this.evaluationTimestamp = evaluationTimestamp;
+ return this;
+ }
+
+ /**
+ * Get the currentStateFirstObservedTimestamp property: Timestamp of the monitor's last health state change.
+ *
+ * @return the currentStateFirstObservedTimestamp value.
+ */
+ public String currentStateFirstObservedTimestamp() {
+ return this.currentStateFirstObservedTimestamp;
+ }
+
+ /**
+ * Set the currentStateFirstObservedTimestamp property: Timestamp of the monitor's last health state change.
+ *
+ * @param currentStateFirstObservedTimestamp the currentStateFirstObservedTimestamp value to set.
+ * @return the HealthMonitorStateChangeInner object itself.
+ */
+ public HealthMonitorStateChangeInner withCurrentStateFirstObservedTimestamp(
+ String currentStateFirstObservedTimestamp) {
+ this.currentStateFirstObservedTimestamp = currentStateFirstObservedTimestamp;
+ return this;
+ }
+
+ /**
+ * Get the previousMonitorState property: Previous health state of the monitor.
+ *
+ * @return the previousMonitorState value.
+ */
+ public HealthState previousMonitorState() {
+ return this.previousMonitorState;
+ }
+
+ /**
+ * Get the currentMonitorState property: Current health state of the monitor.
+ *
+ * @return the currentMonitorState value.
+ */
+ public HealthState currentMonitorState() {
+ return this.currentMonitorState;
+ }
+
+ /**
+ * Get the evidence property: Evidence validating the monitor's current health state.
+ *
+ * @return the evidence value.
+ */
+ public Object evidence() {
+ return this.evidence;
+ }
+
+ /**
+ * Set the evidence property: Evidence validating the monitor's current health state.
+ *
+ * @param evidence the evidence value to set.
+ * @return the HealthMonitorStateChangeInner object itself.
+ */
+ public HealthMonitorStateChangeInner withEvidence(Object evidence) {
+ this.evidence = evidence;
+ return this;
+ }
+
+ /**
+ * Get the monitorConfiguration property: The configuration settings at the time of the monitor's health evaluation.
+ *
+ * @return the monitorConfiguration value.
+ */
+ public Object monitorConfiguration() {
+ return this.monitorConfiguration;
+ }
+
+ /**
+ * Set the monitorConfiguration property: The configuration settings at the time of the monitor's health evaluation.
+ *
+ * @param monitorConfiguration the monitorConfiguration value to set.
+ * @return the HealthMonitorStateChangeInner object itself.
+ */
+ public HealthMonitorStateChangeInner withMonitorConfiguration(Object monitorConfiguration) {
+ this.monitorConfiguration = monitorConfiguration;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/workloadmonitor/azure-resourcemanager-workloadmonitor/src/main/java/com/azure/resourcemanager/workloadmonitor/fluent/models/OperationInner.java b/sdk/workloadmonitor/azure-resourcemanager-workloadmonitor/src/main/java/com/azure/resourcemanager/workloadmonitor/fluent/models/OperationInner.java
new file mode 100644
index 000000000000..e9983ca23721
--- /dev/null
+++ b/sdk/workloadmonitor/azure-resourcemanager-workloadmonitor/src/main/java/com/azure/resourcemanager/workloadmonitor/fluent/models/OperationInner.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.workloadmonitor.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.workloadmonitor.models.OperationDisplay;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Operation supported by the resource provider. */
+@Fluent
+public final class OperationInner {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationInner.class);
+
+ /*
+ * The name of the operation being performed on this particular object.
+ */
+ @JsonProperty(value = "name", required = true)
+ private String name;
+
+ /*
+ * The localized display information for this particular operation or
+ * action.
+ */
+ @JsonProperty(value = "display", required = true)
+ private OperationDisplay display;
+
+ /*
+ * The intended executor of the operation.
+ */
+ @JsonProperty(value = "origin", required = true)
+ private String origin;
+
+ /**
+ * Get the name property: The name of the operation being performed on this particular object.
+ *
+ * @return the name value.
+ */
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Set the name property: The name of the operation being performed on this particular object.
+ *
+ * @param name the name value to set.
+ * @return the OperationInner object itself.
+ */
+ public OperationInner withName(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Get the display property: The localized display information for this particular operation or action.
+ *
+ * @return the display value.
+ */
+ public OperationDisplay display() {
+ return this.display;
+ }
+
+ /**
+ * Set the display property: The localized display information for this particular operation or action.
+ *
+ * @param display the display value to set.
+ * @return the OperationInner object itself.
+ */
+ public OperationInner withDisplay(OperationDisplay display) {
+ this.display = display;
+ return this;
+ }
+
+ /**
+ * Get the origin property: The intended executor of the operation.
+ *
+ * @return the origin value.
+ */
+ public String origin() {
+ return this.origin;
+ }
+
+ /**
+ * Set the origin property: The intended executor of the operation.
+ *
+ * @param origin the origin value to set.
+ * @return the OperationInner object itself.
+ */
+ public OperationInner withOrigin(String origin) {
+ this.origin = origin;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (name() == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException("Missing required property name in model OperationInner"));
+ }
+ if (display() == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException("Missing required property display in model OperationInner"));
+ } else {
+ display().validate();
+ }
+ if (origin() == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException("Missing required property origin in model OperationInner"));
+ }
+ }
+}
diff --git a/sdk/workloadmonitor/azure-resourcemanager-workloadmonitor/src/main/java/com/azure/resourcemanager/workloadmonitor/fluent/models/package-info.java b/sdk/workloadmonitor/azure-resourcemanager-workloadmonitor/src/main/java/com/azure/resourcemanager/workloadmonitor/fluent/models/package-info.java
new file mode 100644
index 000000000000..fc1d3b85a960
--- /dev/null
+++ b/sdk/workloadmonitor/azure-resourcemanager-workloadmonitor/src/main/java/com/azure/resourcemanager/workloadmonitor/fluent/models/package-info.java
@@ -0,0 +1,6 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+/** Package containing the inner data models for WorkloadMonitorApi. Workload Monitor API. */
+package com.azure.resourcemanager.workloadmonitor.fluent.models;
diff --git a/sdk/workloadmonitor/azure-resourcemanager-workloadmonitor/src/main/java/com/azure/resourcemanager/workloadmonitor/fluent/package-info.java b/sdk/workloadmonitor/azure-resourcemanager-workloadmonitor/src/main/java/com/azure/resourcemanager/workloadmonitor/fluent/package-info.java
new file mode 100644
index 000000000000..ac04456e3f11
--- /dev/null
+++ b/sdk/workloadmonitor/azure-resourcemanager-workloadmonitor/src/main/java/com/azure/resourcemanager/workloadmonitor/fluent/package-info.java
@@ -0,0 +1,6 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+/** Package containing the service clients for WorkloadMonitorApi. Workload Monitor API. */
+package com.azure.resourcemanager.workloadmonitor.fluent;
diff --git a/sdk/workloadmonitor/azure-resourcemanager-workloadmonitor/src/main/java/com/azure/resourcemanager/workloadmonitor/implementation/HealthMonitorImpl.java b/sdk/workloadmonitor/azure-resourcemanager-workloadmonitor/src/main/java/com/azure/resourcemanager/workloadmonitor/implementation/HealthMonitorImpl.java
new file mode 100644
index 000000000000..293e925f1048
--- /dev/null
+++ b/sdk/workloadmonitor/azure-resourcemanager-workloadmonitor/src/main/java/com/azure/resourcemanager/workloadmonitor/implementation/HealthMonitorImpl.java
@@ -0,0 +1,86 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.workloadmonitor.implementation;
+
+import com.azure.resourcemanager.workloadmonitor.fluent.models.HealthMonitorInner;
+import com.azure.resourcemanager.workloadmonitor.models.HealthMonitor;
+import com.azure.resourcemanager.workloadmonitor.models.HealthState;
+
+public final class HealthMonitorImpl implements HealthMonitor {
+ private HealthMonitorInner innerObject;
+
+ private final com.azure.resourcemanager.workloadmonitor.WorkloadMonitorManager serviceManager;
+
+ HealthMonitorImpl(
+ HealthMonitorInner innerObject,
+ com.azure.resourcemanager.workloadmonitor.WorkloadMonitorManager 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 monitorName() {
+ return this.innerModel().monitorName();
+ }
+
+ public String monitorType() {
+ return this.innerModel().monitorType();
+ }
+
+ public String monitoredObject() {
+ return this.innerModel().monitoredObject();
+ }
+
+ public String parentMonitorName() {
+ return this.innerModel().parentMonitorName();
+ }
+
+ public HealthState previousMonitorState() {
+ return this.innerModel().previousMonitorState();
+ }
+
+ public HealthState currentMonitorState() {
+ return this.innerModel().currentMonitorState();
+ }
+
+ public String evaluationTimestamp() {
+ return this.innerModel().evaluationTimestamp();
+ }
+
+ public String currentStateFirstObservedTimestamp() {
+ return this.innerModel().currentStateFirstObservedTimestamp();
+ }
+
+ public String lastReportedTimestamp() {
+ return this.innerModel().lastReportedTimestamp();
+ }
+
+ public Object evidence() {
+ return this.innerModel().evidence();
+ }
+
+ public Object monitorConfiguration() {
+ return this.innerModel().monitorConfiguration();
+ }
+
+ public HealthMonitorInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.workloadmonitor.WorkloadMonitorManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/workloadmonitor/azure-resourcemanager-workloadmonitor/src/main/java/com/azure/resourcemanager/workloadmonitor/implementation/HealthMonitorStateChangeImpl.java b/sdk/workloadmonitor/azure-resourcemanager-workloadmonitor/src/main/java/com/azure/resourcemanager/workloadmonitor/implementation/HealthMonitorStateChangeImpl.java
new file mode 100644
index 000000000000..f9199faa6839
--- /dev/null
+++ b/sdk/workloadmonitor/azure-resourcemanager-workloadmonitor/src/main/java/com/azure/resourcemanager/workloadmonitor/implementation/HealthMonitorStateChangeImpl.java
@@ -0,0 +1,78 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.workloadmonitor.implementation;
+
+import com.azure.resourcemanager.workloadmonitor.fluent.models.HealthMonitorStateChangeInner;
+import com.azure.resourcemanager.workloadmonitor.models.HealthMonitorStateChange;
+import com.azure.resourcemanager.workloadmonitor.models.HealthState;
+
+public final class HealthMonitorStateChangeImpl implements HealthMonitorStateChange {
+ private HealthMonitorStateChangeInner innerObject;
+
+ private final com.azure.resourcemanager.workloadmonitor.WorkloadMonitorManager serviceManager;
+
+ HealthMonitorStateChangeImpl(
+ HealthMonitorStateChangeInner innerObject,
+ com.azure.resourcemanager.workloadmonitor.WorkloadMonitorManager 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 monitorName() {
+ return this.innerModel().monitorName();
+ }
+
+ public String monitorType() {
+ return this.innerModel().monitorType();
+ }
+
+ public String monitoredObject() {
+ return this.innerModel().monitoredObject();
+ }
+
+ public String evaluationTimestamp() {
+ return this.innerModel().evaluationTimestamp();
+ }
+
+ public String currentStateFirstObservedTimestamp() {
+ return this.innerModel().currentStateFirstObservedTimestamp();
+ }
+
+ public HealthState previousMonitorState() {
+ return this.innerModel().previousMonitorState();
+ }
+
+ public HealthState currentMonitorState() {
+ return this.innerModel().currentMonitorState();
+ }
+
+ public Object evidence() {
+ return this.innerModel().evidence();
+ }
+
+ public Object monitorConfiguration() {
+ return this.innerModel().monitorConfiguration();
+ }
+
+ public HealthMonitorStateChangeInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.workloadmonitor.WorkloadMonitorManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/workloadmonitor/azure-resourcemanager-workloadmonitor/src/main/java/com/azure/resourcemanager/workloadmonitor/implementation/HealthMonitorsClientImpl.java b/sdk/workloadmonitor/azure-resourcemanager-workloadmonitor/src/main/java/com/azure/resourcemanager/workloadmonitor/implementation/HealthMonitorsClientImpl.java
new file mode 100644
index 000000000000..9b36a7b351ec
--- /dev/null
+++ b/sdk/workloadmonitor/azure-resourcemanager-workloadmonitor/src/main/java/com/azure/resourcemanager/workloadmonitor/implementation/HealthMonitorsClientImpl.java
@@ -0,0 +1,1720 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.workloadmonitor.implementation;
+
+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.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.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.workloadmonitor.fluent.HealthMonitorsClient;
+import com.azure.resourcemanager.workloadmonitor.fluent.models.HealthMonitorInner;
+import com.azure.resourcemanager.workloadmonitor.fluent.models.HealthMonitorStateChangeInner;
+import com.azure.resourcemanager.workloadmonitor.models.HealthMonitorList;
+import com.azure.resourcemanager.workloadmonitor.models.HealthMonitorStateChangeList;
+import java.time.OffsetDateTime;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in HealthMonitorsClient. */
+public final class HealthMonitorsClientImpl implements HealthMonitorsClient {
+ private final ClientLogger logger = new ClientLogger(HealthMonitorsClientImpl.class);
+
+ /** The proxy service used to perform REST calls. */
+ private final HealthMonitorsService service;
+
+ /** The service client containing this operation class. */
+ private final WorkloadMonitorApiImpl client;
+
+ /**
+ * Initializes an instance of HealthMonitorsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ HealthMonitorsClientImpl(WorkloadMonitorApiImpl client) {
+ this.service =
+ RestProxy.create(HealthMonitorsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for WorkloadMonitorApiHealthMonitors to be used by the proxy service to
+ * perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "WorkloadMonitorApiHe")
+ private interface HealthMonitorsService {
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{providerName}"
+ + "/{resourceCollectionName}/{resourceName}/providers/Microsoft.WorkloadMonitor/monitors")
+ @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("providerName") String providerName,
+ @PathParam("resourceCollectionName") String resourceCollectionName,
+ @PathParam("resourceName") String resourceName,
+ @QueryParam("$filter") String filter,
+ @QueryParam("$expand") String expand,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{providerName}"
+ + "/{resourceCollectionName}/{resourceName}/providers/Microsoft.WorkloadMonitor/monitors/{monitorId}")
+ @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("providerName") String providerName,
+ @PathParam("resourceCollectionName") String resourceCollectionName,
+ @PathParam("resourceName") String resourceName,
+ @PathParam("monitorId") String monitorId,
+ @QueryParam("$expand") String expand,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{providerName}"
+ + "/{resourceCollectionName}/{resourceName}/providers/Microsoft.WorkloadMonitor/monitors/{monitorId}"
+ + "/history")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listStateChanges(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("providerName") String providerName,
+ @PathParam("resourceCollectionName") String resourceCollectionName,
+ @PathParam("resourceName") String resourceName,
+ @PathParam("monitorId") String monitorId,
+ @QueryParam("$filter") String filter,
+ @QueryParam("$expand") String expand,
+ @QueryParam("startTimestampUtc") OffsetDateTime startTimestampUtc,
+ @QueryParam("endTimestampUtc") OffsetDateTime endTimestampUtc,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{providerName}"
+ + "/{resourceCollectionName}/{resourceName}/providers/Microsoft.WorkloadMonitor/monitors/{monitorId}"
+ + "/history/{timestampUnix}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> getStateChange(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("providerName") String providerName,
+ @PathParam("resourceCollectionName") String resourceCollectionName,
+ @PathParam("resourceName") String resourceName,
+ @PathParam("monitorId") String monitorId,
+ @PathParam("timestampUnix") String timestampUnix,
+ @QueryParam("$expand") String expand,
+ @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> listStateChangesNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * Get the current health status of all monitors of a virtual machine. Optional parameters: $expand (retrieve the
+ * monitor's evidence and configuration) and $filter (filter by monitor name).
+ *
+ * @param subscriptionId The subscription Id of the virtual machine.
+ * @param resourceGroupName The resource group of the virtual machine.
+ * @param providerName The provider name (ex: Microsoft.Compute for virtual machines).
+ * @param resourceCollectionName The resource collection name (ex: virtualMachines for virtual machines).
+ * @param resourceName The name of the virtual machine.
+ * @param filter Optionally filter by monitor name. Example: $filter=monitorName eq
+ * 'logical-disks|C:|disk-free-space-mb.'.
+ * @param expand Optionally expand the monitor’s evidence and/or configuration. Example:
+ * $expand=evidence,configuration.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the current health status of all monitors of a virtual machine.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(
+ String subscriptionId,
+ String resourceGroupName,
+ String providerName,
+ String resourceCollectionName,
+ String resourceName,
+ String filter,
+ String expand) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (subscriptionId == null) {
+ return Mono.error(new IllegalArgumentException("Parameter subscriptionId is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (providerName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter providerName is required and cannot be null."));
+ }
+ if (resourceCollectionName == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException("Parameter resourceCollectionName is required and cannot be null."));
+ }
+ if (resourceName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .list(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ subscriptionId,
+ resourceGroupName,
+ providerName,
+ resourceCollectionName,
+ resourceName,
+ filter,
+ expand,
+ 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 current health status of all monitors of a virtual machine. Optional parameters: $expand (retrieve the
+ * monitor's evidence and configuration) and $filter (filter by monitor name).
+ *
+ * @param subscriptionId The subscription Id of the virtual machine.
+ * @param resourceGroupName The resource group of the virtual machine.
+ * @param providerName The provider name (ex: Microsoft.Compute for virtual machines).
+ * @param resourceCollectionName The resource collection name (ex: virtualMachines for virtual machines).
+ * @param resourceName The name of the virtual machine.
+ * @param filter Optionally filter by monitor name. Example: $filter=monitorName eq
+ * 'logical-disks|C:|disk-free-space-mb.'.
+ * @param expand Optionally expand the monitor’s evidence and/or configuration. Example:
+ * $expand=evidence,configuration.
+ * @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 current health status of all monitors of a virtual machine.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(
+ String subscriptionId,
+ String resourceGroupName,
+ String providerName,
+ String resourceCollectionName,
+ String resourceName,
+ String filter,
+ String expand,
+ Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (subscriptionId == null) {
+ return Mono.error(new IllegalArgumentException("Parameter subscriptionId is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (providerName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter providerName is required and cannot be null."));
+ }
+ if (resourceCollectionName == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException("Parameter resourceCollectionName is required and cannot be null."));
+ }
+ if (resourceName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resourceName 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(),
+ subscriptionId,
+ resourceGroupName,
+ providerName,
+ resourceCollectionName,
+ resourceName,
+ filter,
+ expand,
+ accept,
+ context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * Get the current health status of all monitors of a virtual machine. Optional parameters: $expand (retrieve the
+ * monitor's evidence and configuration) and $filter (filter by monitor name).
+ *
+ * @param subscriptionId The subscription Id of the virtual machine.
+ * @param resourceGroupName The resource group of the virtual machine.
+ * @param providerName The provider name (ex: Microsoft.Compute for virtual machines).
+ * @param resourceCollectionName The resource collection name (ex: virtualMachines for virtual machines).
+ * @param resourceName The name of the virtual machine.
+ * @param filter Optionally filter by monitor name. Example: $filter=monitorName eq
+ * 'logical-disks|C:|disk-free-space-mb.'.
+ * @param expand Optionally expand the monitor’s evidence and/or configuration. Example:
+ * $expand=evidence,configuration.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the current health status of all monitors of a virtual machine.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(
+ String subscriptionId,
+ String resourceGroupName,
+ String providerName,
+ String resourceCollectionName,
+ String resourceName,
+ String filter,
+ String expand) {
+ return new PagedFlux<>(
+ () ->
+ listSinglePageAsync(
+ subscriptionId,
+ resourceGroupName,
+ providerName,
+ resourceCollectionName,
+ resourceName,
+ filter,
+ expand),
+ nextLink -> listNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Get the current health status of all monitors of a virtual machine. Optional parameters: $expand (retrieve the
+ * monitor's evidence and configuration) and $filter (filter by monitor name).
+ *
+ * @param subscriptionId The subscription Id of the virtual machine.
+ * @param resourceGroupName The resource group of the virtual machine.
+ * @param providerName The provider name (ex: Microsoft.Compute for virtual machines).
+ * @param resourceCollectionName The resource collection name (ex: virtualMachines for virtual machines).
+ * @param resourceName The name of the virtual machine.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the current health status of all monitors of a virtual machine.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(
+ String subscriptionId,
+ String resourceGroupName,
+ String providerName,
+ String resourceCollectionName,
+ String resourceName) {
+ final String filter = null;
+ final String expand = null;
+ return new PagedFlux<>(
+ () ->
+ listSinglePageAsync(
+ subscriptionId,
+ resourceGroupName,
+ providerName,
+ resourceCollectionName,
+ resourceName,
+ filter,
+ expand),
+ nextLink -> listNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Get the current health status of all monitors of a virtual machine. Optional parameters: $expand (retrieve the
+ * monitor's evidence and configuration) and $filter (filter by monitor name).
+ *
+ * @param subscriptionId The subscription Id of the virtual machine.
+ * @param resourceGroupName The resource group of the virtual machine.
+ * @param providerName The provider name (ex: Microsoft.Compute for virtual machines).
+ * @param resourceCollectionName The resource collection name (ex: virtualMachines for virtual machines).
+ * @param resourceName The name of the virtual machine.
+ * @param filter Optionally filter by monitor name. Example: $filter=monitorName eq
+ * 'logical-disks|C:|disk-free-space-mb.'.
+ * @param expand Optionally expand the monitor’s evidence and/or configuration. Example:
+ * $expand=evidence,configuration.
+ * @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 current health status of all monitors of a virtual machine.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(
+ String subscriptionId,
+ String resourceGroupName,
+ String providerName,
+ String resourceCollectionName,
+ String resourceName,
+ String filter,
+ String expand,
+ Context context) {
+ return new PagedFlux<>(
+ () ->
+ listSinglePageAsync(
+ subscriptionId,
+ resourceGroupName,
+ providerName,
+ resourceCollectionName,
+ resourceName,
+ filter,
+ expand,
+ context),
+ nextLink -> listNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * Get the current health status of all monitors of a virtual machine. Optional parameters: $expand (retrieve the
+ * monitor's evidence and configuration) and $filter (filter by monitor name).
+ *
+ * @param subscriptionId The subscription Id of the virtual machine.
+ * @param resourceGroupName The resource group of the virtual machine.
+ * @param providerName The provider name (ex: Microsoft.Compute for virtual machines).
+ * @param resourceCollectionName The resource collection name (ex: virtualMachines for virtual machines).
+ * @param resourceName The name of the virtual machine.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the current health status of all monitors of a virtual machine.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(
+ String subscriptionId,
+ String resourceGroupName,
+ String providerName,
+ String resourceCollectionName,
+ String resourceName) {
+ final String filter = null;
+ final String expand = null;
+ return new PagedIterable<>(
+ listAsync(
+ subscriptionId, resourceGroupName, providerName, resourceCollectionName, resourceName, filter, expand));
+ }
+
+ /**
+ * Get the current health status of all monitors of a virtual machine. Optional parameters: $expand (retrieve the
+ * monitor's evidence and configuration) and $filter (filter by monitor name).
+ *
+ * @param subscriptionId The subscription Id of the virtual machine.
+ * @param resourceGroupName The resource group of the virtual machine.
+ * @param providerName The provider name (ex: Microsoft.Compute for virtual machines).
+ * @param resourceCollectionName The resource collection name (ex: virtualMachines for virtual machines).
+ * @param resourceName The name of the virtual machine.
+ * @param filter Optionally filter by monitor name. Example: $filter=monitorName eq
+ * 'logical-disks|C:|disk-free-space-mb.'.
+ * @param expand Optionally expand the monitor’s evidence and/or configuration. Example:
+ * $expand=evidence,configuration.
+ * @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 current health status of all monitors of a virtual machine.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(
+ String subscriptionId,
+ String resourceGroupName,
+ String providerName,
+ String resourceCollectionName,
+ String resourceName,
+ String filter,
+ String expand,
+ Context context) {
+ return new PagedIterable<>(
+ listAsync(
+ subscriptionId,
+ resourceGroupName,
+ providerName,
+ resourceCollectionName,
+ resourceName,
+ filter,
+ expand,
+ context));
+ }
+
+ /**
+ * Get the current health status of a monitor of a virtual machine. Optional parameter: $expand (retrieve the
+ * monitor's evidence and configuration).
+ *
+ * @param subscriptionId The subscription Id of the virtual machine.
+ * @param resourceGroupName The resource group of the virtual machine.
+ * @param providerName The provider name (ex: Microsoft.Compute for virtual machines).
+ * @param resourceCollectionName The resource collection name (ex: virtualMachines for virtual machines).
+ * @param resourceName The name of the virtual machine.
+ * @param monitorId The monitor Id of the virtual machine.
+ * @param expand Optionally expand the monitor’s evidence and/or configuration. Example:
+ * $expand=evidence,configuration.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the current health status of a monitor of a virtual machine.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String subscriptionId,
+ String resourceGroupName,
+ String providerName,
+ String resourceCollectionName,
+ String resourceName,
+ String monitorId,
+ String expand) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (subscriptionId == null) {
+ return Mono.error(new IllegalArgumentException("Parameter subscriptionId is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (providerName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter providerName is required and cannot be null."));
+ }
+ if (resourceCollectionName == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException("Parameter resourceCollectionName is required and cannot be null."));
+ }
+ if (resourceName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null."));
+ }
+ if (monitorId == null) {
+ return Mono.error(new IllegalArgumentException("Parameter monitorId is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .get(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ subscriptionId,
+ resourceGroupName,
+ providerName,
+ resourceCollectionName,
+ resourceName,
+ monitorId,
+ expand,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the current health status of a monitor of a virtual machine. Optional parameter: $expand (retrieve the
+ * monitor's evidence and configuration).
+ *
+ * @param subscriptionId The subscription Id of the virtual machine.
+ * @param resourceGroupName The resource group of the virtual machine.
+ * @param providerName The provider name (ex: Microsoft.Compute for virtual machines).
+ * @param resourceCollectionName The resource collection name (ex: virtualMachines for virtual machines).
+ * @param resourceName The name of the virtual machine.
+ * @param monitorId The monitor Id of the virtual machine.
+ * @param expand Optionally expand the monitor’s evidence and/or configuration. Example:
+ * $expand=evidence,configuration.
+ * @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 current health status of a monitor of a virtual machine.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String subscriptionId,
+ String resourceGroupName,
+ String providerName,
+ String resourceCollectionName,
+ String resourceName,
+ String monitorId,
+ String expand,
+ Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (subscriptionId == null) {
+ return Mono.error(new IllegalArgumentException("Parameter subscriptionId is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (providerName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter providerName is required and cannot be null."));
+ }
+ if (resourceCollectionName == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException("Parameter resourceCollectionName is required and cannot be null."));
+ }
+ if (resourceName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null."));
+ }
+ if (monitorId == null) {
+ return Mono.error(new IllegalArgumentException("Parameter monitorId 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(),
+ subscriptionId,
+ resourceGroupName,
+ providerName,
+ resourceCollectionName,
+ resourceName,
+ monitorId,
+ expand,
+ accept,
+ context);
+ }
+
+ /**
+ * Get the current health status of a monitor of a virtual machine. Optional parameter: $expand (retrieve the
+ * monitor's evidence and configuration).
+ *
+ * @param subscriptionId The subscription Id of the virtual machine.
+ * @param resourceGroupName The resource group of the virtual machine.
+ * @param providerName The provider name (ex: Microsoft.Compute for virtual machines).
+ * @param resourceCollectionName The resource collection name (ex: virtualMachines for virtual machines).
+ * @param resourceName The name of the virtual machine.
+ * @param monitorId The monitor Id of the virtual machine.
+ * @param expand Optionally expand the monitor’s evidence and/or configuration. Example:
+ * $expand=evidence,configuration.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the current health status of a monitor of a virtual machine.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync(
+ String subscriptionId,
+ String resourceGroupName,
+ String providerName,
+ String resourceCollectionName,
+ String resourceName,
+ String monitorId,
+ String expand) {
+ return getWithResponseAsync(
+ subscriptionId,
+ resourceGroupName,
+ providerName,
+ resourceCollectionName,
+ resourceName,
+ monitorId,
+ expand)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * Get the current health status of a monitor of a virtual machine. Optional parameter: $expand (retrieve the
+ * monitor's evidence and configuration).
+ *
+ * @param subscriptionId The subscription Id of the virtual machine.
+ * @param resourceGroupName The resource group of the virtual machine.
+ * @param providerName The provider name (ex: Microsoft.Compute for virtual machines).
+ * @param resourceCollectionName The resource collection name (ex: virtualMachines for virtual machines).
+ * @param resourceName The name of the virtual machine.
+ * @param monitorId The monitor Id of the virtual machine.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the current health status of a monitor of a virtual machine.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync(
+ String subscriptionId,
+ String resourceGroupName,
+ String providerName,
+ String resourceCollectionName,
+ String resourceName,
+ String monitorId) {
+ final String expand = null;
+ return getWithResponseAsync(
+ subscriptionId,
+ resourceGroupName,
+ providerName,
+ resourceCollectionName,
+ resourceName,
+ monitorId,
+ expand)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * Get the current health status of a monitor of a virtual machine. Optional parameter: $expand (retrieve the
+ * monitor's evidence and configuration).
+ *
+ * @param subscriptionId The subscription Id of the virtual machine.
+ * @param resourceGroupName The resource group of the virtual machine.
+ * @param providerName The provider name (ex: Microsoft.Compute for virtual machines).
+ * @param resourceCollectionName The resource collection name (ex: virtualMachines for virtual machines).
+ * @param resourceName The name of the virtual machine.
+ * @param monitorId The monitor Id of the virtual machine.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the current health status of a monitor of a virtual machine.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public HealthMonitorInner get(
+ String subscriptionId,
+ String resourceGroupName,
+ String providerName,
+ String resourceCollectionName,
+ String resourceName,
+ String monitorId) {
+ final String expand = null;
+ return getAsync(
+ subscriptionId,
+ resourceGroupName,
+ providerName,
+ resourceCollectionName,
+ resourceName,
+ monitorId,
+ expand)
+ .block();
+ }
+
+ /**
+ * Get the current health status of a monitor of a virtual machine. Optional parameter: $expand (retrieve the
+ * monitor's evidence and configuration).
+ *
+ * @param subscriptionId The subscription Id of the virtual machine.
+ * @param resourceGroupName The resource group of the virtual machine.
+ * @param providerName The provider name (ex: Microsoft.Compute for virtual machines).
+ * @param resourceCollectionName The resource collection name (ex: virtualMachines for virtual machines).
+ * @param resourceName The name of the virtual machine.
+ * @param monitorId The monitor Id of the virtual machine.
+ * @param expand Optionally expand the monitor’s evidence and/or configuration. Example:
+ * $expand=evidence,configuration.
+ * @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 current health status of a monitor of a virtual machine.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getWithResponse(
+ String subscriptionId,
+ String resourceGroupName,
+ String providerName,
+ String resourceCollectionName,
+ String resourceName,
+ String monitorId,
+ String expand,
+ Context context) {
+ return getWithResponseAsync(
+ subscriptionId,
+ resourceGroupName,
+ providerName,
+ resourceCollectionName,
+ resourceName,
+ monitorId,
+ expand,
+ context)
+ .block();
+ }
+
+ /**
+ * Get the health state changes of a monitor of a virtual machine within the provided time window (default is the
+ * last 24 hours). Optional parameters: $expand (retrieve the monitor's evidence and configuration) and $filter
+ * (filter by heartbeat condition).
+ *
+ * @param subscriptionId The subscription Id of the virtual machine.
+ * @param resourceGroupName The resource group of the virtual machine.
+ * @param providerName The provider name (ex: Microsoft.Compute for virtual machines).
+ * @param resourceCollectionName The resource collection name (ex: virtualMachines for virtual machines).
+ * @param resourceName The name of the virtual machine.
+ * @param monitorId The monitor Id of the virtual machine.
+ * @param filter Optionally filter by heartbeat condition. Example: $filter=isHeartbeat eq false.
+ * @param expand Optionally expand the monitor’s evidence and/or configuration. Example:
+ * $expand=evidence,configuration.
+ * @param startTimestampUtc The start of the time window.
+ * @param endTimestampUtc The end of the time window.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the health state changes of a monitor of a virtual machine within the provided time window (default is
+ * the last 24 hours).
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listStateChangesSinglePageAsync(
+ String subscriptionId,
+ String resourceGroupName,
+ String providerName,
+ String resourceCollectionName,
+ String resourceName,
+ String monitorId,
+ String filter,
+ String expand,
+ OffsetDateTime startTimestampUtc,
+ OffsetDateTime endTimestampUtc) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (subscriptionId == null) {
+ return Mono.error(new IllegalArgumentException("Parameter subscriptionId is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (providerName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter providerName is required and cannot be null."));
+ }
+ if (resourceCollectionName == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException("Parameter resourceCollectionName is required and cannot be null."));
+ }
+ if (resourceName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null."));
+ }
+ if (monitorId == null) {
+ return Mono.error(new IllegalArgumentException("Parameter monitorId is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .listStateChanges(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ subscriptionId,
+ resourceGroupName,
+ providerName,
+ resourceCollectionName,
+ resourceName,
+ monitorId,
+ filter,
+ expand,
+ startTimestampUtc,
+ endTimestampUtc,
+ 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 health state changes of a monitor of a virtual machine within the provided time window (default is the
+ * last 24 hours). Optional parameters: $expand (retrieve the monitor's evidence and configuration) and $filter
+ * (filter by heartbeat condition).
+ *
+ * @param subscriptionId The subscription Id of the virtual machine.
+ * @param resourceGroupName The resource group of the virtual machine.
+ * @param providerName The provider name (ex: Microsoft.Compute for virtual machines).
+ * @param resourceCollectionName The resource collection name (ex: virtualMachines for virtual machines).
+ * @param resourceName The name of the virtual machine.
+ * @param monitorId The monitor Id of the virtual machine.
+ * @param filter Optionally filter by heartbeat condition. Example: $filter=isHeartbeat eq false.
+ * @param expand Optionally expand the monitor’s evidence and/or configuration. Example:
+ * $expand=evidence,configuration.
+ * @param startTimestampUtc The start of the time window.
+ * @param endTimestampUtc The end of the time window.
+ * @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 health state changes of a monitor of a virtual machine within the provided time window (default is
+ * the last 24 hours).
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listStateChangesSinglePageAsync(
+ String subscriptionId,
+ String resourceGroupName,
+ String providerName,
+ String resourceCollectionName,
+ String resourceName,
+ String monitorId,
+ String filter,
+ String expand,
+ OffsetDateTime startTimestampUtc,
+ OffsetDateTime endTimestampUtc,
+ Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (subscriptionId == null) {
+ return Mono.error(new IllegalArgumentException("Parameter subscriptionId is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (providerName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter providerName is required and cannot be null."));
+ }
+ if (resourceCollectionName == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException("Parameter resourceCollectionName is required and cannot be null."));
+ }
+ if (resourceName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null."));
+ }
+ if (monitorId == null) {
+ return Mono.error(new IllegalArgumentException("Parameter monitorId is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listStateChanges(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ subscriptionId,
+ resourceGroupName,
+ providerName,
+ resourceCollectionName,
+ resourceName,
+ monitorId,
+ filter,
+ expand,
+ startTimestampUtc,
+ endTimestampUtc,
+ accept,
+ context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * Get the health state changes of a monitor of a virtual machine within the provided time window (default is the
+ * last 24 hours). Optional parameters: $expand (retrieve the monitor's evidence and configuration) and $filter
+ * (filter by heartbeat condition).
+ *
+ * @param subscriptionId The subscription Id of the virtual machine.
+ * @param resourceGroupName The resource group of the virtual machine.
+ * @param providerName The provider name (ex: Microsoft.Compute for virtual machines).
+ * @param resourceCollectionName The resource collection name (ex: virtualMachines for virtual machines).
+ * @param resourceName The name of the virtual machine.
+ * @param monitorId The monitor Id of the virtual machine.
+ * @param filter Optionally filter by heartbeat condition. Example: $filter=isHeartbeat eq false.
+ * @param expand Optionally expand the monitor’s evidence and/or configuration. Example:
+ * $expand=evidence,configuration.
+ * @param startTimestampUtc The start of the time window.
+ * @param endTimestampUtc The end of the time window.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the health state changes of a monitor of a virtual machine within the provided time window (default is
+ * the last 24 hours).
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listStateChangesAsync(
+ String subscriptionId,
+ String resourceGroupName,
+ String providerName,
+ String resourceCollectionName,
+ String resourceName,
+ String monitorId,
+ String filter,
+ String expand,
+ OffsetDateTime startTimestampUtc,
+ OffsetDateTime endTimestampUtc) {
+ return new PagedFlux<>(
+ () ->
+ listStateChangesSinglePageAsync(
+ subscriptionId,
+ resourceGroupName,
+ providerName,
+ resourceCollectionName,
+ resourceName,
+ monitorId,
+ filter,
+ expand,
+ startTimestampUtc,
+ endTimestampUtc),
+ nextLink -> listStateChangesNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Get the health state changes of a monitor of a virtual machine within the provided time window (default is the
+ * last 24 hours). Optional parameters: $expand (retrieve the monitor's evidence and configuration) and $filter
+ * (filter by heartbeat condition).
+ *
+ * @param subscriptionId The subscription Id of the virtual machine.
+ * @param resourceGroupName The resource group of the virtual machine.
+ * @param providerName The provider name (ex: Microsoft.Compute for virtual machines).
+ * @param resourceCollectionName The resource collection name (ex: virtualMachines for virtual machines).
+ * @param resourceName The name of the virtual machine.
+ * @param monitorId The monitor Id of the virtual machine.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the health state changes of a monitor of a virtual machine within the provided time window (default is
+ * the last 24 hours).
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listStateChangesAsync(
+ String subscriptionId,
+ String resourceGroupName,
+ String providerName,
+ String resourceCollectionName,
+ String resourceName,
+ String monitorId) {
+ final String filter = null;
+ final String expand = null;
+ final OffsetDateTime startTimestampUtc = null;
+ final OffsetDateTime endTimestampUtc = null;
+ return new PagedFlux<>(
+ () ->
+ listStateChangesSinglePageAsync(
+ subscriptionId,
+ resourceGroupName,
+ providerName,
+ resourceCollectionName,
+ resourceName,
+ monitorId,
+ filter,
+ expand,
+ startTimestampUtc,
+ endTimestampUtc),
+ nextLink -> listStateChangesNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Get the health state changes of a monitor of a virtual machine within the provided time window (default is the
+ * last 24 hours). Optional parameters: $expand (retrieve the monitor's evidence and configuration) and $filter
+ * (filter by heartbeat condition).
+ *
+ * @param subscriptionId The subscription Id of the virtual machine.
+ * @param resourceGroupName The resource group of the virtual machine.
+ * @param providerName The provider name (ex: Microsoft.Compute for virtual machines).
+ * @param resourceCollectionName The resource collection name (ex: virtualMachines for virtual machines).
+ * @param resourceName The name of the virtual machine.
+ * @param monitorId The monitor Id of the virtual machine.
+ * @param filter Optionally filter by heartbeat condition. Example: $filter=isHeartbeat eq false.
+ * @param expand Optionally expand the monitor’s evidence and/or configuration. Example:
+ * $expand=evidence,configuration.
+ * @param startTimestampUtc The start of the time window.
+ * @param endTimestampUtc The end of the time window.
+ * @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 health state changes of a monitor of a virtual machine within the provided time window (default is
+ * the last 24 hours).
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listStateChangesAsync(
+ String subscriptionId,
+ String resourceGroupName,
+ String providerName,
+ String resourceCollectionName,
+ String resourceName,
+ String monitorId,
+ String filter,
+ String expand,
+ OffsetDateTime startTimestampUtc,
+ OffsetDateTime endTimestampUtc,
+ Context context) {
+ return new PagedFlux<>(
+ () ->
+ listStateChangesSinglePageAsync(
+ subscriptionId,
+ resourceGroupName,
+ providerName,
+ resourceCollectionName,
+ resourceName,
+ monitorId,
+ filter,
+ expand,
+ startTimestampUtc,
+ endTimestampUtc,
+ context),
+ nextLink -> listStateChangesNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * Get the health state changes of a monitor of a virtual machine within the provided time window (default is the
+ * last 24 hours). Optional parameters: $expand (retrieve the monitor's evidence and configuration) and $filter
+ * (filter by heartbeat condition).
+ *
+ * @param subscriptionId The subscription Id of the virtual machine.
+ * @param resourceGroupName The resource group of the virtual machine.
+ * @param providerName The provider name (ex: Microsoft.Compute for virtual machines).
+ * @param resourceCollectionName The resource collection name (ex: virtualMachines for virtual machines).
+ * @param resourceName The name of the virtual machine.
+ * @param monitorId The monitor Id of the virtual machine.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the health state changes of a monitor of a virtual machine within the provided time window (default is
+ * the last 24 hours).
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listStateChanges(
+ String subscriptionId,
+ String resourceGroupName,
+ String providerName,
+ String resourceCollectionName,
+ String resourceName,
+ String monitorId) {
+ final String filter = null;
+ final String expand = null;
+ final OffsetDateTime startTimestampUtc = null;
+ final OffsetDateTime endTimestampUtc = null;
+ return new PagedIterable<>(
+ listStateChangesAsync(
+ subscriptionId,
+ resourceGroupName,
+ providerName,
+ resourceCollectionName,
+ resourceName,
+ monitorId,
+ filter,
+ expand,
+ startTimestampUtc,
+ endTimestampUtc));
+ }
+
+ /**
+ * Get the health state changes of a monitor of a virtual machine within the provided time window (default is the
+ * last 24 hours). Optional parameters: $expand (retrieve the monitor's evidence and configuration) and $filter
+ * (filter by heartbeat condition).
+ *
+ * @param subscriptionId The subscription Id of the virtual machine.
+ * @param resourceGroupName The resource group of the virtual machine.
+ * @param providerName The provider name (ex: Microsoft.Compute for virtual machines).
+ * @param resourceCollectionName The resource collection name (ex: virtualMachines for virtual machines).
+ * @param resourceName The name of the virtual machine.
+ * @param monitorId The monitor Id of the virtual machine.
+ * @param filter Optionally filter by heartbeat condition. Example: $filter=isHeartbeat eq false.
+ * @param expand Optionally expand the monitor’s evidence and/or configuration. Example:
+ * $expand=evidence,configuration.
+ * @param startTimestampUtc The start of the time window.
+ * @param endTimestampUtc The end of the time window.
+ * @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 health state changes of a monitor of a virtual machine within the provided time window (default is
+ * the last 24 hours).
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listStateChanges(
+ String subscriptionId,
+ String resourceGroupName,
+ String providerName,
+ String resourceCollectionName,
+ String resourceName,
+ String monitorId,
+ String filter,
+ String expand,
+ OffsetDateTime startTimestampUtc,
+ OffsetDateTime endTimestampUtc,
+ Context context) {
+ return new PagedIterable<>(
+ listStateChangesAsync(
+ subscriptionId,
+ resourceGroupName,
+ providerName,
+ resourceCollectionName,
+ resourceName,
+ monitorId,
+ filter,
+ expand,
+ startTimestampUtc,
+ endTimestampUtc,
+ context));
+ }
+
+ /**
+ * Get the health state change of a monitor of a virtual machine at the provided timestamp. Optional parameter:
+ * $expand (retrieve the monitor's evidence and configuration).
+ *
+ * @param subscriptionId The subscription Id of the virtual machine.
+ * @param resourceGroupName The resource group of the virtual machine.
+ * @param providerName The provider name (ex: Microsoft.Compute for virtual machines).
+ * @param resourceCollectionName The resource collection name (ex: virtualMachines for virtual machines).
+ * @param resourceName The name of the virtual machine.
+ * @param monitorId The monitor Id of the virtual machine.
+ * @param timestampUnix The timestamp of the state change (unix format).
+ * @param expand Optionally expand the monitor’s evidence and/or configuration. Example:
+ * $expand=evidence,configuration.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the health state change of a monitor of a virtual machine at the provided timestamp.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getStateChangeWithResponseAsync(
+ String subscriptionId,
+ String resourceGroupName,
+ String providerName,
+ String resourceCollectionName,
+ String resourceName,
+ String monitorId,
+ String timestampUnix,
+ String expand) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (subscriptionId == null) {
+ return Mono.error(new IllegalArgumentException("Parameter subscriptionId is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (providerName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter providerName is required and cannot be null."));
+ }
+ if (resourceCollectionName == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException("Parameter resourceCollectionName is required and cannot be null."));
+ }
+ if (resourceName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null."));
+ }
+ if (monitorId == null) {
+ return Mono.error(new IllegalArgumentException("Parameter monitorId is required and cannot be null."));
+ }
+ if (timestampUnix == null) {
+ return Mono.error(new IllegalArgumentException("Parameter timestampUnix is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .getStateChange(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ subscriptionId,
+ resourceGroupName,
+ providerName,
+ resourceCollectionName,
+ resourceName,
+ monitorId,
+ timestampUnix,
+ expand,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the health state change of a monitor of a virtual machine at the provided timestamp. Optional parameter:
+ * $expand (retrieve the monitor's evidence and configuration).
+ *
+ * @param subscriptionId The subscription Id of the virtual machine.
+ * @param resourceGroupName The resource group of the virtual machine.
+ * @param providerName The provider name (ex: Microsoft.Compute for virtual machines).
+ * @param resourceCollectionName The resource collection name (ex: virtualMachines for virtual machines).
+ * @param resourceName The name of the virtual machine.
+ * @param monitorId The monitor Id of the virtual machine.
+ * @param timestampUnix The timestamp of the state change (unix format).
+ * @param expand Optionally expand the monitor’s evidence and/or configuration. Example:
+ * $expand=evidence,configuration.
+ * @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 health state change of a monitor of a virtual machine at the provided timestamp.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getStateChangeWithResponseAsync(
+ String subscriptionId,
+ String resourceGroupName,
+ String providerName,
+ String resourceCollectionName,
+ String resourceName,
+ String monitorId,
+ String timestampUnix,
+ String expand,
+ Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (subscriptionId == null) {
+ return Mono.error(new IllegalArgumentException("Parameter subscriptionId is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (providerName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter providerName is required and cannot be null."));
+ }
+ if (resourceCollectionName == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException("Parameter resourceCollectionName is required and cannot be null."));
+ }
+ if (resourceName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null."));
+ }
+ if (monitorId == null) {
+ return Mono.error(new IllegalArgumentException("Parameter monitorId is required and cannot be null."));
+ }
+ if (timestampUnix == null) {
+ return Mono.error(new IllegalArgumentException("Parameter timestampUnix is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .getStateChange(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ subscriptionId,
+ resourceGroupName,
+ providerName,
+ resourceCollectionName,
+ resourceName,
+ monitorId,
+ timestampUnix,
+ expand,
+ accept,
+ context);
+ }
+
+ /**
+ * Get the health state change of a monitor of a virtual machine at the provided timestamp. Optional parameter:
+ * $expand (retrieve the monitor's evidence and configuration).
+ *
+ * @param subscriptionId The subscription Id of the virtual machine.
+ * @param resourceGroupName The resource group of the virtual machine.
+ * @param providerName The provider name (ex: Microsoft.Compute for virtual machines).
+ * @param resourceCollectionName The resource collection name (ex: virtualMachines for virtual machines).
+ * @param resourceName The name of the virtual machine.
+ * @param monitorId The monitor Id of the virtual machine.
+ * @param timestampUnix The timestamp of the state change (unix format).
+ * @param expand Optionally expand the monitor’s evidence and/or configuration. Example:
+ * $expand=evidence,configuration.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the health state change of a monitor of a virtual machine at the provided timestamp.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getStateChangeAsync(
+ String subscriptionId,
+ String resourceGroupName,
+ String providerName,
+ String resourceCollectionName,
+ String resourceName,
+ String monitorId,
+ String timestampUnix,
+ String expand) {
+ return getStateChangeWithResponseAsync(
+ subscriptionId,
+ resourceGroupName,
+ providerName,
+ resourceCollectionName,
+ resourceName,
+ monitorId,
+ timestampUnix,
+ expand)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * Get the health state change of a monitor of a virtual machine at the provided timestamp. Optional parameter:
+ * $expand (retrieve the monitor's evidence and configuration).
+ *
+ * @param subscriptionId The subscription Id of the virtual machine.
+ * @param resourceGroupName The resource group of the virtual machine.
+ * @param providerName The provider name (ex: Microsoft.Compute for virtual machines).
+ * @param resourceCollectionName The resource collection name (ex: virtualMachines for virtual machines).
+ * @param resourceName The name of the virtual machine.
+ * @param monitorId The monitor Id of the virtual machine.
+ * @param timestampUnix The timestamp of the state change (unix format).
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the health state change of a monitor of a virtual machine at the provided timestamp.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getStateChangeAsync(
+ String subscriptionId,
+ String resourceGroupName,
+ String providerName,
+ String resourceCollectionName,
+ String resourceName,
+ String monitorId,
+ String timestampUnix) {
+ final String expand = null;
+ return getStateChangeWithResponseAsync(
+ subscriptionId,
+ resourceGroupName,
+ providerName,
+ resourceCollectionName,
+ resourceName,
+ monitorId,
+ timestampUnix,
+ expand)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * Get the health state change of a monitor of a virtual machine at the provided timestamp. Optional parameter:
+ * $expand (retrieve the monitor's evidence and configuration).
+ *
+ * @param subscriptionId The subscription Id of the virtual machine.
+ * @param resourceGroupName The resource group of the virtual machine.
+ * @param providerName The provider name (ex: Microsoft.Compute for virtual machines).
+ * @param resourceCollectionName The resource collection name (ex: virtualMachines for virtual machines).
+ * @param resourceName The name of the virtual machine.
+ * @param monitorId The monitor Id of the virtual machine.
+ * @param timestampUnix The timestamp of the state change (unix format).
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the health state change of a monitor of a virtual machine at the provided timestamp.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public HealthMonitorStateChangeInner getStateChange(
+ String subscriptionId,
+ String resourceGroupName,
+ String providerName,
+ String resourceCollectionName,
+ String resourceName,
+ String monitorId,
+ String timestampUnix) {
+ final String expand = null;
+ return getStateChangeAsync(
+ subscriptionId,
+ resourceGroupName,
+ providerName,
+ resourceCollectionName,
+ resourceName,
+ monitorId,
+ timestampUnix,
+ expand)
+ .block();
+ }
+
+ /**
+ * Get the health state change of a monitor of a virtual machine at the provided timestamp. Optional parameter:
+ * $expand (retrieve the monitor's evidence and configuration).
+ *
+ * @param subscriptionId The subscription Id of the virtual machine.
+ * @param resourceGroupName The resource group of the virtual machine.
+ * @param providerName The provider name (ex: Microsoft.Compute for virtual machines).
+ * @param resourceCollectionName The resource collection name (ex: virtualMachines for virtual machines).
+ * @param resourceName The name of the virtual machine.
+ * @param monitorId The monitor Id of the virtual machine.
+ * @param timestampUnix The timestamp of the state change (unix format).
+ * @param expand Optionally expand the monitor’s evidence and/or configuration. Example:
+ * $expand=evidence,configuration.
+ * @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 health state change of a monitor of a virtual machine at the provided timestamp.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getStateChangeWithResponse(
+ String subscriptionId,
+ String resourceGroupName,
+ String providerName,
+ String resourceCollectionName,
+ String resourceName,
+ String monitorId,
+ String timestampUnix,
+ String expand,
+ Context context) {
+ return getStateChangeWithResponseAsync(
+ subscriptionId,
+ resourceGroupName,
+ providerName,
+ resourceCollectionName,
+ resourceName,
+ monitorId,
+ timestampUnix,
+ expand,
+ 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 information about the current health statuses of the monitors.
+ */
+ @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 information about the current health statuses of the monitors.
+ */
+ @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 information about the health state changes of the monitor within the provided time window.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listStateChangesNextSinglePageAsync(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.listStateChangesNext(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 information about the health state changes of the monitor within the provided time window.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listStateChangesNextSinglePageAsync(
+ 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
+ .listStateChangesNext(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/workloadmonitor/azure-resourcemanager-workloadmonitor/src/main/java/com/azure/resourcemanager/workloadmonitor/implementation/HealthMonitorsImpl.java b/sdk/workloadmonitor/azure-resourcemanager-workloadmonitor/src/main/java/com/azure/resourcemanager/workloadmonitor/implementation/HealthMonitorsImpl.java
new file mode 100644
index 000000000000..22be1166e118
--- /dev/null
+++ b/sdk/workloadmonitor/azure-resourcemanager-workloadmonitor/src/main/java/com/azure/resourcemanager/workloadmonitor/implementation/HealthMonitorsImpl.java
@@ -0,0 +1,234 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.workloadmonitor.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.workloadmonitor.fluent.HealthMonitorsClient;
+import com.azure.resourcemanager.workloadmonitor.fluent.models.HealthMonitorInner;
+import com.azure.resourcemanager.workloadmonitor.fluent.models.HealthMonitorStateChangeInner;
+import com.azure.resourcemanager.workloadmonitor.models.HealthMonitor;
+import com.azure.resourcemanager.workloadmonitor.models.HealthMonitorStateChange;
+import com.azure.resourcemanager.workloadmonitor.models.HealthMonitors;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import java.time.OffsetDateTime;
+
+public final class HealthMonitorsImpl implements HealthMonitors {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(HealthMonitorsImpl.class);
+
+ private final HealthMonitorsClient innerClient;
+
+ private final com.azure.resourcemanager.workloadmonitor.WorkloadMonitorManager serviceManager;
+
+ public HealthMonitorsImpl(
+ HealthMonitorsClient innerClient,
+ com.azure.resourcemanager.workloadmonitor.WorkloadMonitorManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public PagedIterable list(
+ String subscriptionId,
+ String resourceGroupName,
+ String providerName,
+ String resourceCollectionName,
+ String resourceName) {
+ PagedIterable inner =
+ this
+ .serviceClient()
+ .list(subscriptionId, resourceGroupName, providerName, resourceCollectionName, resourceName);
+ return Utils.mapPage(inner, inner1 -> new HealthMonitorImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list(
+ String subscriptionId,
+ String resourceGroupName,
+ String providerName,
+ String resourceCollectionName,
+ String resourceName,
+ String filter,
+ String expand,
+ Context context) {
+ PagedIterable inner =
+ this
+ .serviceClient()
+ .list(
+ subscriptionId,
+ resourceGroupName,
+ providerName,
+ resourceCollectionName,
+ resourceName,
+ filter,
+ expand,
+ context);
+ return Utils.mapPage(inner, inner1 -> new HealthMonitorImpl(inner1, this.manager()));
+ }
+
+ public HealthMonitor get(
+ String subscriptionId,
+ String resourceGroupName,
+ String providerName,
+ String resourceCollectionName,
+ String resourceName,
+ String monitorId) {
+ HealthMonitorInner inner =
+ this
+ .serviceClient()
+ .get(subscriptionId, resourceGroupName, providerName, resourceCollectionName, resourceName, monitorId);
+ if (inner != null) {
+ return new HealthMonitorImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response getWithResponse(
+ String subscriptionId,
+ String resourceGroupName,
+ String providerName,
+ String resourceCollectionName,
+ String resourceName,
+ String monitorId,
+ String expand,
+ Context context) {
+ Response inner =
+ this
+ .serviceClient()
+ .getWithResponse(
+ subscriptionId,
+ resourceGroupName,
+ providerName,
+ resourceCollectionName,
+ resourceName,
+ monitorId,
+ expand,
+ context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new HealthMonitorImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public PagedIterable listStateChanges(
+ String subscriptionId,
+ String resourceGroupName,
+ String providerName,
+ String resourceCollectionName,
+ String resourceName,
+ String monitorId) {
+ PagedIterable inner =
+ this
+ .serviceClient()
+ .listStateChanges(
+ subscriptionId, resourceGroupName, providerName, resourceCollectionName, resourceName, monitorId);
+ return Utils.mapPage(inner, inner1 -> new HealthMonitorStateChangeImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable listStateChanges(
+ String subscriptionId,
+ String resourceGroupName,
+ String providerName,
+ String resourceCollectionName,
+ String resourceName,
+ String monitorId,
+ String filter,
+ String expand,
+ OffsetDateTime startTimestampUtc,
+ OffsetDateTime endTimestampUtc,
+ Context context) {
+ PagedIterable inner =
+ this
+ .serviceClient()
+ .listStateChanges(
+ subscriptionId,
+ resourceGroupName,
+ providerName,
+ resourceCollectionName,
+ resourceName,
+ monitorId,
+ filter,
+ expand,
+ startTimestampUtc,
+ endTimestampUtc,
+ context);
+ return Utils.mapPage(inner, inner1 -> new HealthMonitorStateChangeImpl(inner1, this.manager()));
+ }
+
+ public HealthMonitorStateChange getStateChange(
+ String subscriptionId,
+ String resourceGroupName,
+ String providerName,
+ String resourceCollectionName,
+ String resourceName,
+ String monitorId,
+ String timestampUnix) {
+ HealthMonitorStateChangeInner inner =
+ this
+ .serviceClient()
+ .getStateChange(
+ subscriptionId,
+ resourceGroupName,
+ providerName,
+ resourceCollectionName,
+ resourceName,
+ monitorId,
+ timestampUnix);
+ if (inner != null) {
+ return new HealthMonitorStateChangeImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response getStateChangeWithResponse(
+ String subscriptionId,
+ String resourceGroupName,
+ String providerName,
+ String resourceCollectionName,
+ String resourceName,
+ String monitorId,
+ String timestampUnix,
+ String expand,
+ Context context) {
+ Response inner =
+ this
+ .serviceClient()
+ .getStateChangeWithResponse(
+ subscriptionId,
+ resourceGroupName,
+ providerName,
+ resourceCollectionName,
+ resourceName,
+ monitorId,
+ timestampUnix,
+ expand,
+ context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new HealthMonitorStateChangeImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ private HealthMonitorsClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.workloadmonitor.WorkloadMonitorManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/workloadmonitor/azure-resourcemanager-workloadmonitor/src/main/java/com/azure/resourcemanager/workloadmonitor/implementation/OperationImpl.java b/sdk/workloadmonitor/azure-resourcemanager-workloadmonitor/src/main/java/com/azure/resourcemanager/workloadmonitor/implementation/OperationImpl.java
new file mode 100644
index 000000000000..b2dd227efe45
--- /dev/null
+++ b/sdk/workloadmonitor/azure-resourcemanager-workloadmonitor/src/main/java/com/azure/resourcemanager/workloadmonitor/implementation/OperationImpl.java
@@ -0,0 +1,41 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.workloadmonitor.implementation;
+
+import com.azure.resourcemanager.workloadmonitor.fluent.models.OperationInner;
+import com.azure.resourcemanager.workloadmonitor.models.Operation;
+import com.azure.resourcemanager.workloadmonitor.models.OperationDisplay;
+
+public final class OperationImpl implements Operation {
+ private OperationInner innerObject;
+
+ private final com.azure.resourcemanager.workloadmonitor.WorkloadMonitorManager serviceManager;
+
+ OperationImpl(
+ OperationInner innerObject, com.azure.resourcemanager.workloadmonitor.WorkloadMonitorManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public OperationDisplay display() {
+ return this.innerModel().display();
+ }
+
+ public String origin() {
+ return this.innerModel().origin();
+ }
+
+ public OperationInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.workloadmonitor.WorkloadMonitorManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/workloadmonitor/azure-resourcemanager-workloadmonitor/src/main/java/com/azure/resourcemanager/workloadmonitor/implementation/OperationsClientImpl.java b/sdk/workloadmonitor/azure-resourcemanager-workloadmonitor/src/main/java/com/azure/resourcemanager/workloadmonitor/implementation/OperationsClientImpl.java
new file mode 100644
index 000000000000..ef769314660b
--- /dev/null
+++ b/sdk/workloadmonitor/azure-resourcemanager-workloadmonitor/src/main/java/com/azure/resourcemanager/workloadmonitor/implementation/OperationsClientImpl.java
@@ -0,0 +1,269 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.workloadmonitor.implementation;
+
+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.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.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.workloadmonitor.fluent.OperationsClient;
+import com.azure.resourcemanager.workloadmonitor.fluent.models.OperationInner;
+import com.azure.resourcemanager.workloadmonitor.models.OperationList;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in OperationsClient. */
+public final class OperationsClientImpl implements OperationsClient {
+ private final ClientLogger logger = new ClientLogger(OperationsClientImpl.class);
+
+ /** The proxy service used to perform REST calls. */
+ private final OperationsService service;
+
+ /** The service client containing this operation class. */
+ private final WorkloadMonitorApiImpl client;
+
+ /**
+ * Initializes an instance of OperationsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ OperationsClientImpl(WorkloadMonitorApiImpl client) {
+ this.service =
+ RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for WorkloadMonitorApiOperations to be used by the proxy service to
+ * perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "WorkloadMonitorApiOp")
+ private interface OperationsService {
+ @Headers({"Content-Type: application/json"})
+ @Get("/providers/Microsoft.WorkloadMonitor/operations")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> list(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @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);
+ }
+
+ /**
+ * Get a list of all available REST API operations.
+ *
+ * @throws 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 all available REST API operations.
+ */
+ @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."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get a list of all available REST API operations.
+ *
+ * @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 all available REST API operations.
+ */
+ @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."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * Get a list of all available REST API operations.
+ *
+ * @throws 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 all available REST API operations.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync() {
+ return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Get a list of all available REST API operations.
+ *
+ * @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 all available REST API operations.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(Context context) {
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(context), nextLink -> listNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * Get a list of all available REST API operations.
+ *
+ * @throws 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 all available REST API operations.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list() {
+ return new PagedIterable<>(listAsync());
+ }
+
+ /**
+ * Get a list of all available REST API operations.
+ *
+ * @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 all available REST API operations.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(Context context) {
+ return new PagedIterable<>(listAsync(context));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The nextLink parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list of available REST API operations.
+ */
+ @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 list of available REST API operations.
+ */
+ @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/workloadmonitor/azure-resourcemanager-workloadmonitor/src/main/java/com/azure/resourcemanager/workloadmonitor/implementation/OperationsImpl.java b/sdk/workloadmonitor/azure-resourcemanager-workloadmonitor/src/main/java/com/azure/resourcemanager/workloadmonitor/implementation/OperationsImpl.java
new file mode 100644
index 000000000000..8acd5ad374e7
--- /dev/null
+++ b/sdk/workloadmonitor/azure-resourcemanager-workloadmonitor/src/main/java/com/azure/resourcemanager/workloadmonitor/implementation/OperationsImpl.java
@@ -0,0 +1,46 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.workloadmonitor.implementation;
+
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.util.Context;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.workloadmonitor.fluent.OperationsClient;
+import com.azure.resourcemanager.workloadmonitor.fluent.models.OperationInner;
+import com.azure.resourcemanager.workloadmonitor.models.Operation;
+import com.azure.resourcemanager.workloadmonitor.models.Operations;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+
+public final class OperationsImpl implements Operations {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationsImpl.class);
+
+ private final OperationsClient innerClient;
+
+ private final com.azure.resourcemanager.workloadmonitor.WorkloadMonitorManager serviceManager;
+
+ public OperationsImpl(
+ OperationsClient innerClient, com.azure.resourcemanager.workloadmonitor.WorkloadMonitorManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public PagedIterable list() {
+ PagedIterable inner = this.serviceClient().list();
+ return Utils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list(Context context) {
+ PagedIterable inner = this.serviceClient().list(context);
+ return Utils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager()));
+ }
+
+ private OperationsClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.workloadmonitor.WorkloadMonitorManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/workloadmonitor/azure-resourcemanager-workloadmonitor/src/main/java/com/azure/resourcemanager/workloadmonitor/implementation/Utils.java b/sdk/workloadmonitor/azure-resourcemanager-workloadmonitor/src/main/java/com/azure/resourcemanager/workloadmonitor/implementation/Utils.java
new file mode 100644
index 000000000000..c250594a5128
--- /dev/null
+++ b/sdk/workloadmonitor/azure-resourcemanager-workloadmonitor/src/main/java/com/azure/resourcemanager/workloadmonitor/implementation/Utils.java
@@ -0,0 +1,204 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.workloadmonitor.implementation;
+
+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.util.CoreUtils;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+import java.util.function.Function;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+import reactor.core.publisher.Flux;
+
+final class Utils {
+ static String getValueFromIdByName(String id, String name) {
+ if (id == null) {
+ return null;
+ }
+ Iterator itr = Arrays.stream(id.split("/")).iterator();
+ while (itr.hasNext()) {
+ String part = itr.next();
+ if (part != null && !part.trim().isEmpty()) {
+ if (part.equalsIgnoreCase(name)) {
+ if (itr.hasNext()) {
+ return itr.next();
+ } else {
+ return null;
+ }
+ }
+ }
+ }
+ return null;
+ }
+
+ static String getValueFromIdByParameterName(String id, String pathTemplate, String parameterName) {
+ if (id == null || pathTemplate == null) {
+ return null;
+ }
+ String parameterNameParentheses = "{" + parameterName + "}";
+ List idSegmentsReverted = Arrays.asList(id.split("/"));
+ List pathSegments = Arrays.asList(pathTemplate.split("/"));
+ Collections.reverse(idSegmentsReverted);
+ Iterator idItrReverted = idSegmentsReverted.iterator();
+ int pathIndex = pathSegments.size();
+ while (idItrReverted.hasNext() && pathIndex > 0) {
+ String idSegment = idItrReverted.next();
+ String pathSegment = pathSegments.get(--pathIndex);
+ if (!CoreUtils.isNullOrEmpty(idSegment) && !CoreUtils.isNullOrEmpty(pathSegment)) {
+ if (pathSegment.equalsIgnoreCase(parameterNameParentheses)) {
+ if (pathIndex == 0 || (pathIndex == 1 && pathSegments.get(0).isEmpty())) {
+ List segments = new ArrayList<>();
+ segments.add(idSegment);
+ idItrReverted.forEachRemaining(segments::add);
+ Collections.reverse(segments);
+ if (segments.size() > 0 && segments.get(0).isEmpty()) {
+ segments.remove(0);
+ }
+ return String.join("/", segments);
+ } else {
+ return idSegment;
+ }
+ }
+ }
+ }
+ return null;
+ }
+
+ static PagedIterable mapPage(PagedIterable pageIterable, Function mapper) {
+ return new PagedIterableImpl(pageIterable, mapper);
+ }
+
+ private static final class PagedIterableImpl extends PagedIterable {
+
+ private final PagedIterable pagedIterable;
+ private final Function mapper;
+ private final Function, PagedResponse> pageMapper;
+
+ private PagedIterableImpl(PagedIterable pagedIterable, Function mapper) {
+ super(
+ PagedFlux
+ .create(
+ () ->
+ (continuationToken, pageSize) ->
+ Flux.fromStream(pagedIterable.streamByPage().map(getPageMapper(mapper)))));
+ this.pagedIterable = pagedIterable;
+ this.mapper = mapper;
+ this.pageMapper = getPageMapper(mapper);
+ }
+
+ private static Function, PagedResponse> getPageMapper(Function mapper) {
+ return page ->
+ new PagedResponseBase(
+ page.getRequest(),
+ page.getStatusCode(),
+ page.getHeaders(),
+ page.getElements().stream().map(mapper).collect(Collectors.toList()),
+ page.getContinuationToken(),
+ null);
+ }
+
+ @Override
+ public Stream stream() {
+ return pagedIterable.stream().map(mapper);
+ }
+
+ @Override
+ public Stream> streamByPage() {
+ return pagedIterable.streamByPage().map(pageMapper);
+ }
+
+ @Override
+ public Stream> streamByPage(String continuationToken) {
+ return pagedIterable.streamByPage(continuationToken).map(pageMapper);
+ }
+
+ @Override
+ public Stream> streamByPage(int preferredPageSize) {
+ return pagedIterable.streamByPage(preferredPageSize).map(pageMapper);
+ }
+
+ @Override
+ public Stream> streamByPage(String continuationToken, int preferredPageSize) {
+ return pagedIterable.streamByPage(continuationToken, preferredPageSize).map(pageMapper);
+ }
+
+ @Override
+ public Iterator iterator() {
+ return new IteratorImpl(pagedIterable.iterator(), mapper);
+ }
+
+ @Override
+ public Iterable> iterableByPage() {
+ return new IterableImpl, PagedResponse>(pagedIterable.iterableByPage(), pageMapper);
+ }
+
+ @Override
+ public Iterable> iterableByPage(String continuationToken) {
+ return new IterableImpl, PagedResponse>(
+ pagedIterable.iterableByPage(continuationToken), pageMapper);
+ }
+
+ @Override
+ public Iterable> iterableByPage(int preferredPageSize) {
+ return new IterableImpl, PagedResponse>(
+ pagedIterable.iterableByPage(preferredPageSize), pageMapper);
+ }
+
+ @Override
+ public Iterable> iterableByPage(String continuationToken, int preferredPageSize) {
+ return new IterableImpl, PagedResponse>(
+ pagedIterable.iterableByPage(continuationToken, preferredPageSize), pageMapper);
+ }
+ }
+
+ private static final class IteratorImpl implements Iterator {
+
+ private final Iterator iterator;
+ private final Function mapper;
+
+ private IteratorImpl(Iterator iterator, Function mapper) {
+ this.iterator = iterator;
+ this.mapper = mapper;
+ }
+
+ @Override
+ public boolean hasNext() {
+ return iterator.hasNext();
+ }
+
+ @Override
+ public S next() {
+ return mapper.apply(iterator.next());
+ }
+
+ @Override
+ public void remove() {
+ iterator.remove();
+ }
+ }
+
+ private static final class IterableImpl implements Iterable {
+
+ private final Iterable iterable;
+ private final Function mapper;
+
+ private IterableImpl(Iterable iterable, Function mapper) {
+ this.iterable = iterable;
+ this.mapper = mapper;
+ }
+
+ @Override
+ public Iterator iterator() {
+ return new IteratorImpl(iterable.iterator(), mapper);
+ }
+ }
+}
diff --git a/sdk/workloadmonitor/azure-resourcemanager-workloadmonitor/src/main/java/com/azure/resourcemanager/workloadmonitor/implementation/WorkloadMonitorApiBuilder.java b/sdk/workloadmonitor/azure-resourcemanager-workloadmonitor/src/main/java/com/azure/resourcemanager/workloadmonitor/implementation/WorkloadMonitorApiBuilder.java
new file mode 100644
index 000000000000..f050fec289de
--- /dev/null
+++ b/sdk/workloadmonitor/azure-resourcemanager-workloadmonitor/src/main/java/com/azure/resourcemanager/workloadmonitor/implementation/WorkloadMonitorApiBuilder.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.workloadmonitor.implementation;
+
+import com.azure.core.annotation.ServiceClientBuilder;
+import com.azure.core.http.HttpPipeline;
+import com.azure.core.http.HttpPipelineBuilder;
+import com.azure.core.http.policy.CookiePolicy;
+import com.azure.core.http.policy.RetryPolicy;
+import com.azure.core.http.policy.UserAgentPolicy;
+import com.azure.core.management.AzureEnvironment;
+import com.azure.core.management.serializer.SerializerFactory;
+import com.azure.core.util.serializer.SerializerAdapter;
+import java.time.Duration;
+
+/** A builder for creating a new instance of the WorkloadMonitorApiImpl type. */
+@ServiceClientBuilder(serviceClients = {WorkloadMonitorApiImpl.class})
+public final class WorkloadMonitorApiBuilder {
+ /*
+ * server parameter
+ */
+ private String endpoint;
+
+ /**
+ * Sets server parameter.
+ *
+ * @param endpoint the endpoint value.
+ * @return the WorkloadMonitorApiBuilder.
+ */
+ public WorkloadMonitorApiBuilder endpoint(String endpoint) {
+ this.endpoint = endpoint;
+ return this;
+ }
+
+ /*
+ * The environment to connect to
+ */
+ private AzureEnvironment environment;
+
+ /**
+ * Sets The environment to connect to.
+ *
+ * @param environment the environment value.
+ * @return the WorkloadMonitorApiBuilder.
+ */
+ public WorkloadMonitorApiBuilder environment(AzureEnvironment environment) {
+ this.environment = environment;
+ return this;
+ }
+
+ /*
+ * The default poll interval for long-running operation
+ */
+ private Duration defaultPollInterval;
+
+ /**
+ * Sets The default poll interval for long-running operation.
+ *
+ * @param defaultPollInterval the defaultPollInterval value.
+ * @return the WorkloadMonitorApiBuilder.
+ */
+ public WorkloadMonitorApiBuilder defaultPollInterval(Duration defaultPollInterval) {
+ this.defaultPollInterval = defaultPollInterval;
+ return this;
+ }
+
+ /*
+ * The HTTP pipeline to send requests through
+ */
+ private HttpPipeline pipeline;
+
+ /**
+ * Sets The HTTP pipeline to send requests through.
+ *
+ * @param pipeline the pipeline value.
+ * @return the WorkloadMonitorApiBuilder.
+ */
+ public WorkloadMonitorApiBuilder pipeline(HttpPipeline pipeline) {
+ this.pipeline = pipeline;
+ return this;
+ }
+
+ /*
+ * The serializer to serialize an object into a string
+ */
+ private SerializerAdapter serializerAdapter;
+
+ /**
+ * Sets The serializer to serialize an object into a string.
+ *
+ * @param serializerAdapter the serializerAdapter value.
+ * @return the WorkloadMonitorApiBuilder.
+ */
+ public WorkloadMonitorApiBuilder serializerAdapter(SerializerAdapter serializerAdapter) {
+ this.serializerAdapter = serializerAdapter;
+ return this;
+ }
+
+ /**
+ * Builds an instance of WorkloadMonitorApiImpl with the provided parameters.
+ *
+ * @return an instance of WorkloadMonitorApiImpl.
+ */
+ public WorkloadMonitorApiImpl buildClient() {
+ if (endpoint == null) {
+ this.endpoint = "https://management.azure.com";
+ }
+ if (environment == null) {
+ this.environment = AzureEnvironment.AZURE;
+ }
+ if (defaultPollInterval == null) {
+ this.defaultPollInterval = Duration.ofSeconds(30);
+ }
+ if (pipeline == null) {
+ this.pipeline =
+ new HttpPipelineBuilder()
+ .policies(new UserAgentPolicy(), new RetryPolicy(), new CookiePolicy())
+ .build();
+ }
+ if (serializerAdapter == null) {
+ this.serializerAdapter = SerializerFactory.createDefaultManagementSerializerAdapter();
+ }
+ WorkloadMonitorApiImpl client =
+ new WorkloadMonitorApiImpl(pipeline, serializerAdapter, defaultPollInterval, environment, endpoint);
+ return client;
+ }
+}
diff --git a/sdk/workloadmonitor/azure-resourcemanager-workloadmonitor/src/main/java/com/azure/resourcemanager/workloadmonitor/implementation/WorkloadMonitorApiImpl.java b/sdk/workloadmonitor/azure-resourcemanager-workloadmonitor/src/main/java/com/azure/resourcemanager/workloadmonitor/implementation/WorkloadMonitorApiImpl.java
new file mode 100644
index 000000000000..5f8a5a38a6f7
--- /dev/null
+++ b/sdk/workloadmonitor/azure-resourcemanager-workloadmonitor/src/main/java/com/azure/resourcemanager/workloadmonitor/implementation/WorkloadMonitorApiImpl.java
@@ -0,0 +1,292 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.workloadmonitor.implementation;
+
+import com.azure.core.annotation.ServiceClient;
+import com.azure.core.http.HttpHeaders;
+import com.azure.core.http.HttpPipeline;
+import com.azure.core.http.HttpResponse;
+import com.azure.core.http.rest.Response;
+import com.azure.core.management.AzureEnvironment;
+import com.azure.core.management.exception.ManagementError;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.management.polling.PollerFactory;
+import com.azure.core.util.Context;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.core.util.polling.AsyncPollResponse;
+import com.azure.core.util.polling.LongRunningOperationStatus;
+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.workloadmonitor.fluent.HealthMonitorsClient;
+import com.azure.resourcemanager.workloadmonitor.fluent.OperationsClient;
+import com.azure.resourcemanager.workloadmonitor.fluent.WorkloadMonitorApi;
+import java.io.IOException;
+import java.lang.reflect.Type;
+import java.nio.ByteBuffer;
+import java.nio.charset.Charset;
+import java.nio.charset.StandardCharsets;
+import java.time.Duration;
+import java.util.Map;
+import reactor.core.publisher.Flux;
+import reactor.core.publisher.Mono;
+
+/** Initializes a new instance of the WorkloadMonitorApiImpl type. */
+@ServiceClient(builder = WorkloadMonitorApiBuilder.class)
+public final class WorkloadMonitorApiImpl implements WorkloadMonitorApi {
+ private final ClientLogger logger = new ClientLogger(WorkloadMonitorApiImpl.class);
+
+ /** server parameter. */
+ private final String endpoint;
+
+ /**
+ * Gets server parameter.
+ *
+ * @return the endpoint value.
+ */
+ public String getEndpoint() {
+ return this.endpoint;
+ }
+
+ /** Api Version. */
+ private final String apiVersion;
+
+ /**
+ * Gets Api Version.
+ *
+ * @return the apiVersion value.
+ */
+ public String getApiVersion() {
+ return this.apiVersion;
+ }
+
+ /** The HTTP pipeline to send requests through. */
+ private final HttpPipeline httpPipeline;
+
+ /**
+ * Gets The HTTP pipeline to send requests through.
+ *
+ * @return the httpPipeline value.
+ */
+ public HttpPipeline getHttpPipeline() {
+ return this.httpPipeline;
+ }
+
+ /** The serializer to serialize an object into a string. */
+ private final SerializerAdapter serializerAdapter;
+
+ /**
+ * Gets The serializer to serialize an object into a string.
+ *
+ * @return the serializerAdapter value.
+ */
+ SerializerAdapter getSerializerAdapter() {
+ return this.serializerAdapter;
+ }
+
+ /** The default poll interval for long-running operation. */
+ private final Duration defaultPollInterval;
+
+ /**
+ * Gets The default poll interval for long-running operation.
+ *
+ * @return the defaultPollInterval value.
+ */
+ public Duration getDefaultPollInterval() {
+ return this.defaultPollInterval;
+ }
+
+ /** The OperationsClient object to access its operations. */
+ private final OperationsClient operations;
+
+ /**
+ * Gets the OperationsClient object to access its operations.
+ *
+ * @return the OperationsClient object.
+ */
+ public OperationsClient getOperations() {
+ return this.operations;
+ }
+
+ /** The HealthMonitorsClient object to access its operations. */
+ private final HealthMonitorsClient healthMonitors;
+
+ /**
+ * Gets the HealthMonitorsClient object to access its operations.
+ *
+ * @return the HealthMonitorsClient object.
+ */
+ public HealthMonitorsClient getHealthMonitors() {
+ return this.healthMonitors;
+ }
+
+ /**
+ * Initializes an instance of WorkloadMonitorApi client.
+ *
+ * @param httpPipeline The HTTP pipeline to send requests through.
+ * @param serializerAdapter The serializer to serialize an object into a string.
+ * @param defaultPollInterval The default poll interval for long-running operation.
+ * @param environment The Azure environment.
+ * @param endpoint server parameter.
+ */
+ WorkloadMonitorApiImpl(
+ HttpPipeline httpPipeline,
+ SerializerAdapter serializerAdapter,
+ Duration defaultPollInterval,
+ AzureEnvironment environment,
+ String endpoint) {
+ this.httpPipeline = httpPipeline;
+ this.serializerAdapter = serializerAdapter;
+ this.defaultPollInterval = defaultPollInterval;
+ this.endpoint = endpoint;
+ this.apiVersion = "2020-01-13-preview";
+ this.operations = new OperationsClientImpl(this);
+ this.healthMonitors = new HealthMonitorsClientImpl(this);
+ }
+
+ /**
+ * Gets default client context.
+ *
+ * @return the default client context.
+ */
+ public Context getContext() {
+ return Context.NONE;
+ }
+
+ /**
+ * Merges default client context with provided context.
+ *
+ * @param context the context to be merged with default client context.
+ * @return the merged context.
+ */
+ public Context mergeContext(Context context) {
+ for (Map.Entry