diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt
index e7740c6cda527..1a4c7921fa8d5 100644
--- a/eng/versioning/version_client.txt
+++ b/eng/versioning/version_client.txt
@@ -322,6 +322,7 @@ com.azure.resourcemanager:azure-resourcemanager-extendedlocation;1.0.0-beta.1;1.
com.azure.resourcemanager:azure-resourcemanager-logz;1.0.0-beta.1;1.0.0-beta.2
com.azure.resourcemanager:azure-resourcemanager-storagepool;1.0.0-beta.1;1.0.0-beta.2
com.azure.resourcemanager:azure-resourcemanager-dataprotection;1.0.0-beta.1;1.0.0-beta.1
+com.azure.resourcemanager:azure-resourcemanager-monitor-generated;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/sdk/monitor/azure-resourcemanager-monitor-generated/CHANGELOG.md b/sdk/monitor/azure-resourcemanager-monitor-generated/CHANGELOG.md
new file mode 100644
index 0000000000000..b10a8a1864951
--- /dev/null
+++ b/sdk/monitor/azure-resourcemanager-monitor-generated/CHANGELOG.md
@@ -0,0 +1,5 @@
+# Release History
+
+## 1.0.0-beta.1 (2021-11-04)
+
+- Azure Resource Manager Monitor client library for Java. This package contains Microsoft Azure SDK for Monitor Management SDK. Monitor Management Client. Package tag package-2021-08. 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/monitor/azure-resourcemanager-monitor-generated/README.md b/sdk/monitor/azure-resourcemanager-monitor-generated/README.md
new file mode 100644
index 0000000000000..c978632fca58a
--- /dev/null
+++ b/sdk/monitor/azure-resourcemanager-monitor-generated/README.md
@@ -0,0 +1,102 @@
+# Azure Resource Manager Monitor client library for Java
+
+Azure Resource Manager Monitor client library for Java.
+
+This package contains Microsoft Azure SDK for Monitor Management SDK. Monitor Management Client. Package tag package-2021-08. 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-monitor-generated;current})
+```xml
+
+ com.azure.resourcemanager
+ azure-resourcemanager-monitor-generated
+ 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();
+MonitorManager manager = MonitorManager
+ .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
+
+[Code snippets and samples](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/monitor/azure-resourcemanager-monitor-generated/SAMPLE.md)
+
+
+## Troubleshooting
+
+## Next steps
+
+## Contributing
+
+For details on contributing to this repository, see the [contributing guide](https://github.com/Azure/azure-sdk-for-java/blob/main/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/main/sdk/identity/azure-identity
+[azure_core_http_netty]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/core/azure-core-http-netty
+[authenticate]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/AUTH.md
+[design]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/DESIGN.md
diff --git a/sdk/monitor/azure-resourcemanager-monitor-generated/SAMPLE.md b/sdk/monitor/azure-resourcemanager-monitor-generated/SAMPLE.md
new file mode 100644
index 0000000000000..588c77c0a6b96
--- /dev/null
+++ b/sdk/monitor/azure-resourcemanager-monitor-generated/SAMPLE.md
@@ -0,0 +1,338 @@
+# Code snippets and samples
+
+
+## ScheduledQueryRules
+
+- [CreateOrUpdate](#scheduledqueryrules_createorupdate)
+- [Delete](#scheduledqueryrules_delete)
+- [GetByResourceGroup](#scheduledqueryrules_getbyresourcegroup)
+- [List](#scheduledqueryrules_list)
+- [ListByResourceGroup](#scheduledqueryrules_listbyresourcegroup)
+- [Update](#scheduledqueryrules_update)
+### ScheduledQueryRules_CreateOrUpdate
+
+```java
+import com.azure.resourcemanager.monitor.generated.models.Actions;
+import com.azure.resourcemanager.monitor.generated.models.AlertSeverity;
+import com.azure.resourcemanager.monitor.generated.models.Condition;
+import com.azure.resourcemanager.monitor.generated.models.ConditionFailingPeriods;
+import com.azure.resourcemanager.monitor.generated.models.ConditionOperator;
+import com.azure.resourcemanager.monitor.generated.models.Dimension;
+import com.azure.resourcemanager.monitor.generated.models.DimensionOperator;
+import com.azure.resourcemanager.monitor.generated.models.ScheduledQueryRuleCriteria;
+import com.azure.resourcemanager.monitor.generated.models.TimeAggregation;
+import java.time.Duration;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for ScheduledQueryRules CreateOrUpdate. */
+public final class ScheduledQueryRulesCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2021-08-01/examples/createOrUpdateScheduledQueryRuleSubscription.json
+ */
+ /**
+ * Sample code: Create or update a scheduled query rule on Subscription.
+ *
+ * @param manager Entry point to MonitorManager.
+ */
+ public static void createOrUpdateAScheduledQueryRuleOnSubscription(
+ com.azure.resourcemanager.monitor.generated.MonitorManager manager) {
+ manager
+ .scheduledQueryRules()
+ .define("perf")
+ .withRegion("eastus")
+ .withExistingResourceGroup("QueryResourceGroupName")
+ .withDescription("Performance rule")
+ .withSeverity(AlertSeverity.FOUR)
+ .withEnabled(true)
+ .withScopes(Arrays.asList("/subscriptions/aaf177ed-1330-a9f2-80ea-fd3d7783b147"))
+ .withEvaluationFrequency(Duration.parse("PT5M"))
+ .withWindowSize(Duration.parse("PT10M"))
+ .withTargetResourceTypes(Arrays.asList("Microsoft.Compute/virtualMachines"))
+ .withCriteria(
+ new ScheduledQueryRuleCriteria()
+ .withAllOf(
+ Arrays
+ .asList(
+ new Condition()
+ .withQuery("Perf | where ObjectName == \"Processor\"")
+ .withTimeAggregation(TimeAggregation.AVERAGE)
+ .withMetricMeasureColumn("% Processor Time")
+ .withResourceIdColumn("resourceId")
+ .withDimensions(
+ Arrays
+ .asList(
+ new Dimension()
+ .withName("ComputerIp")
+ .withOperator(DimensionOperator.EXCLUDE)
+ .withValues(Arrays.asList("192.168.1.1")),
+ new Dimension()
+ .withName("OSType")
+ .withOperator(DimensionOperator.INCLUDE)
+ .withValues(Arrays.asList("*"))))
+ .withOperator(ConditionOperator.GREATER_THAN)
+ .withThreshold(70.0)
+ .withFailingPeriods(
+ new ConditionFailingPeriods()
+ .withNumberOfEvaluationPeriods(1L)
+ .withMinFailingPeriodsToAlert(1L)))))
+ .withMuteActionsDuration(Duration.parse("PT30M"))
+ .withActions(
+ new Actions()
+ .withActionGroups(
+ Arrays
+ .asList(
+ "/subscriptions/1cf177ed-1330-4692-80ea-fd3d7783b147/resourcegroups/sqrapi/providers/microsoft.insights/actiongroups/myactiongroup"))
+ .withCustomProperties(mapOf("key11", "value11", "key12", "value12")))
+ .withCheckWorkspaceAlertsStorageConfigured(true)
+ .withSkipQueryValidation(true)
+ .withAutoMitigate(true)
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2021-08-01/examples/createOrUpdateScheduledQueryRuleResourceGroup.json
+ */
+ /**
+ * Sample code: Create or update a scheduled query rule on Resource group(s).
+ *
+ * @param manager Entry point to MonitorManager.
+ */
+ public static void createOrUpdateAScheduledQueryRuleOnResourceGroupS(
+ com.azure.resourcemanager.monitor.generated.MonitorManager manager) {
+ manager
+ .scheduledQueryRules()
+ .define("heartbeat")
+ .withRegion("eastus")
+ .withExistingResourceGroup("QueryResourceGroupName")
+ .withDescription("Health check rule")
+ .withSeverity(AlertSeverity.FOUR)
+ .withEnabled(true)
+ .withScopes(
+ Arrays.asList("/subscriptions/aaf177ed-1330-a9f2-80ea-fd3d7783b147/resourceGroups/scopeResourceGroup1"))
+ .withEvaluationFrequency(Duration.parse("PT5M"))
+ .withWindowSize(Duration.parse("PT10M"))
+ .withTargetResourceTypes(Arrays.asList("Microsoft.Compute/virtualMachines"))
+ .withCriteria(
+ new ScheduledQueryRuleCriteria()
+ .withAllOf(
+ Arrays
+ .asList(
+ new Condition()
+ .withQuery("Heartbeat")
+ .withTimeAggregation(TimeAggregation.COUNT)
+ .withDimensions(Arrays.asList())
+ .withOperator(ConditionOperator.GREATER_THAN)
+ .withThreshold(360.0)
+ .withFailingPeriods(
+ new ConditionFailingPeriods()
+ .withNumberOfEvaluationPeriods(1L)
+ .withMinFailingPeriodsToAlert(1L)))))
+ .withMuteActionsDuration(Duration.parse("PT30M"))
+ .withActions(
+ new Actions()
+ .withActionGroups(
+ Arrays
+ .asList(
+ "/subscriptions/1cf177ed-1330-4692-80ea-fd3d7783b147/resourcegroups/sqrapi/providers/microsoft.insights/actiongroups/myactiongroup"))
+ .withCustomProperties(mapOf("key11", "value11", "key12", "value12")))
+ .withCheckWorkspaceAlertsStorageConfigured(true)
+ .withSkipQueryValidation(true)
+ .withAutoMitigate(true)
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2021-08-01/examples/createOrUpdateScheduledQueryRule.json
+ */
+ /**
+ * Sample code: Create or update a scheduled query rule for Single Resource.
+ *
+ * @param manager Entry point to MonitorManager.
+ */
+ public static void createOrUpdateAScheduledQueryRuleForSingleResource(
+ com.azure.resourcemanager.monitor.generated.MonitorManager manager) {
+ manager
+ .scheduledQueryRules()
+ .define("perf")
+ .withRegion("eastus")
+ .withExistingResourceGroup("QueryResourceGroupName")
+ .withDescription("Performance rule")
+ .withSeverity(AlertSeverity.FOUR)
+ .withEnabled(true)
+ .withScopes(
+ Arrays
+ .asList(
+ "/subscriptions/aaf177ed-1330-a9f2-80ea-fd3d7783b147/resourceGroups/scopeResourceGroup1/providers/Microsoft.Compute/virtualMachines/vm1"))
+ .withEvaluationFrequency(Duration.parse("PT5M"))
+ .withWindowSize(Duration.parse("PT10M"))
+ .withCriteria(
+ new ScheduledQueryRuleCriteria()
+ .withAllOf(
+ Arrays
+ .asList(
+ new Condition()
+ .withQuery("Perf | where ObjectName == \"Processor\"")
+ .withTimeAggregation(TimeAggregation.AVERAGE)
+ .withMetricMeasureColumn("% Processor Time")
+ .withResourceIdColumn("resourceId")
+ .withDimensions(
+ Arrays
+ .asList(
+ new Dimension()
+ .withName("ComputerIp")
+ .withOperator(DimensionOperator.EXCLUDE)
+ .withValues(Arrays.asList("192.168.1.1")),
+ new Dimension()
+ .withName("OSType")
+ .withOperator(DimensionOperator.INCLUDE)
+ .withValues(Arrays.asList("*"))))
+ .withOperator(ConditionOperator.GREATER_THAN)
+ .withThreshold(70.0)
+ .withFailingPeriods(
+ new ConditionFailingPeriods()
+ .withNumberOfEvaluationPeriods(1L)
+ .withMinFailingPeriodsToAlert(1L)))))
+ .withMuteActionsDuration(Duration.parse("PT30M"))
+ .withActions(
+ new Actions()
+ .withActionGroups(
+ Arrays
+ .asList(
+ "/subscriptions/1cf177ed-1330-4692-80ea-fd3d7783b147/resourcegroups/sqrapi/providers/microsoft.insights/actiongroups/myactiongroup"))
+ .withCustomProperties(mapOf("key11", "value11", "key12", "value12")))
+ .withCheckWorkspaceAlertsStorageConfigured(true)
+ .withSkipQueryValidation(true)
+ .withAutoMitigate(true)
+ .create();
+ }
+
+ @SuppressWarnings("unchecked")
+ private static Map mapOf(Object... inputs) {
+ Map map = new HashMap<>();
+ for (int i = 0; i < inputs.length; i += 2) {
+ String key = (String) inputs[i];
+ T value = (T) inputs[i + 1];
+ map.put(key, value);
+ }
+ return map;
+ }
+}
+```
+
+### ScheduledQueryRules_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ScheduledQueryRules Delete. */
+public final class ScheduledQueryRulesDeleteSamples {
+ /*
+ * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2021-08-01/examples/deleteScheduledQueryRule.json
+ */
+ /**
+ * Sample code: Delete a scheduled query rule.
+ *
+ * @param manager Entry point to MonitorManager.
+ */
+ public static void deleteAScheduledQueryRule(com.azure.resourcemanager.monitor.generated.MonitorManager manager) {
+ manager.scheduledQueryRules().deleteWithResponse("QueryResourceGroupName", "heartbeat", Context.NONE);
+ }
+}
+```
+
+### ScheduledQueryRules_GetByResourceGroup
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ScheduledQueryRules GetByResourceGroup. */
+public final class ScheduledQueryRulesGetByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2021-08-01/examples/getScheduledQueryRule.json
+ */
+ /**
+ * Sample code: Get a scheduled query rule for single resource.
+ *
+ * @param manager Entry point to MonitorManager.
+ */
+ public static void getAScheduledQueryRuleForSingleResource(
+ com.azure.resourcemanager.monitor.generated.MonitorManager manager) {
+ manager.scheduledQueryRules().getByResourceGroupWithResponse("QueryResourceGroupName", "perf", Context.NONE);
+ }
+}
+```
+
+### ScheduledQueryRules_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ScheduledQueryRules List. */
+public final class ScheduledQueryRulesListSamples {
+ /*
+ * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2021-08-01/examples/listScheduledQueryRulesBySubscription.json
+ */
+ /**
+ * Sample code: List scheduled query rules by subscription.
+ *
+ * @param manager Entry point to MonitorManager.
+ */
+ public static void listScheduledQueryRulesBySubscription(
+ com.azure.resourcemanager.monitor.generated.MonitorManager manager) {
+ manager.scheduledQueryRules().list(Context.NONE);
+ }
+}
+```
+
+### ScheduledQueryRules_ListByResourceGroup
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ScheduledQueryRules ListByResourceGroup. */
+public final class ScheduledQueryRulesListByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2021-08-01/examples/listScheduledQueryRulesByResourceGroup.json
+ */
+ /**
+ * Sample code: List scheduled query rules by resource group.
+ *
+ * @param manager Entry point to MonitorManager.
+ */
+ public static void listScheduledQueryRulesByResourceGroup(
+ com.azure.resourcemanager.monitor.generated.MonitorManager manager) {
+ manager.scheduledQueryRules().listByResourceGroup("QueryResourceGroupName", Context.NONE);
+ }
+}
+```
+
+### ScheduledQueryRules_Update
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.monitor.generated.models.ScheduledQueryRuleResource;
+
+/** Samples for ScheduledQueryRules Update. */
+public final class ScheduledQueryRulesUpdateSamples {
+ /*
+ * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2021-08-01/examples/patchScheduledQueryRule.json
+ */
+ /**
+ * Sample code: Create or update a scheduled query rule.
+ *
+ * @param manager Entry point to MonitorManager.
+ */
+ public static void createOrUpdateAScheduledQueryRule(
+ com.azure.resourcemanager.monitor.generated.MonitorManager manager) {
+ ScheduledQueryRuleResource resource =
+ manager
+ .scheduledQueryRules()
+ .getByResourceGroupWithResponse("QueryResourceGroupName", "heartbeat", Context.NONE)
+ .getValue();
+ resource.update().withEnabled(false).apply();
+ }
+}
+```
+
diff --git a/sdk/monitor/azure-resourcemanager-monitor-generated/pom.xml b/sdk/monitor/azure-resourcemanager-monitor-generated/pom.xml
new file mode 100644
index 0000000000000..7b005271e9baf
--- /dev/null
+++ b/sdk/monitor/azure-resourcemanager-monitor-generated/pom.xml
@@ -0,0 +1,81 @@
+
+ 4.0.0
+
+ com.azure
+ azure-client-sdk-parent
+ 1.7.0
+ ../../parents/azure-client-sdk-parent
+
+
+ com.azure.resourcemanager
+ azure-resourcemanager-monitor-generated
+ 1.0.0-beta.1
+ jar
+
+ Microsoft Azure SDK for Monitor Management
+ This package contains Microsoft Azure SDK for Monitor Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Monitor Management Client. Package tag package-2021-08.
+ 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
+ true
+ false
+
+
+
+
+
+ com.azure
+ azure-core
+ 1.21.0
+
+
+ com.azure
+ azure-core-management
+ 1.4.2
+
+
+
+
+
+ org.revapi
+ revapi-maven-plugin
+ 0.11.2
+
+
+
+
+ java.method.addedToInterface
+
+
+ true
+ .*
+ com\.azure\.resourcemanager(\.[^.]+)+\.fluent(\.[^.]+)*
+
+
+
+
+
+
+
+
diff --git a/sdk/monitor/azure-resourcemanager-monitor-generated/src/main/java/com/azure/resourcemanager/monitor/generated/MonitorManager.java b/sdk/monitor/azure-resourcemanager-monitor-generated/src/main/java/com/azure/resourcemanager/monitor/generated/MonitorManager.java
new file mode 100644
index 0000000000000..a83a2ee67efb5
--- /dev/null
+++ b/sdk/monitor/azure-resourcemanager-monitor-generated/src/main/java/com/azure/resourcemanager/monitor/generated/MonitorManager.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.monitor.generated;
+
+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.HttpPipelinePosition;
+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.monitor.generated.fluent.MonitorClient;
+import com.azure.resourcemanager.monitor.generated.implementation.MonitorClientBuilder;
+import com.azure.resourcemanager.monitor.generated.implementation.ScheduledQueryRulesImpl;
+import com.azure.resourcemanager.monitor.generated.models.ScheduledQueryRules;
+import java.time.Duration;
+import java.time.temporal.ChronoUnit;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Objects;
+import java.util.stream.Collectors;
+
+/** Entry point to MonitorManager. Monitor Management Client. */
+public final class MonitorManager {
+ private ScheduledQueryRules scheduledQueryRules;
+
+ private final MonitorClient clientObject;
+
+ private MonitorManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) {
+ Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null.");
+ Objects.requireNonNull(profile, "'profile' cannot be null.");
+ this.clientObject =
+ new MonitorClientBuilder()
+ .pipeline(httpPipeline)
+ .endpoint(profile.getEnvironment().getResourceManagerEndpoint())
+ .subscriptionId(profile.getSubscriptionId())
+ .defaultPollInterval(defaultPollInterval)
+ .buildClient();
+ }
+
+ /**
+ * Creates an instance of Monitor service API entry point.
+ *
+ * @param credential the credential to use.
+ * @param profile the Azure profile for client.
+ * @return the Monitor service API instance.
+ */
+ public static MonitorManager 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 MonitorManager with optional configuration.
+ *
+ * @return the Configurable instance allowing configurations.
+ */
+ public static Configurable configure() {
+ return new MonitorManager.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 Monitor service API entry point.
+ *
+ * @param credential the credential to use.
+ * @param profile the Azure profile for client.
+ * @return the Monitor service API instance.
+ */
+ public MonitorManager 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.monitor.generated")
+ .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());
+ policies
+ .addAll(
+ this
+ .policies
+ .stream()
+ .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL)
+ .collect(Collectors.toList()));
+ HttpPolicyProviders.addBeforeRetryPolicies(policies);
+ policies.add(retryPolicy);
+ policies.add(new AddDatePolicy());
+ policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0])));
+ policies
+ .addAll(
+ this
+ .policies
+ .stream()
+ .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY)
+ .collect(Collectors.toList()));
+ HttpPolicyProviders.addAfterRetryPolicies(policies);
+ policies.add(new HttpLoggingPolicy(httpLogOptions));
+ HttpPipeline httpPipeline =
+ new HttpPipelineBuilder()
+ .httpClient(httpClient)
+ .policies(policies.toArray(new HttpPipelinePolicy[0]))
+ .build();
+ return new MonitorManager(httpPipeline, profile, defaultPollInterval);
+ }
+ }
+
+ /** @return Resource collection API of ScheduledQueryRules. */
+ public ScheduledQueryRules scheduledQueryRules() {
+ if (this.scheduledQueryRules == null) {
+ this.scheduledQueryRules = new ScheduledQueryRulesImpl(clientObject.getScheduledQueryRules(), this);
+ }
+ return scheduledQueryRules;
+ }
+
+ /**
+ * @return Wrapped service client MonitorClient providing direct access to the underlying auto-generated API
+ * implementation, based on Azure REST API.
+ */
+ public MonitorClient serviceClient() {
+ return this.clientObject;
+ }
+}
diff --git a/sdk/monitor/azure-resourcemanager-monitor-generated/src/main/java/com/azure/resourcemanager/monitor/generated/fluent/MonitorClient.java b/sdk/monitor/azure-resourcemanager-monitor-generated/src/main/java/com/azure/resourcemanager/monitor/generated/fluent/MonitorClient.java
new file mode 100644
index 0000000000000..797eb83758610
--- /dev/null
+++ b/sdk/monitor/azure-resourcemanager-monitor-generated/src/main/java/com/azure/resourcemanager/monitor/generated/fluent/MonitorClient.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.monitor.generated.fluent;
+
+import com.azure.core.http.HttpPipeline;
+import java.time.Duration;
+
+/** The interface for MonitorClient class. */
+public interface MonitorClient {
+ /**
+ * Gets The ID of the target subscription.
+ *
+ * @return the subscriptionId value.
+ */
+ String getSubscriptionId();
+
+ /**
+ * 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 ScheduledQueryRulesClient object to access its operations.
+ *
+ * @return the ScheduledQueryRulesClient object.
+ */
+ ScheduledQueryRulesClient getScheduledQueryRules();
+}
diff --git a/sdk/monitor/azure-resourcemanager-monitor-generated/src/main/java/com/azure/resourcemanager/monitor/generated/fluent/ScheduledQueryRulesClient.java b/sdk/monitor/azure-resourcemanager-monitor-generated/src/main/java/com/azure/resourcemanager/monitor/generated/fluent/ScheduledQueryRulesClient.java
new file mode 100644
index 0000000000000..9246d0419d0e6
--- /dev/null
+++ b/sdk/monitor/azure-resourcemanager-monitor-generated/src/main/java/com/azure/resourcemanager/monitor/generated/fluent/ScheduledQueryRulesClient.java
@@ -0,0 +1,179 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.monitor.generated.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.monitor.generated.fluent.models.ScheduledQueryRuleResourceInner;
+import com.azure.resourcemanager.monitor.generated.models.ScheduledQueryRuleResourcePatch;
+
+/** An instance of this class provides access to all the operations defined in ScheduledQueryRulesClient. */
+public interface ScheduledQueryRulesClient {
+ /**
+ * Retrieve a scheduled query rule definitions in a subscription.
+ *
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents a collection of scheduled query rule resources.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
+
+ /**
+ * Retrieve a scheduled query rule definitions in a subscription.
+ *
+ * @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 represents a collection of scheduled query rule resources.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(Context context);
+
+ /**
+ * Retrieve scheduled query rule definitions in a resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents a collection of scheduled query rule resources.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName);
+
+ /**
+ * Retrieve scheduled query rule definitions in a resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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 represents a collection of scheduled query rule resources.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName, Context context);
+
+ /**
+ * Retrieve an scheduled query rule definition.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param ruleName The name of the rule.
+ * @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 scheduled query rule resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ScheduledQueryRuleResourceInner getByResourceGroup(String resourceGroupName, String ruleName);
+
+ /**
+ * Retrieve an scheduled query rule definition.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param ruleName The name of the rule.
+ * @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 scheduled query rule resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getByResourceGroupWithResponse(
+ String resourceGroupName, String ruleName, Context context);
+
+ /**
+ * Creates or updates a scheduled query rule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param ruleName The name of the rule.
+ * @param parameters The parameters of the rule to create or update.
+ * @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 scheduled query rule resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ScheduledQueryRuleResourceInner createOrUpdate(
+ String resourceGroupName, String ruleName, ScheduledQueryRuleResourceInner parameters);
+
+ /**
+ * Creates or updates a scheduled query rule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param ruleName The name of the rule.
+ * @param parameters The parameters of the rule to create or update.
+ * @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 scheduled query rule resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response createOrUpdateWithResponse(
+ String resourceGroupName, String ruleName, ScheduledQueryRuleResourceInner parameters, Context context);
+
+ /**
+ * Update a scheduled query rule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param ruleName The name of the rule.
+ * @param parameters The parameters of the rule to update.
+ * @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 scheduled query rule resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ScheduledQueryRuleResourceInner update(
+ String resourceGroupName, String ruleName, ScheduledQueryRuleResourcePatch parameters);
+
+ /**
+ * Update a scheduled query rule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param ruleName The name of the rule.
+ * @param parameters The parameters of the rule to update.
+ * @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 scheduled query rule resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response updateWithResponse(
+ String resourceGroupName, String ruleName, ScheduledQueryRuleResourcePatch parameters, Context context);
+
+ /**
+ * Deletes a scheduled query rule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param ruleName The name of the rule.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String ruleName);
+
+ /**
+ * Deletes a scheduled query rule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param ruleName The name of the rule.
+ * @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 response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response deleteWithResponse(String resourceGroupName, String ruleName, Context context);
+}
diff --git a/sdk/monitor/azure-resourcemanager-monitor-generated/src/main/java/com/azure/resourcemanager/monitor/generated/fluent/models/ScheduledQueryRuleProperties.java b/sdk/monitor/azure-resourcemanager-monitor-generated/src/main/java/com/azure/resourcemanager/monitor/generated/fluent/models/ScheduledQueryRuleProperties.java
new file mode 100644
index 0000000000000..b4c79b8b67b41
--- /dev/null
+++ b/sdk/monitor/azure-resourcemanager-monitor-generated/src/main/java/com/azure/resourcemanager/monitor/generated/fluent/models/ScheduledQueryRuleProperties.java
@@ -0,0 +1,520 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.monitor.generated.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.monitor.generated.models.Actions;
+import com.azure.resourcemanager.monitor.generated.models.AlertSeverity;
+import com.azure.resourcemanager.monitor.generated.models.ScheduledQueryRuleCriteria;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.time.Duration;
+import java.util.List;
+
+/** scheduled query rule Definition. */
+@Fluent
+public final class ScheduledQueryRuleProperties {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(ScheduledQueryRuleProperties.class);
+
+ /*
+ * The api-version used when creating this alert rule
+ */
+ @JsonProperty(value = "createdWithApiVersion", access = JsonProperty.Access.WRITE_ONLY)
+ private String createdWithApiVersion;
+
+ /*
+ * True if alert rule is legacy Log Analytic rule
+ */
+ @JsonProperty(value = "isLegacyLogAnalyticsRule", access = JsonProperty.Access.WRITE_ONLY)
+ private Boolean isLegacyLogAnalyticsRule;
+
+ /*
+ * The description of the scheduled query rule.
+ */
+ @JsonProperty(value = "description")
+ private String description;
+
+ /*
+ * The display name of the alert rule
+ */
+ @JsonProperty(value = "displayName")
+ private String displayName;
+
+ /*
+ * Severity of the alert. Should be an integer between [0-4]. Value of 0 is
+ * severest. Relevant and required only for rules of the kind LogAlert.
+ */
+ @JsonProperty(value = "severity")
+ private AlertSeverity severity;
+
+ /*
+ * The flag which indicates whether this scheduled query rule is enabled.
+ * Value should be true or false
+ */
+ @JsonProperty(value = "enabled")
+ private Boolean enabled;
+
+ /*
+ * The list of resource id's that this scheduled query rule is scoped to.
+ */
+ @JsonProperty(value = "scopes")
+ private List scopes;
+
+ /*
+ * How often the scheduled query rule is evaluated represented in ISO 8601
+ * duration format. Relevant and required only for rules of the kind
+ * LogAlert.
+ */
+ @JsonProperty(value = "evaluationFrequency")
+ private Duration evaluationFrequency;
+
+ /*
+ * The period of time (in ISO 8601 duration format) on which the Alert
+ * query will be executed (bin size). Relevant and required only for rules
+ * of the kind LogAlert.
+ */
+ @JsonProperty(value = "windowSize")
+ private Duration windowSize;
+
+ /*
+ * If specified then overrides the query time range (default is
+ * WindowSize*NumberOfEvaluationPeriods). Relevant only for rules of the
+ * kind LogAlert.
+ */
+ @JsonProperty(value = "overrideQueryTimeRange")
+ private Duration overrideQueryTimeRange;
+
+ /*
+ * List of resource type of the target resource(s) on which the alert is
+ * created/updated. For example if the scope is a resource group and
+ * targetResourceTypes is Microsoft.Compute/virtualMachines, then a
+ * different alert will be fired for each virtual machine in the resource
+ * group which meet the alert criteria. Relevant only for rules of the kind
+ * LogAlert
+ */
+ @JsonProperty(value = "targetResourceTypes")
+ private List targetResourceTypes;
+
+ /*
+ * The rule criteria that defines the conditions of the scheduled query
+ * rule.
+ */
+ @JsonProperty(value = "criteria")
+ private ScheduledQueryRuleCriteria criteria;
+
+ /*
+ * Mute actions for the chosen period of time (in ISO 8601 duration format)
+ * after the alert is fired. Relevant only for rules of the kind LogAlert.
+ */
+ @JsonProperty(value = "muteActionsDuration")
+ private Duration muteActionsDuration;
+
+ /*
+ * Actions to invoke when the alert fires.
+ */
+ @JsonProperty(value = "actions")
+ private Actions actions;
+
+ /*
+ * The flag which indicates whether this scheduled query rule has been
+ * configured to be stored in the customer's storage. The default is false.
+ */
+ @JsonProperty(value = "isWorkspaceAlertsStorageConfigured", access = JsonProperty.Access.WRITE_ONLY)
+ private Boolean isWorkspaceAlertsStorageConfigured;
+
+ /*
+ * The flag which indicates whether this scheduled query rule should be
+ * stored in the customer's storage. The default is false. Relevant only
+ * for rules of the kind LogAlert.
+ */
+ @JsonProperty(value = "checkWorkspaceAlertsStorageConfigured")
+ private Boolean checkWorkspaceAlertsStorageConfigured;
+
+ /*
+ * The flag which indicates whether the provided query should be validated
+ * or not. The default is false. Relevant only for rules of the kind
+ * LogAlert.
+ */
+ @JsonProperty(value = "skipQueryValidation")
+ private Boolean skipQueryValidation;
+
+ /*
+ * The flag that indicates whether the alert should be automatically
+ * resolved or not. The default is true. Relevant only for rules of the
+ * kind LogAlert.
+ */
+ @JsonProperty(value = "autoMitigate")
+ private Boolean autoMitigate;
+
+ /**
+ * Get the createdWithApiVersion property: The api-version used when creating this alert rule.
+ *
+ * @return the createdWithApiVersion value.
+ */
+ public String createdWithApiVersion() {
+ return this.createdWithApiVersion;
+ }
+
+ /**
+ * Get the isLegacyLogAnalyticsRule property: True if alert rule is legacy Log Analytic rule.
+ *
+ * @return the isLegacyLogAnalyticsRule value.
+ */
+ public Boolean isLegacyLogAnalyticsRule() {
+ return this.isLegacyLogAnalyticsRule;
+ }
+
+ /**
+ * Get the description property: The description of the scheduled query rule.
+ *
+ * @return the description value.
+ */
+ public String description() {
+ return this.description;
+ }
+
+ /**
+ * Set the description property: The description of the scheduled query rule.
+ *
+ * @param description the description value to set.
+ * @return the ScheduledQueryRuleProperties object itself.
+ */
+ public ScheduledQueryRuleProperties withDescription(String description) {
+ this.description = description;
+ return this;
+ }
+
+ /**
+ * Get the displayName property: The display name of the alert rule.
+ *
+ * @return the displayName value.
+ */
+ public String displayName() {
+ return this.displayName;
+ }
+
+ /**
+ * Set the displayName property: The display name of the alert rule.
+ *
+ * @param displayName the displayName value to set.
+ * @return the ScheduledQueryRuleProperties object itself.
+ */
+ public ScheduledQueryRuleProperties withDisplayName(String displayName) {
+ this.displayName = displayName;
+ return this;
+ }
+
+ /**
+ * Get the severity property: Severity of the alert. Should be an integer between [0-4]. Value of 0 is severest.
+ * Relevant and required only for rules of the kind LogAlert.
+ *
+ * @return the severity value.
+ */
+ public AlertSeverity severity() {
+ return this.severity;
+ }
+
+ /**
+ * Set the severity property: Severity of the alert. Should be an integer between [0-4]. Value of 0 is severest.
+ * Relevant and required only for rules of the kind LogAlert.
+ *
+ * @param severity the severity value to set.
+ * @return the ScheduledQueryRuleProperties object itself.
+ */
+ public ScheduledQueryRuleProperties withSeverity(AlertSeverity severity) {
+ this.severity = severity;
+ return this;
+ }
+
+ /**
+ * Get the enabled property: The flag which indicates whether this scheduled query rule is enabled. Value should be
+ * true or false.
+ *
+ * @return the enabled value.
+ */
+ public Boolean enabled() {
+ return this.enabled;
+ }
+
+ /**
+ * Set the enabled property: The flag which indicates whether this scheduled query rule is enabled. Value should be
+ * true or false.
+ *
+ * @param enabled the enabled value to set.
+ * @return the ScheduledQueryRuleProperties object itself.
+ */
+ public ScheduledQueryRuleProperties withEnabled(Boolean enabled) {
+ this.enabled = enabled;
+ return this;
+ }
+
+ /**
+ * Get the scopes property: The list of resource id's that this scheduled query rule is scoped to.
+ *
+ * @return the scopes value.
+ */
+ public List scopes() {
+ return this.scopes;
+ }
+
+ /**
+ * Set the scopes property: The list of resource id's that this scheduled query rule is scoped to.
+ *
+ * @param scopes the scopes value to set.
+ * @return the ScheduledQueryRuleProperties object itself.
+ */
+ public ScheduledQueryRuleProperties withScopes(List scopes) {
+ this.scopes = scopes;
+ return this;
+ }
+
+ /**
+ * Get the evaluationFrequency property: How often the scheduled query rule is evaluated represented in ISO 8601
+ * duration format. Relevant and required only for rules of the kind LogAlert.
+ *
+ * @return the evaluationFrequency value.
+ */
+ public Duration evaluationFrequency() {
+ return this.evaluationFrequency;
+ }
+
+ /**
+ * Set the evaluationFrequency property: How often the scheduled query rule is evaluated represented in ISO 8601
+ * duration format. Relevant and required only for rules of the kind LogAlert.
+ *
+ * @param evaluationFrequency the evaluationFrequency value to set.
+ * @return the ScheduledQueryRuleProperties object itself.
+ */
+ public ScheduledQueryRuleProperties withEvaluationFrequency(Duration evaluationFrequency) {
+ this.evaluationFrequency = evaluationFrequency;
+ return this;
+ }
+
+ /**
+ * Get the windowSize property: The period of time (in ISO 8601 duration format) on which the Alert query will be
+ * executed (bin size). Relevant and required only for rules of the kind LogAlert.
+ *
+ * @return the windowSize value.
+ */
+ public Duration windowSize() {
+ return this.windowSize;
+ }
+
+ /**
+ * Set the windowSize property: The period of time (in ISO 8601 duration format) on which the Alert query will be
+ * executed (bin size). Relevant and required only for rules of the kind LogAlert.
+ *
+ * @param windowSize the windowSize value to set.
+ * @return the ScheduledQueryRuleProperties object itself.
+ */
+ public ScheduledQueryRuleProperties withWindowSize(Duration windowSize) {
+ this.windowSize = windowSize;
+ return this;
+ }
+
+ /**
+ * Get the overrideQueryTimeRange property: If specified then overrides the query time range (default is
+ * WindowSize*NumberOfEvaluationPeriods). Relevant only for rules of the kind LogAlert.
+ *
+ * @return the overrideQueryTimeRange value.
+ */
+ public Duration overrideQueryTimeRange() {
+ return this.overrideQueryTimeRange;
+ }
+
+ /**
+ * Set the overrideQueryTimeRange property: If specified then overrides the query time range (default is
+ * WindowSize*NumberOfEvaluationPeriods). Relevant only for rules of the kind LogAlert.
+ *
+ * @param overrideQueryTimeRange the overrideQueryTimeRange value to set.
+ * @return the ScheduledQueryRuleProperties object itself.
+ */
+ public ScheduledQueryRuleProperties withOverrideQueryTimeRange(Duration overrideQueryTimeRange) {
+ this.overrideQueryTimeRange = overrideQueryTimeRange;
+ return this;
+ }
+
+ /**
+ * Get the targetResourceTypes property: List of resource type of the target resource(s) on which the alert is
+ * created/updated. For example if the scope is a resource group and targetResourceTypes is
+ * Microsoft.Compute/virtualMachines, then a different alert will be fired for each virtual machine in the resource
+ * group which meet the alert criteria. Relevant only for rules of the kind LogAlert.
+ *
+ * @return the targetResourceTypes value.
+ */
+ public List targetResourceTypes() {
+ return this.targetResourceTypes;
+ }
+
+ /**
+ * Set the targetResourceTypes property: List of resource type of the target resource(s) on which the alert is
+ * created/updated. For example if the scope is a resource group and targetResourceTypes is
+ * Microsoft.Compute/virtualMachines, then a different alert will be fired for each virtual machine in the resource
+ * group which meet the alert criteria. Relevant only for rules of the kind LogAlert.
+ *
+ * @param targetResourceTypes the targetResourceTypes value to set.
+ * @return the ScheduledQueryRuleProperties object itself.
+ */
+ public ScheduledQueryRuleProperties withTargetResourceTypes(List targetResourceTypes) {
+ this.targetResourceTypes = targetResourceTypes;
+ return this;
+ }
+
+ /**
+ * Get the criteria property: The rule criteria that defines the conditions of the scheduled query rule.
+ *
+ * @return the criteria value.
+ */
+ public ScheduledQueryRuleCriteria criteria() {
+ return this.criteria;
+ }
+
+ /**
+ * Set the criteria property: The rule criteria that defines the conditions of the scheduled query rule.
+ *
+ * @param criteria the criteria value to set.
+ * @return the ScheduledQueryRuleProperties object itself.
+ */
+ public ScheduledQueryRuleProperties withCriteria(ScheduledQueryRuleCriteria criteria) {
+ this.criteria = criteria;
+ return this;
+ }
+
+ /**
+ * Get the muteActionsDuration property: Mute actions for the chosen period of time (in ISO 8601 duration format)
+ * after the alert is fired. Relevant only for rules of the kind LogAlert.
+ *
+ * @return the muteActionsDuration value.
+ */
+ public Duration muteActionsDuration() {
+ return this.muteActionsDuration;
+ }
+
+ /**
+ * Set the muteActionsDuration property: Mute actions for the chosen period of time (in ISO 8601 duration format)
+ * after the alert is fired. Relevant only for rules of the kind LogAlert.
+ *
+ * @param muteActionsDuration the muteActionsDuration value to set.
+ * @return the ScheduledQueryRuleProperties object itself.
+ */
+ public ScheduledQueryRuleProperties withMuteActionsDuration(Duration muteActionsDuration) {
+ this.muteActionsDuration = muteActionsDuration;
+ return this;
+ }
+
+ /**
+ * Get the actions property: Actions to invoke when the alert fires.
+ *
+ * @return the actions value.
+ */
+ public Actions actions() {
+ return this.actions;
+ }
+
+ /**
+ * Set the actions property: Actions to invoke when the alert fires.
+ *
+ * @param actions the actions value to set.
+ * @return the ScheduledQueryRuleProperties object itself.
+ */
+ public ScheduledQueryRuleProperties withActions(Actions actions) {
+ this.actions = actions;
+ return this;
+ }
+
+ /**
+ * Get the isWorkspaceAlertsStorageConfigured property: The flag which indicates whether this scheduled query rule
+ * has been configured to be stored in the customer's storage. The default is false.
+ *
+ * @return the isWorkspaceAlertsStorageConfigured value.
+ */
+ public Boolean isWorkspaceAlertsStorageConfigured() {
+ return this.isWorkspaceAlertsStorageConfigured;
+ }
+
+ /**
+ * Get the checkWorkspaceAlertsStorageConfigured property: The flag which indicates whether this scheduled query
+ * rule should be stored in the customer's storage. The default is false. Relevant only for rules of the kind
+ * LogAlert.
+ *
+ * @return the checkWorkspaceAlertsStorageConfigured value.
+ */
+ public Boolean checkWorkspaceAlertsStorageConfigured() {
+ return this.checkWorkspaceAlertsStorageConfigured;
+ }
+
+ /**
+ * Set the checkWorkspaceAlertsStorageConfigured property: The flag which indicates whether this scheduled query
+ * rule should be stored in the customer's storage. The default is false. Relevant only for rules of the kind
+ * LogAlert.
+ *
+ * @param checkWorkspaceAlertsStorageConfigured the checkWorkspaceAlertsStorageConfigured value to set.
+ * @return the ScheduledQueryRuleProperties object itself.
+ */
+ public ScheduledQueryRuleProperties withCheckWorkspaceAlertsStorageConfigured(
+ Boolean checkWorkspaceAlertsStorageConfigured) {
+ this.checkWorkspaceAlertsStorageConfigured = checkWorkspaceAlertsStorageConfigured;
+ return this;
+ }
+
+ /**
+ * Get the skipQueryValidation property: The flag which indicates whether the provided query should be validated or
+ * not. The default is false. Relevant only for rules of the kind LogAlert.
+ *
+ * @return the skipQueryValidation value.
+ */
+ public Boolean skipQueryValidation() {
+ return this.skipQueryValidation;
+ }
+
+ /**
+ * Set the skipQueryValidation property: The flag which indicates whether the provided query should be validated or
+ * not. The default is false. Relevant only for rules of the kind LogAlert.
+ *
+ * @param skipQueryValidation the skipQueryValidation value to set.
+ * @return the ScheduledQueryRuleProperties object itself.
+ */
+ public ScheduledQueryRuleProperties withSkipQueryValidation(Boolean skipQueryValidation) {
+ this.skipQueryValidation = skipQueryValidation;
+ return this;
+ }
+
+ /**
+ * Get the autoMitigate property: The flag that indicates whether the alert should be automatically resolved or not.
+ * The default is true. Relevant only for rules of the kind LogAlert.
+ *
+ * @return the autoMitigate value.
+ */
+ public Boolean autoMitigate() {
+ return this.autoMitigate;
+ }
+
+ /**
+ * Set the autoMitigate property: The flag that indicates whether the alert should be automatically resolved or not.
+ * The default is true. Relevant only for rules of the kind LogAlert.
+ *
+ * @param autoMitigate the autoMitigate value to set.
+ * @return the ScheduledQueryRuleProperties object itself.
+ */
+ public ScheduledQueryRuleProperties withAutoMitigate(Boolean autoMitigate) {
+ this.autoMitigate = autoMitigate;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (criteria() != null) {
+ criteria().validate();
+ }
+ if (actions() != null) {
+ actions().validate();
+ }
+ }
+}
diff --git a/sdk/monitor/azure-resourcemanager-monitor-generated/src/main/java/com/azure/resourcemanager/monitor/generated/fluent/models/ScheduledQueryRuleResourceInner.java b/sdk/monitor/azure-resourcemanager-monitor-generated/src/main/java/com/azure/resourcemanager/monitor/generated/fluent/models/ScheduledQueryRuleResourceInner.java
new file mode 100644
index 0000000000000..6dc5558d54173
--- /dev/null
+++ b/sdk/monitor/azure-resourcemanager-monitor-generated/src/main/java/com/azure/resourcemanager/monitor/generated/fluent/models/ScheduledQueryRuleResourceInner.java
@@ -0,0 +1,534 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.monitor.generated.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.Resource;
+import com.azure.core.management.SystemData;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.monitor.generated.models.Actions;
+import com.azure.resourcemanager.monitor.generated.models.AlertSeverity;
+import com.azure.resourcemanager.monitor.generated.models.Kind;
+import com.azure.resourcemanager.monitor.generated.models.ScheduledQueryRuleCriteria;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.time.Duration;
+import java.util.List;
+import java.util.Map;
+
+/** The scheduled query rule resource. */
+@Fluent
+public final class ScheduledQueryRuleResourceInner extends Resource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(ScheduledQueryRuleResourceInner.class);
+
+ /*
+ * Indicates the type of scheduled query rule. The default is LogAlert.
+ */
+ @JsonProperty(value = "kind")
+ private Kind kind;
+
+ /*
+ * The etag field is *not* required. If it is provided in the response
+ * body, it must also be provided as a header per the normal etag
+ * convention. Entity tags are used for comparing two or more entities
+ * from the same requested resource. HTTP/1.1 uses entity tags in the etag
+ * (section 14.19), If-Match (section 14.24), If-None-Match (section
+ * 14.26), and If-Range (section 14.27) header fields.
+ */
+ @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY)
+ private String etag;
+
+ /*
+ * SystemData of ScheduledQueryRule.
+ */
+ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
+ private SystemData systemData;
+
+ /*
+ * The rule properties of the resource.
+ */
+ @JsonProperty(value = "properties", required = true)
+ private ScheduledQueryRuleProperties innerProperties = new ScheduledQueryRuleProperties();
+
+ /**
+ * Get the kind property: Indicates the type of scheduled query rule. The default is LogAlert.
+ *
+ * @return the kind value.
+ */
+ public Kind kind() {
+ return this.kind;
+ }
+
+ /**
+ * Set the kind property: Indicates the type of scheduled query rule. The default is LogAlert.
+ *
+ * @param kind the kind value to set.
+ * @return the ScheduledQueryRuleResourceInner object itself.
+ */
+ public ScheduledQueryRuleResourceInner withKind(Kind kind) {
+ this.kind = kind;
+ return this;
+ }
+
+ /**
+ * Get the etag property: The etag field is *not* required. If it is provided in the response body, it must also be
+ * provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from
+ * the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24),
+ * If-None-Match (section 14.26), and If-Range (section 14.27) header fields.
+ *
+ * @return the etag value.
+ */
+ public String etag() {
+ return this.etag;
+ }
+
+ /**
+ * Get the systemData property: SystemData of ScheduledQueryRule.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
+ /**
+ * Get the innerProperties property: The rule properties of the resource.
+ *
+ * @return the innerProperties value.
+ */
+ private ScheduledQueryRuleProperties innerProperties() {
+ return this.innerProperties;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public ScheduledQueryRuleResourceInner withLocation(String location) {
+ super.withLocation(location);
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public ScheduledQueryRuleResourceInner withTags(Map tags) {
+ super.withTags(tags);
+ return this;
+ }
+
+ /**
+ * Get the createdWithApiVersion property: The api-version used when creating this alert rule.
+ *
+ * @return the createdWithApiVersion value.
+ */
+ public String createdWithApiVersion() {
+ return this.innerProperties() == null ? null : this.innerProperties().createdWithApiVersion();
+ }
+
+ /**
+ * Get the isLegacyLogAnalyticsRule property: True if alert rule is legacy Log Analytic rule.
+ *
+ * @return the isLegacyLogAnalyticsRule value.
+ */
+ public Boolean isLegacyLogAnalyticsRule() {
+ return this.innerProperties() == null ? null : this.innerProperties().isLegacyLogAnalyticsRule();
+ }
+
+ /**
+ * Get the description property: The description of the scheduled query rule.
+ *
+ * @return the description value.
+ */
+ public String description() {
+ return this.innerProperties() == null ? null : this.innerProperties().description();
+ }
+
+ /**
+ * Set the description property: The description of the scheduled query rule.
+ *
+ * @param description the description value to set.
+ * @return the ScheduledQueryRuleResourceInner object itself.
+ */
+ public ScheduledQueryRuleResourceInner withDescription(String description) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ScheduledQueryRuleProperties();
+ }
+ this.innerProperties().withDescription(description);
+ return this;
+ }
+
+ /**
+ * Get the displayName property: The display name of the alert rule.
+ *
+ * @return the displayName value.
+ */
+ public String displayName() {
+ return this.innerProperties() == null ? null : this.innerProperties().displayName();
+ }
+
+ /**
+ * Set the displayName property: The display name of the alert rule.
+ *
+ * @param displayName the displayName value to set.
+ * @return the ScheduledQueryRuleResourceInner object itself.
+ */
+ public ScheduledQueryRuleResourceInner withDisplayName(String displayName) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ScheduledQueryRuleProperties();
+ }
+ this.innerProperties().withDisplayName(displayName);
+ return this;
+ }
+
+ /**
+ * Get the severity property: Severity of the alert. Should be an integer between [0-4]. Value of 0 is severest.
+ * Relevant and required only for rules of the kind LogAlert.
+ *
+ * @return the severity value.
+ */
+ public AlertSeverity severity() {
+ return this.innerProperties() == null ? null : this.innerProperties().severity();
+ }
+
+ /**
+ * Set the severity property: Severity of the alert. Should be an integer between [0-4]. Value of 0 is severest.
+ * Relevant and required only for rules of the kind LogAlert.
+ *
+ * @param severity the severity value to set.
+ * @return the ScheduledQueryRuleResourceInner object itself.
+ */
+ public ScheduledQueryRuleResourceInner withSeverity(AlertSeverity severity) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ScheduledQueryRuleProperties();
+ }
+ this.innerProperties().withSeverity(severity);
+ return this;
+ }
+
+ /**
+ * Get the enabled property: The flag which indicates whether this scheduled query rule is enabled. Value should be
+ * true or false.
+ *
+ * @return the enabled value.
+ */
+ public Boolean enabled() {
+ return this.innerProperties() == null ? null : this.innerProperties().enabled();
+ }
+
+ /**
+ * Set the enabled property: The flag which indicates whether this scheduled query rule is enabled. Value should be
+ * true or false.
+ *
+ * @param enabled the enabled value to set.
+ * @return the ScheduledQueryRuleResourceInner object itself.
+ */
+ public ScheduledQueryRuleResourceInner withEnabled(Boolean enabled) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ScheduledQueryRuleProperties();
+ }
+ this.innerProperties().withEnabled(enabled);
+ return this;
+ }
+
+ /**
+ * Get the scopes property: The list of resource id's that this scheduled query rule is scoped to.
+ *
+ * @return the scopes value.
+ */
+ public List scopes() {
+ return this.innerProperties() == null ? null : this.innerProperties().scopes();
+ }
+
+ /**
+ * Set the scopes property: The list of resource id's that this scheduled query rule is scoped to.
+ *
+ * @param scopes the scopes value to set.
+ * @return the ScheduledQueryRuleResourceInner object itself.
+ */
+ public ScheduledQueryRuleResourceInner withScopes(List scopes) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ScheduledQueryRuleProperties();
+ }
+ this.innerProperties().withScopes(scopes);
+ return this;
+ }
+
+ /**
+ * Get the evaluationFrequency property: How often the scheduled query rule is evaluated represented in ISO 8601
+ * duration format. Relevant and required only for rules of the kind LogAlert.
+ *
+ * @return the evaluationFrequency value.
+ */
+ public Duration evaluationFrequency() {
+ return this.innerProperties() == null ? null : this.innerProperties().evaluationFrequency();
+ }
+
+ /**
+ * Set the evaluationFrequency property: How often the scheduled query rule is evaluated represented in ISO 8601
+ * duration format. Relevant and required only for rules of the kind LogAlert.
+ *
+ * @param evaluationFrequency the evaluationFrequency value to set.
+ * @return the ScheduledQueryRuleResourceInner object itself.
+ */
+ public ScheduledQueryRuleResourceInner withEvaluationFrequency(Duration evaluationFrequency) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ScheduledQueryRuleProperties();
+ }
+ this.innerProperties().withEvaluationFrequency(evaluationFrequency);
+ return this;
+ }
+
+ /**
+ * Get the windowSize property: The period of time (in ISO 8601 duration format) on which the Alert query will be
+ * executed (bin size). Relevant and required only for rules of the kind LogAlert.
+ *
+ * @return the windowSize value.
+ */
+ public Duration windowSize() {
+ return this.innerProperties() == null ? null : this.innerProperties().windowSize();
+ }
+
+ /**
+ * Set the windowSize property: The period of time (in ISO 8601 duration format) on which the Alert query will be
+ * executed (bin size). Relevant and required only for rules of the kind LogAlert.
+ *
+ * @param windowSize the windowSize value to set.
+ * @return the ScheduledQueryRuleResourceInner object itself.
+ */
+ public ScheduledQueryRuleResourceInner withWindowSize(Duration windowSize) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ScheduledQueryRuleProperties();
+ }
+ this.innerProperties().withWindowSize(windowSize);
+ return this;
+ }
+
+ /**
+ * Get the overrideQueryTimeRange property: If specified then overrides the query time range (default is
+ * WindowSize*NumberOfEvaluationPeriods). Relevant only for rules of the kind LogAlert.
+ *
+ * @return the overrideQueryTimeRange value.
+ */
+ public Duration overrideQueryTimeRange() {
+ return this.innerProperties() == null ? null : this.innerProperties().overrideQueryTimeRange();
+ }
+
+ /**
+ * Set the overrideQueryTimeRange property: If specified then overrides the query time range (default is
+ * WindowSize*NumberOfEvaluationPeriods). Relevant only for rules of the kind LogAlert.
+ *
+ * @param overrideQueryTimeRange the overrideQueryTimeRange value to set.
+ * @return the ScheduledQueryRuleResourceInner object itself.
+ */
+ public ScheduledQueryRuleResourceInner withOverrideQueryTimeRange(Duration overrideQueryTimeRange) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ScheduledQueryRuleProperties();
+ }
+ this.innerProperties().withOverrideQueryTimeRange(overrideQueryTimeRange);
+ return this;
+ }
+
+ /**
+ * Get the targetResourceTypes property: List of resource type of the target resource(s) on which the alert is
+ * created/updated. For example if the scope is a resource group and targetResourceTypes is
+ * Microsoft.Compute/virtualMachines, then a different alert will be fired for each virtual machine in the resource
+ * group which meet the alert criteria. Relevant only for rules of the kind LogAlert.
+ *
+ * @return the targetResourceTypes value.
+ */
+ public List targetResourceTypes() {
+ return this.innerProperties() == null ? null : this.innerProperties().targetResourceTypes();
+ }
+
+ /**
+ * Set the targetResourceTypes property: List of resource type of the target resource(s) on which the alert is
+ * created/updated. For example if the scope is a resource group and targetResourceTypes is
+ * Microsoft.Compute/virtualMachines, then a different alert will be fired for each virtual machine in the resource
+ * group which meet the alert criteria. Relevant only for rules of the kind LogAlert.
+ *
+ * @param targetResourceTypes the targetResourceTypes value to set.
+ * @return the ScheduledQueryRuleResourceInner object itself.
+ */
+ public ScheduledQueryRuleResourceInner withTargetResourceTypes(List targetResourceTypes) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ScheduledQueryRuleProperties();
+ }
+ this.innerProperties().withTargetResourceTypes(targetResourceTypes);
+ return this;
+ }
+
+ /**
+ * Get the criteria property: The rule criteria that defines the conditions of the scheduled query rule.
+ *
+ * @return the criteria value.
+ */
+ public ScheduledQueryRuleCriteria criteria() {
+ return this.innerProperties() == null ? null : this.innerProperties().criteria();
+ }
+
+ /**
+ * Set the criteria property: The rule criteria that defines the conditions of the scheduled query rule.
+ *
+ * @param criteria the criteria value to set.
+ * @return the ScheduledQueryRuleResourceInner object itself.
+ */
+ public ScheduledQueryRuleResourceInner withCriteria(ScheduledQueryRuleCriteria criteria) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ScheduledQueryRuleProperties();
+ }
+ this.innerProperties().withCriteria(criteria);
+ return this;
+ }
+
+ /**
+ * Get the muteActionsDuration property: Mute actions for the chosen period of time (in ISO 8601 duration format)
+ * after the alert is fired. Relevant only for rules of the kind LogAlert.
+ *
+ * @return the muteActionsDuration value.
+ */
+ public Duration muteActionsDuration() {
+ return this.innerProperties() == null ? null : this.innerProperties().muteActionsDuration();
+ }
+
+ /**
+ * Set the muteActionsDuration property: Mute actions for the chosen period of time (in ISO 8601 duration format)
+ * after the alert is fired. Relevant only for rules of the kind LogAlert.
+ *
+ * @param muteActionsDuration the muteActionsDuration value to set.
+ * @return the ScheduledQueryRuleResourceInner object itself.
+ */
+ public ScheduledQueryRuleResourceInner withMuteActionsDuration(Duration muteActionsDuration) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ScheduledQueryRuleProperties();
+ }
+ this.innerProperties().withMuteActionsDuration(muteActionsDuration);
+ return this;
+ }
+
+ /**
+ * Get the actions property: Actions to invoke when the alert fires.
+ *
+ * @return the actions value.
+ */
+ public Actions actions() {
+ return this.innerProperties() == null ? null : this.innerProperties().actions();
+ }
+
+ /**
+ * Set the actions property: Actions to invoke when the alert fires.
+ *
+ * @param actions the actions value to set.
+ * @return the ScheduledQueryRuleResourceInner object itself.
+ */
+ public ScheduledQueryRuleResourceInner withActions(Actions actions) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ScheduledQueryRuleProperties();
+ }
+ this.innerProperties().withActions(actions);
+ return this;
+ }
+
+ /**
+ * Get the isWorkspaceAlertsStorageConfigured property: The flag which indicates whether this scheduled query rule
+ * has been configured to be stored in the customer's storage. The default is false.
+ *
+ * @return the isWorkspaceAlertsStorageConfigured value.
+ */
+ public Boolean isWorkspaceAlertsStorageConfigured() {
+ return this.innerProperties() == null ? null : this.innerProperties().isWorkspaceAlertsStorageConfigured();
+ }
+
+ /**
+ * Get the checkWorkspaceAlertsStorageConfigured property: The flag which indicates whether this scheduled query
+ * rule should be stored in the customer's storage. The default is false. Relevant only for rules of the kind
+ * LogAlert.
+ *
+ * @return the checkWorkspaceAlertsStorageConfigured value.
+ */
+ public Boolean checkWorkspaceAlertsStorageConfigured() {
+ return this.innerProperties() == null ? null : this.innerProperties().checkWorkspaceAlertsStorageConfigured();
+ }
+
+ /**
+ * Set the checkWorkspaceAlertsStorageConfigured property: The flag which indicates whether this scheduled query
+ * rule should be stored in the customer's storage. The default is false. Relevant only for rules of the kind
+ * LogAlert.
+ *
+ * @param checkWorkspaceAlertsStorageConfigured the checkWorkspaceAlertsStorageConfigured value to set.
+ * @return the ScheduledQueryRuleResourceInner object itself.
+ */
+ public ScheduledQueryRuleResourceInner withCheckWorkspaceAlertsStorageConfigured(
+ Boolean checkWorkspaceAlertsStorageConfigured) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ScheduledQueryRuleProperties();
+ }
+ this.innerProperties().withCheckWorkspaceAlertsStorageConfigured(checkWorkspaceAlertsStorageConfigured);
+ return this;
+ }
+
+ /**
+ * Get the skipQueryValidation property: The flag which indicates whether the provided query should be validated or
+ * not. The default is false. Relevant only for rules of the kind LogAlert.
+ *
+ * @return the skipQueryValidation value.
+ */
+ public Boolean skipQueryValidation() {
+ return this.innerProperties() == null ? null : this.innerProperties().skipQueryValidation();
+ }
+
+ /**
+ * Set the skipQueryValidation property: The flag which indicates whether the provided query should be validated or
+ * not. The default is false. Relevant only for rules of the kind LogAlert.
+ *
+ * @param skipQueryValidation the skipQueryValidation value to set.
+ * @return the ScheduledQueryRuleResourceInner object itself.
+ */
+ public ScheduledQueryRuleResourceInner withSkipQueryValidation(Boolean skipQueryValidation) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ScheduledQueryRuleProperties();
+ }
+ this.innerProperties().withSkipQueryValidation(skipQueryValidation);
+ return this;
+ }
+
+ /**
+ * Get the autoMitigate property: The flag that indicates whether the alert should be automatically resolved or not.
+ * The default is true. Relevant only for rules of the kind LogAlert.
+ *
+ * @return the autoMitigate value.
+ */
+ public Boolean autoMitigate() {
+ return this.innerProperties() == null ? null : this.innerProperties().autoMitigate();
+ }
+
+ /**
+ * Set the autoMitigate property: The flag that indicates whether the alert should be automatically resolved or not.
+ * The default is true. Relevant only for rules of the kind LogAlert.
+ *
+ * @param autoMitigate the autoMitigate value to set.
+ * @return the ScheduledQueryRuleResourceInner object itself.
+ */
+ public ScheduledQueryRuleResourceInner withAutoMitigate(Boolean autoMitigate) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ScheduledQueryRuleProperties();
+ }
+ this.innerProperties().withAutoMitigate(autoMitigate);
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (innerProperties() == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ "Missing required property innerProperties in model ScheduledQueryRuleResourceInner"));
+ } else {
+ innerProperties().validate();
+ }
+ }
+}
diff --git a/sdk/monitor/azure-resourcemanager-monitor-generated/src/main/java/com/azure/resourcemanager/monitor/generated/fluent/models/package-info.java b/sdk/monitor/azure-resourcemanager-monitor-generated/src/main/java/com/azure/resourcemanager/monitor/generated/fluent/models/package-info.java
new file mode 100644
index 0000000000000..f47cfdde9d782
--- /dev/null
+++ b/sdk/monitor/azure-resourcemanager-monitor-generated/src/main/java/com/azure/resourcemanager/monitor/generated/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 MonitorClient. Monitor Management Client. */
+package com.azure.resourcemanager.monitor.generated.fluent.models;
diff --git a/sdk/monitor/azure-resourcemanager-monitor-generated/src/main/java/com/azure/resourcemanager/monitor/generated/fluent/package-info.java b/sdk/monitor/azure-resourcemanager-monitor-generated/src/main/java/com/azure/resourcemanager/monitor/generated/fluent/package-info.java
new file mode 100644
index 0000000000000..42ea0995be6e7
--- /dev/null
+++ b/sdk/monitor/azure-resourcemanager-monitor-generated/src/main/java/com/azure/resourcemanager/monitor/generated/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 MonitorClient. Monitor Management Client. */
+package com.azure.resourcemanager.monitor.generated.fluent;
diff --git a/sdk/monitor/azure-resourcemanager-monitor-generated/src/main/java/com/azure/resourcemanager/monitor/generated/implementation/MonitorClientBuilder.java b/sdk/monitor/azure-resourcemanager-monitor-generated/src/main/java/com/azure/resourcemanager/monitor/generated/implementation/MonitorClientBuilder.java
new file mode 100644
index 0000000000000..95114498d4dd0
--- /dev/null
+++ b/sdk/monitor/azure-resourcemanager-monitor-generated/src/main/java/com/azure/resourcemanager/monitor/generated/implementation/MonitorClientBuilder.java
@@ -0,0 +1,146 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.monitor.generated.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 MonitorClientImpl type. */
+@ServiceClientBuilder(serviceClients = {MonitorClientImpl.class})
+public final class MonitorClientBuilder {
+ /*
+ * The ID of the target subscription.
+ */
+ private String subscriptionId;
+
+ /**
+ * Sets The ID of the target subscription.
+ *
+ * @param subscriptionId the subscriptionId value.
+ * @return the MonitorClientBuilder.
+ */
+ public MonitorClientBuilder subscriptionId(String subscriptionId) {
+ this.subscriptionId = subscriptionId;
+ return this;
+ }
+
+ /*
+ * server parameter
+ */
+ private String endpoint;
+
+ /**
+ * Sets server parameter.
+ *
+ * @param endpoint the endpoint value.
+ * @return the MonitorClientBuilder.
+ */
+ public MonitorClientBuilder 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 MonitorClientBuilder.
+ */
+ public MonitorClientBuilder 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 MonitorClientBuilder.
+ */
+ public MonitorClientBuilder 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 MonitorClientBuilder.
+ */
+ public MonitorClientBuilder 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 MonitorClientBuilder.
+ */
+ public MonitorClientBuilder serializerAdapter(SerializerAdapter serializerAdapter) {
+ this.serializerAdapter = serializerAdapter;
+ return this;
+ }
+
+ /**
+ * Builds an instance of MonitorClientImpl with the provided parameters.
+ *
+ * @return an instance of MonitorClientImpl.
+ */
+ public MonitorClientImpl 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();
+ }
+ MonitorClientImpl client =
+ new MonitorClientImpl(
+ pipeline, serializerAdapter, defaultPollInterval, environment, subscriptionId, endpoint);
+ return client;
+ }
+}
diff --git a/sdk/monitor/azure-resourcemanager-monitor-generated/src/main/java/com/azure/resourcemanager/monitor/generated/implementation/MonitorClientImpl.java b/sdk/monitor/azure-resourcemanager-monitor-generated/src/main/java/com/azure/resourcemanager/monitor/generated/implementation/MonitorClientImpl.java
new file mode 100644
index 0000000000000..7d49105e220e1
--- /dev/null
+++ b/sdk/monitor/azure-resourcemanager-monitor-generated/src/main/java/com/azure/resourcemanager/monitor/generated/implementation/MonitorClientImpl.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.monitor.generated.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.monitor.generated.fluent.MonitorClient;
+import com.azure.resourcemanager.monitor.generated.fluent.ScheduledQueryRulesClient;
+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 MonitorClientImpl type. */
+@ServiceClient(builder = MonitorClientBuilder.class)
+public final class MonitorClientImpl implements MonitorClient {
+ private final ClientLogger logger = new ClientLogger(MonitorClientImpl.class);
+
+ /** The ID of the target subscription. */
+ private final String subscriptionId;
+
+ /**
+ * Gets The ID of the target subscription.
+ *
+ * @return the subscriptionId value.
+ */
+ public String getSubscriptionId() {
+ return this.subscriptionId;
+ }
+
+ /** 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 ScheduledQueryRulesClient object to access its operations. */
+ private final ScheduledQueryRulesClient scheduledQueryRules;
+
+ /**
+ * Gets the ScheduledQueryRulesClient object to access its operations.
+ *
+ * @return the ScheduledQueryRulesClient object.
+ */
+ public ScheduledQueryRulesClient getScheduledQueryRules() {
+ return this.scheduledQueryRules;
+ }
+
+ /**
+ * Initializes an instance of MonitorClient 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 subscriptionId The ID of the target subscription.
+ * @param endpoint server parameter.
+ */
+ MonitorClientImpl(
+ HttpPipeline httpPipeline,
+ SerializerAdapter serializerAdapter,
+ Duration defaultPollInterval,
+ AzureEnvironment environment,
+ String subscriptionId,
+ String endpoint) {
+ this.httpPipeline = httpPipeline;
+ this.serializerAdapter = serializerAdapter;
+ this.defaultPollInterval = defaultPollInterval;
+ this.subscriptionId = subscriptionId;
+ this.endpoint = endpoint;
+ this.apiVersion = "2021-08-01";
+ this.scheduledQueryRules = new ScheduledQueryRulesClientImpl(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