diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt
index 63e51f36b1ec..376923d1b8d6 100644
--- a/eng/versioning/version_client.txt
+++ b/eng/versioning/version_client.txt
@@ -206,6 +206,7 @@ com.azure.resourcemanager:azure-resourcemanager-digitaltwins;1.0.0-beta.1;1.0.0-
com.azure.resourcemanager:azure-resourcemanager-netapp;1.0.0-beta.1;1.0.0-beta.2
com.azure.resourcemanager:azure-resourcemanager-storagecache;1.0.0-beta.1;1.0.0-beta.2
com.azure.resourcemanager:azure-resourcemanager-redisenterprise;1.0.0-beta.1;1.0.0-beta.2
+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 000000000000..2167818534e2
--- /dev/null
+++ b/sdk/monitor/azure-resourcemanager-monitor-generated/CHANGELOG.md
@@ -0,0 +1,5 @@
+# Release History
+
+## 1.0.0-beta.1 (2021-02-24)
+
+- Azure Resource Manager Monitor client library for Java. This package contains Microsoft Azure SDK for Monitor Management SDK. Monitor Management Client. Package tag package-2020-10. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
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 000000000000..b309ebca320a
--- /dev/null
+++ b/sdk/monitor/azure-resourcemanager-monitor-generated/README.md
@@ -0,0 +1,99 @@
+# 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-2020-10. 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
+
+## 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/monitor/azure-resourcemanager-monitor-generated/pom.xml b/sdk/monitor/azure-resourcemanager-monitor-generated/pom.xml
new file mode 100644
index 000000000000..61af90c6ae50
--- /dev/null
+++ b/sdk/monitor/azure-resourcemanager-monitor-generated/pom.xml
@@ -0,0 +1,67 @@
+
+ 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. Monitor Management Client. Package tag package-2020-10. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt
+ 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.13.0
+
+
+ com.azure
+ azure-core-management
+ 1.1.1
+
+
+
+
+
+ org.jacoco
+ jacoco-maven-plugin
+ 0.8.5
+
+ true
+
+
+
+
+
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 000000000000..93426dd44b75
--- /dev/null
+++ b/sdk/monitor/azure-resourcemanager-monitor-generated/src/main/java/com/azure/resourcemanager/monitor/generated/MonitorManager.java
@@ -0,0 +1,214 @@
+// 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.policy.AddDatePolicy;
+import com.azure.core.http.policy.BearerTokenAuthenticationPolicy;
+import com.azure.core.http.policy.HttpLogOptions;
+import com.azure.core.http.policy.HttpLoggingPolicy;
+import com.azure.core.http.policy.HttpPipelinePolicy;
+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.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.ActivityLogAlertsImpl;
+import com.azure.resourcemanager.monitor.generated.implementation.MonitorClientBuilder;
+import com.azure.resourcemanager.monitor.generated.models.ActivityLogAlerts;
+import java.time.Duration;
+import java.time.temporal.ChronoUnit;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Objects;
+
+/** Entry point to MonitorManager. Monitor Management Client. */
+public final class MonitorManager {
+ private ActivityLogAlerts activityLogAlerts;
+
+ 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 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;
+ }
+
+ /**
+ * 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 (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 BearerTokenAuthenticationPolicy(
+ credential, profile.getEnvironment().getManagementEndpoint() + "/.default"));
+ 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 ActivityLogAlerts. */
+ public ActivityLogAlerts activityLogAlerts() {
+ if (this.activityLogAlerts == null) {
+ this.activityLogAlerts = new ActivityLogAlertsImpl(clientObject.getActivityLogAlerts(), this);
+ }
+ return activityLogAlerts;
+ }
+
+ /**
+ * @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/ActivityLogAlertsClient.java b/sdk/monitor/azure-resourcemanager-monitor-generated/src/main/java/com/azure/resourcemanager/monitor/generated/fluent/ActivityLogAlertsClient.java
new file mode 100644
index 000000000000..cf228e11fe07
--- /dev/null
+++ b/sdk/monitor/azure-resourcemanager-monitor-generated/src/main/java/com/azure/resourcemanager/monitor/generated/fluent/ActivityLogAlertsClient.java
@@ -0,0 +1,187 @@
+// 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.ActivityLogAlertResourceInner;
+import com.azure.resourcemanager.monitor.generated.models.AlertRulePatchObject;
+
+/** An instance of this class provides access to all the operations defined in ActivityLogAlertsClient. */
+public interface ActivityLogAlertsClient {
+ /**
+ * Create a new Activity Log Alert rule or update an existing one.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param activityLogAlertName The name of the Activity Log Alert rule.
+ * @param activityLogAlertRule The Activity Log Alert rule to create or use for the 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 an Activity Log Alert rule resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ActivityLogAlertResourceInner createOrUpdate(
+ String resourceGroupName, String activityLogAlertName, ActivityLogAlertResourceInner activityLogAlertRule);
+
+ /**
+ * Create a new Activity Log Alert rule or update an existing one.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param activityLogAlertName The name of the Activity Log Alert rule.
+ * @param activityLogAlertRule The Activity Log Alert rule to create or use for the 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 an Activity Log Alert rule resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response createOrUpdateWithResponse(
+ String resourceGroupName,
+ String activityLogAlertName,
+ ActivityLogAlertResourceInner activityLogAlertRule,
+ Context context);
+
+ /**
+ * Get an Activity Log Alert rule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param activityLogAlertName The name of the Activity Log Alert 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 an Activity Log Alert rule.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ActivityLogAlertResourceInner getByResourceGroup(String resourceGroupName, String activityLogAlertName);
+
+ /**
+ * Get an Activity Log Alert rule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param activityLogAlertName The name of the Activity Log Alert 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 an Activity Log Alert rule.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getByResourceGroupWithResponse(
+ String resourceGroupName, String activityLogAlertName, Context context);
+
+ /**
+ * Delete an Activity Log Alert rule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param activityLogAlertName The name of the Activity Log Alert 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 activityLogAlertName);
+
+ /**
+ * Delete an Activity Log Alert rule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param activityLogAlertName The name of the Activity Log Alert 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 activityLogAlertName, Context context);
+
+ /**
+ * Updates 'tags' and 'enabled' fields in an existing Alert rule. This method is used to update the Alert rule tags,
+ * and to enable or disable the Alert rule. To update other fields use CreateOrUpdate operation.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param activityLogAlertName The name of the Activity Log Alert rule.
+ * @param activityLogAlertRulePatch Parameters supplied to the 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 an Activity Log Alert rule resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ActivityLogAlertResourceInner update(
+ String resourceGroupName, String activityLogAlertName, AlertRulePatchObject activityLogAlertRulePatch);
+
+ /**
+ * Updates 'tags' and 'enabled' fields in an existing Alert rule. This method is used to update the Alert rule tags,
+ * and to enable or disable the Alert rule. To update other fields use CreateOrUpdate operation.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param activityLogAlertName The name of the Activity Log Alert rule.
+ * @param activityLogAlertRulePatch Parameters supplied to the operation.
+ * @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 an Activity Log Alert rule resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response updateWithResponse(
+ String resourceGroupName,
+ String activityLogAlertName,
+ AlertRulePatchObject activityLogAlertRulePatch,
+ Context context);
+
+ /**
+ * Get a list of all Activity Log Alert rules 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 a list of all Activity Log Alert rules in a subscription.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
+
+ /**
+ * Get a list of all Activity Log Alert rules 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 a list of all Activity Log Alert rules in a subscription.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(Context context);
+
+ /**
+ * Get a list of all Activity Log Alert rules 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 a list of all Activity Log Alert rules in a resource group.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName);
+
+ /**
+ * Get a list of all Activity Log Alert rules 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 a list of all Activity Log Alert rules in a resource group.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName, Context context);
+}
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 000000000000..95d67bade0b9
--- /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 ActivityLogAlertsClient object to access its operations.
+ *
+ * @return the ActivityLogAlertsClient object.
+ */
+ ActivityLogAlertsClient getActivityLogAlerts();
+}
diff --git a/sdk/monitor/azure-resourcemanager-monitor-generated/src/main/java/com/azure/resourcemanager/monitor/generated/fluent/models/ActivityLogAlertResourceInner.java b/sdk/monitor/azure-resourcemanager-monitor-generated/src/main/java/com/azure/resourcemanager/monitor/generated/fluent/models/ActivityLogAlertResourceInner.java
new file mode 100644
index 000000000000..81a21da9acfe
--- /dev/null
+++ b/sdk/monitor/azure-resourcemanager-monitor-generated/src/main/java/com/azure/resourcemanager/monitor/generated/fluent/models/ActivityLogAlertResourceInner.java
@@ -0,0 +1,193 @@
+// 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.annotation.JsonFlatten;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.monitor.generated.models.ActionList;
+import com.azure.resourcemanager.monitor.generated.models.AlertRuleAllOfCondition;
+import com.azure.resourcemanager.monitor.generated.models.AzureResource;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+import java.util.Map;
+
+/** An Activity Log Alert rule resource. */
+@JsonFlatten
+@Fluent
+public class ActivityLogAlertResourceInner extends AzureResource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(ActivityLogAlertResourceInner.class);
+
+ /*
+ * A list of resource IDs that will be used as prefixes. The alert will
+ * only apply to Activity Log events with resource IDs that fall under one
+ * of these prefixes. This list must include at least one item.
+ */
+ @JsonProperty(value = "properties.scopes")
+ private List scopes;
+
+ /*
+ * The condition that will cause this alert to activate.
+ */
+ @JsonProperty(value = "properties.condition")
+ private AlertRuleAllOfCondition condition;
+
+ /*
+ * The actions that will activate when the condition is met.
+ */
+ @JsonProperty(value = "properties.actions")
+ private ActionList actions;
+
+ /*
+ * Indicates whether this Activity Log Alert rule is enabled. If an
+ * Activity Log Alert rule is not enabled, then none of its actions will be
+ * activated.
+ */
+ @JsonProperty(value = "properties.enabled")
+ private Boolean enabled;
+
+ /*
+ * A description of this Activity Log Alert rule.
+ */
+ @JsonProperty(value = "properties.description")
+ private String description;
+
+ /**
+ * Get the scopes property: A list of resource IDs that will be used as prefixes. The alert will only apply to
+ * Activity Log events with resource IDs that fall under one of these prefixes. This list must include at least one
+ * item.
+ *
+ * @return the scopes value.
+ */
+ public List scopes() {
+ return this.scopes;
+ }
+
+ /**
+ * Set the scopes property: A list of resource IDs that will be used as prefixes. The alert will only apply to
+ * Activity Log events with resource IDs that fall under one of these prefixes. This list must include at least one
+ * item.
+ *
+ * @param scopes the scopes value to set.
+ * @return the ActivityLogAlertResourceInner object itself.
+ */
+ public ActivityLogAlertResourceInner withScopes(List scopes) {
+ this.scopes = scopes;
+ return this;
+ }
+
+ /**
+ * Get the condition property: The condition that will cause this alert to activate.
+ *
+ * @return the condition value.
+ */
+ public AlertRuleAllOfCondition condition() {
+ return this.condition;
+ }
+
+ /**
+ * Set the condition property: The condition that will cause this alert to activate.
+ *
+ * @param condition the condition value to set.
+ * @return the ActivityLogAlertResourceInner object itself.
+ */
+ public ActivityLogAlertResourceInner withCondition(AlertRuleAllOfCondition condition) {
+ this.condition = condition;
+ return this;
+ }
+
+ /**
+ * Get the actions property: The actions that will activate when the condition is met.
+ *
+ * @return the actions value.
+ */
+ public ActionList actions() {
+ return this.actions;
+ }
+
+ /**
+ * Set the actions property: The actions that will activate when the condition is met.
+ *
+ * @param actions the actions value to set.
+ * @return the ActivityLogAlertResourceInner object itself.
+ */
+ public ActivityLogAlertResourceInner withActions(ActionList actions) {
+ this.actions = actions;
+ return this;
+ }
+
+ /**
+ * Get the enabled property: Indicates whether this Activity Log Alert rule is enabled. If an Activity Log Alert
+ * rule is not enabled, then none of its actions will be activated.
+ *
+ * @return the enabled value.
+ */
+ public Boolean enabled() {
+ return this.enabled;
+ }
+
+ /**
+ * Set the enabled property: Indicates whether this Activity Log Alert rule is enabled. If an Activity Log Alert
+ * rule is not enabled, then none of its actions will be activated.
+ *
+ * @param enabled the enabled value to set.
+ * @return the ActivityLogAlertResourceInner object itself.
+ */
+ public ActivityLogAlertResourceInner withEnabled(Boolean enabled) {
+ this.enabled = enabled;
+ return this;
+ }
+
+ /**
+ * Get the description property: A description of this Activity Log Alert rule.
+ *
+ * @return the description value.
+ */
+ public String description() {
+ return this.description;
+ }
+
+ /**
+ * Set the description property: A description of this Activity Log Alert rule.
+ *
+ * @param description the description value to set.
+ * @return the ActivityLogAlertResourceInner object itself.
+ */
+ public ActivityLogAlertResourceInner withDescription(String description) {
+ this.description = description;
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public ActivityLogAlertResourceInner withLocation(String location) {
+ super.withLocation(location);
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public ActivityLogAlertResourceInner withTags(Map tags) {
+ super.withTags(tags);
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ @Override
+ public void validate() {
+ super.validate();
+ if (condition() != null) {
+ condition().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/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 000000000000..f47cfdde9d78
--- /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 000000000000..42ea0995be6e
--- /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/ActivityLogAlertResourceImpl.java b/sdk/monitor/azure-resourcemanager-monitor-generated/src/main/java/com/azure/resourcemanager/monitor/generated/implementation/ActivityLogAlertResourceImpl.java
new file mode 100644
index 000000000000..f061618900a9
--- /dev/null
+++ b/sdk/monitor/azure-resourcemanager-monitor-generated/src/main/java/com/azure/resourcemanager/monitor/generated/implementation/ActivityLogAlertResourceImpl.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.monitor.generated.implementation;
+
+import com.azure.core.management.Region;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.monitor.generated.MonitorManager;
+import com.azure.resourcemanager.monitor.generated.fluent.models.ActivityLogAlertResourceInner;
+import com.azure.resourcemanager.monitor.generated.models.ActionList;
+import com.azure.resourcemanager.monitor.generated.models.ActivityLogAlertResource;
+import com.azure.resourcemanager.monitor.generated.models.AlertRuleAllOfCondition;
+import com.azure.resourcemanager.monitor.generated.models.AlertRulePatchObject;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+
+public final class ActivityLogAlertResourceImpl
+ implements ActivityLogAlertResource, ActivityLogAlertResource.Definition, ActivityLogAlertResource.Update {
+ private ActivityLogAlertResourceInner innerObject;
+
+ private final MonitorManager serviceManager;
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
+ public String location() {
+ return this.innerModel().location();
+ }
+
+ public Map tags() {
+ Map inner = this.innerModel().tags();
+ if (inner != null) {
+ return Collections.unmodifiableMap(inner);
+ } else {
+ return Collections.emptyMap();
+ }
+ }
+
+ public List scopes() {
+ List inner = this.innerModel().scopes();
+ if (inner != null) {
+ return Collections.unmodifiableList(inner);
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public AlertRuleAllOfCondition condition() {
+ return this.innerModel().condition();
+ }
+
+ public ActionList actions() {
+ return this.innerModel().actions();
+ }
+
+ public Boolean enabled() {
+ return this.innerModel().enabled();
+ }
+
+ public String description() {
+ return this.innerModel().description();
+ }
+
+ public Region region() {
+ return Region.fromName(this.regionName());
+ }
+
+ public String regionName() {
+ return this.location();
+ }
+
+ public ActivityLogAlertResourceInner innerModel() {
+ return this.innerObject;
+ }
+
+ private MonitorManager manager() {
+ return this.serviceManager;
+ }
+
+ private String resourceGroupName;
+
+ private String activityLogAlertName;
+
+ private AlertRulePatchObject updateActivityLogAlertRulePatch;
+
+ public ActivityLogAlertResourceImpl withExistingResourceGroup(String resourceGroupName) {
+ this.resourceGroupName = resourceGroupName;
+ return this;
+ }
+
+ public ActivityLogAlertResource create() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getActivityLogAlerts()
+ .createOrUpdateWithResponse(resourceGroupName, activityLogAlertName, this.innerModel(), Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public ActivityLogAlertResource create(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getActivityLogAlerts()
+ .createOrUpdateWithResponse(resourceGroupName, activityLogAlertName, this.innerModel(), context)
+ .getValue();
+ return this;
+ }
+
+ ActivityLogAlertResourceImpl(String name, MonitorManager serviceManager) {
+ this.innerObject = new ActivityLogAlertResourceInner();
+ this.serviceManager = serviceManager;
+ this.activityLogAlertName = name;
+ }
+
+ public ActivityLogAlertResourceImpl update() {
+ this.updateActivityLogAlertRulePatch = new AlertRulePatchObject();
+ return this;
+ }
+
+ public ActivityLogAlertResource apply() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getActivityLogAlerts()
+ .updateWithResponse(
+ resourceGroupName, activityLogAlertName, updateActivityLogAlertRulePatch, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public ActivityLogAlertResource apply(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getActivityLogAlerts()
+ .updateWithResponse(resourceGroupName, activityLogAlertName, updateActivityLogAlertRulePatch, context)
+ .getValue();
+ return this;
+ }
+
+ ActivityLogAlertResourceImpl(ActivityLogAlertResourceInner innerObject, MonitorManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups");
+ this.activityLogAlertName = Utils.getValueFromIdByName(innerObject.id(), "activityLogAlerts");
+ }
+
+ public ActivityLogAlertResource refresh() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getActivityLogAlerts()
+ .getByResourceGroupWithResponse(resourceGroupName, activityLogAlertName, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public ActivityLogAlertResource refresh(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getActivityLogAlerts()
+ .getByResourceGroupWithResponse(resourceGroupName, activityLogAlertName, context)
+ .getValue();
+ return this;
+ }
+
+ public ActivityLogAlertResourceImpl withRegion(Region location) {
+ this.innerModel().withLocation(location.toString());
+ return this;
+ }
+
+ public ActivityLogAlertResourceImpl withRegion(String location) {
+ this.innerModel().withLocation(location);
+ return this;
+ }
+
+ public ActivityLogAlertResourceImpl withTags(Map tags) {
+ if (isInCreateMode()) {
+ this.innerModel().withTags(tags);
+ return this;
+ } else {
+ this.updateActivityLogAlertRulePatch.withTags(tags);
+ return this;
+ }
+ }
+
+ public ActivityLogAlertResourceImpl withScopes(List scopes) {
+ this.innerModel().withScopes(scopes);
+ return this;
+ }
+
+ public ActivityLogAlertResourceImpl withCondition(AlertRuleAllOfCondition condition) {
+ this.innerModel().withCondition(condition);
+ return this;
+ }
+
+ public ActivityLogAlertResourceImpl withActions(ActionList actions) {
+ this.innerModel().withActions(actions);
+ return this;
+ }
+
+ public ActivityLogAlertResourceImpl withEnabled(Boolean enabled) {
+ if (isInCreateMode()) {
+ this.innerModel().withEnabled(enabled);
+ return this;
+ } else {
+ this.updateActivityLogAlertRulePatch.withEnabled(enabled);
+ return this;
+ }
+ }
+
+ public ActivityLogAlertResourceImpl withDescription(String description) {
+ this.innerModel().withDescription(description);
+ return this;
+ }
+
+ private boolean isInCreateMode() {
+ return this.innerModel().id() == null;
+ }
+}
diff --git a/sdk/monitor/azure-resourcemanager-monitor-generated/src/main/java/com/azure/resourcemanager/monitor/generated/implementation/ActivityLogAlertsClientImpl.java b/sdk/monitor/azure-resourcemanager-monitor-generated/src/main/java/com/azure/resourcemanager/monitor/generated/implementation/ActivityLogAlertsClientImpl.java
new file mode 100644
index 000000000000..048163997b39
--- /dev/null
+++ b/sdk/monitor/azure-resourcemanager-monitor-generated/src/main/java/com/azure/resourcemanager/monitor/generated/implementation/ActivityLogAlertsClientImpl.java
@@ -0,0 +1,1287 @@
+// 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.BodyParam;
+import com.azure.core.annotation.Delete;
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.Patch;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.Put;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.monitor.generated.fluent.ActivityLogAlertsClient;
+import com.azure.resourcemanager.monitor.generated.fluent.models.ActivityLogAlertResourceInner;
+import com.azure.resourcemanager.monitor.generated.models.AlertRuleList;
+import com.azure.resourcemanager.monitor.generated.models.AlertRulePatchObject;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in ActivityLogAlertsClient. */
+public final class ActivityLogAlertsClientImpl implements ActivityLogAlertsClient {
+ private final ClientLogger logger = new ClientLogger(ActivityLogAlertsClientImpl.class);
+
+ /** The proxy service used to perform REST calls. */
+ private final ActivityLogAlertsService service;
+
+ /** The service client containing this operation class. */
+ private final MonitorClientImpl client;
+
+ /**
+ * Initializes an instance of ActivityLogAlertsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ ActivityLogAlertsClientImpl(MonitorClientImpl client) {
+ this.service =
+ RestProxy.create(ActivityLogAlertsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for MonitorClientActivityLogAlerts to be used by the proxy service to
+ * perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "MonitorClientActivit")
+ private interface ActivityLogAlertsService {
+ @Headers({"Content-Type: application/json"})
+ @Put(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights"
+ + "/activityLogAlerts/{activityLogAlertName}")
+ @ExpectedResponses({200, 201})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> createOrUpdate(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("activityLogAlertName") String activityLogAlertName,
+ @QueryParam("api-version") String apiVersion,
+ @BodyParam("application/json") ActivityLogAlertResourceInner activityLogAlertRule,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights"
+ + "/activityLogAlerts/{activityLogAlertName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> getByResourceGroup(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("activityLogAlertName") String activityLogAlertName,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Delete(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights"
+ + "/activityLogAlerts/{activityLogAlertName}")
+ @ExpectedResponses({200, 204})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> delete(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("activityLogAlertName") String activityLogAlertName,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Patch(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights"
+ + "/activityLogAlerts/{activityLogAlertName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> update(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("activityLogAlertName") String activityLogAlertName,
+ @QueryParam("api-version") String apiVersion,
+ @BodyParam("application/json") AlertRulePatchObject activityLogAlertRulePatch,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Insights/activityLogAlerts")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> list(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights"
+ + "/activityLogAlerts")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByResourceGroup(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("{nextLink}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listBySubscriptionIdNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("{nextLink}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByResourceGroupNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * Create a new Activity Log Alert rule or update an existing one.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param activityLogAlertName The name of the Activity Log Alert rule.
+ * @param activityLogAlertRule The Activity Log Alert rule to create or use for the update.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an Activity Log Alert rule resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> createOrUpdateWithResponseAsync(
+ String resourceGroupName, String activityLogAlertName, ActivityLogAlertResourceInner activityLogAlertRule) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (activityLogAlertName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter activityLogAlertName is required and cannot be null."));
+ }
+ if (activityLogAlertRule == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter activityLogAlertRule is required and cannot be null."));
+ } else {
+ activityLogAlertRule.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .createOrUpdate(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ activityLogAlertName,
+ this.client.getApiVersion(),
+ activityLogAlertRule,
+ accept,
+ context))
+ .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ }
+
+ /**
+ * Create a new Activity Log Alert rule or update an existing one.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param activityLogAlertName The name of the Activity Log Alert rule.
+ * @param activityLogAlertRule The Activity Log Alert rule to create or use for the update.
+ * @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 an Activity Log Alert rule resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> createOrUpdateWithResponseAsync(
+ String resourceGroupName,
+ String activityLogAlertName,
+ ActivityLogAlertResourceInner activityLogAlertRule,
+ Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (activityLogAlertName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter activityLogAlertName is required and cannot be null."));
+ }
+ if (activityLogAlertRule == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter activityLogAlertRule is required and cannot be null."));
+ } else {
+ activityLogAlertRule.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .createOrUpdate(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ activityLogAlertName,
+ this.client.getApiVersion(),
+ activityLogAlertRule,
+ accept,
+ context);
+ }
+
+ /**
+ * Create a new Activity Log Alert rule or update an existing one.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param activityLogAlertName The name of the Activity Log Alert rule.
+ * @param activityLogAlertRule The Activity Log Alert rule to create or use for the update.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an Activity Log Alert rule resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createOrUpdateAsync(
+ String resourceGroupName, String activityLogAlertName, ActivityLogAlertResourceInner activityLogAlertRule) {
+ return createOrUpdateWithResponseAsync(resourceGroupName, activityLogAlertName, activityLogAlertRule)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * Create a new Activity Log Alert rule or update an existing one.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param activityLogAlertName The name of the Activity Log Alert rule.
+ * @param activityLogAlertRule The Activity Log Alert rule to create or use for the update.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an Activity Log Alert rule resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public ActivityLogAlertResourceInner createOrUpdate(
+ String resourceGroupName, String activityLogAlertName, ActivityLogAlertResourceInner activityLogAlertRule) {
+ return createOrUpdateAsync(resourceGroupName, activityLogAlertName, activityLogAlertRule).block();
+ }
+
+ /**
+ * Create a new Activity Log Alert rule or update an existing one.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param activityLogAlertName The name of the Activity Log Alert rule.
+ * @param activityLogAlertRule The Activity Log Alert rule to create or use for the update.
+ * @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 an Activity Log Alert rule resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response createOrUpdateWithResponse(
+ String resourceGroupName,
+ String activityLogAlertName,
+ ActivityLogAlertResourceInner activityLogAlertRule,
+ Context context) {
+ return createOrUpdateWithResponseAsync(resourceGroupName, activityLogAlertName, activityLogAlertRule, context)
+ .block();
+ }
+
+ /**
+ * Get an Activity Log Alert rule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param activityLogAlertName The name of the Activity Log Alert rule.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an Activity Log Alert rule.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getByResourceGroupWithResponseAsync(
+ String resourceGroupName, String activityLogAlertName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (activityLogAlertName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter activityLogAlertName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .getByResourceGroup(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ activityLogAlertName,
+ this.client.getApiVersion(),
+ accept,
+ context))
+ .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ }
+
+ /**
+ * Get an Activity Log Alert rule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param activityLogAlertName The name of the Activity Log Alert rule.
+ * @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 an Activity Log Alert rule.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getByResourceGroupWithResponseAsync(
+ String resourceGroupName, String activityLogAlertName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (activityLogAlertName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter activityLogAlertName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .getByResourceGroup(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ activityLogAlertName,
+ this.client.getApiVersion(),
+ accept,
+ context);
+ }
+
+ /**
+ * Get an Activity Log Alert rule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param activityLogAlertName The name of the Activity Log Alert rule.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an Activity Log Alert rule.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getByResourceGroupAsync(
+ String resourceGroupName, String activityLogAlertName) {
+ return getByResourceGroupWithResponseAsync(resourceGroupName, activityLogAlertName)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * Get an Activity Log Alert rule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param activityLogAlertName The name of the Activity Log Alert rule.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an Activity Log Alert rule.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public ActivityLogAlertResourceInner getByResourceGroup(String resourceGroupName, String activityLogAlertName) {
+ return getByResourceGroupAsync(resourceGroupName, activityLogAlertName).block();
+ }
+
+ /**
+ * Get an Activity Log Alert rule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param activityLogAlertName The name of the Activity Log Alert rule.
+ * @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 an Activity Log Alert rule.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getByResourceGroupWithResponse(
+ String resourceGroupName, String activityLogAlertName, Context context) {
+ return getByResourceGroupWithResponseAsync(resourceGroupName, activityLogAlertName, context).block();
+ }
+
+ /**
+ * Delete an Activity Log Alert rule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param activityLogAlertName The name of the Activity Log Alert rule.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> deleteWithResponseAsync(String resourceGroupName, String activityLogAlertName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (activityLogAlertName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter activityLogAlertName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .delete(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ activityLogAlertName,
+ this.client.getApiVersion(),
+ accept,
+ context))
+ .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ }
+
+ /**
+ * Delete an Activity Log Alert rule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param activityLogAlertName The name of the Activity Log Alert rule.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> deleteWithResponseAsync(
+ String resourceGroupName, String activityLogAlertName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (activityLogAlertName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter activityLogAlertName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .delete(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ activityLogAlertName,
+ this.client.getApiVersion(),
+ accept,
+ context);
+ }
+
+ /**
+ * Delete an Activity Log Alert rule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param activityLogAlertName The name of the Activity Log Alert rule.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono deleteAsync(String resourceGroupName, String activityLogAlertName) {
+ return deleteWithResponseAsync(resourceGroupName, activityLogAlertName)
+ .flatMap((Response res) -> Mono.empty());
+ }
+
+ /**
+ * Delete an Activity Log Alert rule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param activityLogAlertName The name of the Activity Log Alert rule.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void delete(String resourceGroupName, String activityLogAlertName) {
+ deleteAsync(resourceGroupName, activityLogAlertName).block();
+ }
+
+ /**
+ * Delete an Activity Log Alert rule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param activityLogAlertName The name of the Activity Log Alert rule.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response deleteWithResponse(String resourceGroupName, String activityLogAlertName, Context context) {
+ return deleteWithResponseAsync(resourceGroupName, activityLogAlertName, context).block();
+ }
+
+ /**
+ * Updates 'tags' and 'enabled' fields in an existing Alert rule. This method is used to update the Alert rule tags,
+ * and to enable or disable the Alert rule. To update other fields use CreateOrUpdate operation.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param activityLogAlertName The name of the Activity Log Alert rule.
+ * @param activityLogAlertRulePatch Parameters supplied to the 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 an Activity Log Alert rule resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> updateWithResponseAsync(
+ String resourceGroupName, String activityLogAlertName, AlertRulePatchObject activityLogAlertRulePatch) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (activityLogAlertName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter activityLogAlertName is required and cannot be null."));
+ }
+ if (activityLogAlertRulePatch == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter activityLogAlertRulePatch is required and cannot be null."));
+ } else {
+ activityLogAlertRulePatch.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .update(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ activityLogAlertName,
+ this.client.getApiVersion(),
+ activityLogAlertRulePatch,
+ accept,
+ context))
+ .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ }
+
+ /**
+ * Updates 'tags' and 'enabled' fields in an existing Alert rule. This method is used to update the Alert rule tags,
+ * and to enable or disable the Alert rule. To update other fields use CreateOrUpdate operation.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param activityLogAlertName The name of the Activity Log Alert rule.
+ * @param activityLogAlertRulePatch Parameters supplied to the operation.
+ * @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 an Activity Log Alert rule resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> updateWithResponseAsync(
+ String resourceGroupName,
+ String activityLogAlertName,
+ AlertRulePatchObject activityLogAlertRulePatch,
+ Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (activityLogAlertName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter activityLogAlertName is required and cannot be null."));
+ }
+ if (activityLogAlertRulePatch == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter activityLogAlertRulePatch is required and cannot be null."));
+ } else {
+ activityLogAlertRulePatch.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .update(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ activityLogAlertName,
+ this.client.getApiVersion(),
+ activityLogAlertRulePatch,
+ accept,
+ context);
+ }
+
+ /**
+ * Updates 'tags' and 'enabled' fields in an existing Alert rule. This method is used to update the Alert rule tags,
+ * and to enable or disable the Alert rule. To update other fields use CreateOrUpdate operation.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param activityLogAlertName The name of the Activity Log Alert rule.
+ * @param activityLogAlertRulePatch Parameters supplied to the 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 an Activity Log Alert rule resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono updateAsync(
+ String resourceGroupName, String activityLogAlertName, AlertRulePatchObject activityLogAlertRulePatch) {
+ return updateWithResponseAsync(resourceGroupName, activityLogAlertName, activityLogAlertRulePatch)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * Updates 'tags' and 'enabled' fields in an existing Alert rule. This method is used to update the Alert rule tags,
+ * and to enable or disable the Alert rule. To update other fields use CreateOrUpdate operation.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param activityLogAlertName The name of the Activity Log Alert rule.
+ * @param activityLogAlertRulePatch Parameters supplied to the 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 an Activity Log Alert rule resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public ActivityLogAlertResourceInner update(
+ String resourceGroupName, String activityLogAlertName, AlertRulePatchObject activityLogAlertRulePatch) {
+ return updateAsync(resourceGroupName, activityLogAlertName, activityLogAlertRulePatch).block();
+ }
+
+ /**
+ * Updates 'tags' and 'enabled' fields in an existing Alert rule. This method is used to update the Alert rule tags,
+ * and to enable or disable the Alert rule. To update other fields use CreateOrUpdate operation.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param activityLogAlertName The name of the Activity Log Alert rule.
+ * @param activityLogAlertRulePatch Parameters supplied to the operation.
+ * @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 an Activity Log Alert rule resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response updateWithResponse(
+ String resourceGroupName,
+ String activityLogAlertName,
+ AlertRulePatchObject activityLogAlertRulePatch,
+ Context context) {
+ return updateWithResponseAsync(resourceGroupName, activityLogAlertName, activityLogAlertRulePatch, context)
+ .block();
+ }
+
+ /**
+ * Get a list of all Activity Log Alert rules in a subscription.
+ *
+ * @throws 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 Activity Log Alert rules in a subscription.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync() {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .list(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ this.client.getApiVersion(),
+ accept,
+ context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ }
+
+ /**
+ * Get a list of all Activity Log Alert rules in a subscription.
+ *
+ * @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 Activity Log Alert rules in a subscription.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .list(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ 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 Activity Log Alert rules in a subscription.
+ *
+ * @throws 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 Activity Log Alert rules in a subscription.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync() {
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(), nextLink -> listBySubscriptionIdNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Get a list of all Activity Log Alert rules in a subscription.
+ *
+ * @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 Activity Log Alert rules in a subscription.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(Context context) {
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(context), nextLink -> listBySubscriptionIdNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * Get a list of all Activity Log Alert rules in a subscription.
+ *
+ * @throws 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 Activity Log Alert rules in a subscription.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list() {
+ return new PagedIterable<>(listAsync());
+ }
+
+ /**
+ * Get a list of all Activity Log Alert rules in a subscription.
+ *
+ * @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 Activity Log Alert rules in a subscription.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(Context context) {
+ return new PagedIterable<>(listAsync(context));
+ }
+
+ /**
+ * Get a list of all Activity Log Alert rules 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 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 Activity Log Alert rules in a resource group.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByResourceGroupSinglePageAsync(
+ String resourceGroupName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .listByResourceGroup(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ this.client.getApiVersion(),
+ accept,
+ context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ }
+
+ /**
+ * Get a list of all Activity Log Alert rules 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 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 Activity Log Alert rules in a resource group.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByResourceGroupSinglePageAsync(
+ String resourceGroupName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listByResourceGroup(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ 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 Activity Log Alert rules 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 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 Activity Log Alert rules in a resource group.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByResourceGroupAsync(String resourceGroupName) {
+ return new PagedFlux<>(
+ () -> listByResourceGroupSinglePageAsync(resourceGroupName),
+ nextLink -> listByResourceGroupNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Get a list of all Activity Log Alert rules 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 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 Activity Log Alert rules in a resource group.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByResourceGroupAsync(
+ String resourceGroupName, Context context) {
+ return new PagedFlux<>(
+ () -> listByResourceGroupSinglePageAsync(resourceGroupName, context),
+ nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * Get a list of all Activity Log Alert rules 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 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 Activity Log Alert rules in a resource group.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByResourceGroup(String resourceGroupName) {
+ return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName));
+ }
+
+ /**
+ * Get a list of all Activity Log Alert rules 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 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 Activity Log Alert rules in a resource group.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByResourceGroup(String resourceGroupName, Context context) {
+ return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, 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 a list of Activity Log Alert rules.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listBySubscriptionIdNextSinglePageAsync(
+ 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.listBySubscriptionIdNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ }
+
+ /**
+ * 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 a list of Activity Log Alert rules.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listBySubscriptionIdNextSinglePageAsync(
+ 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
+ .listBySubscriptionIdNext(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 a list of Activity Log Alert rules.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ }
+
+ /**
+ * 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 a list of Activity Log Alert rules.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByResourceGroupNextSinglePageAsync(
+ String nextLink, Context context) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+}
diff --git a/sdk/monitor/azure-resourcemanager-monitor-generated/src/main/java/com/azure/resourcemanager/monitor/generated/implementation/ActivityLogAlertsImpl.java b/sdk/monitor/azure-resourcemanager-monitor-generated/src/main/java/com/azure/resourcemanager/monitor/generated/implementation/ActivityLogAlertsImpl.java
new file mode 100644
index 000000000000..11e1775c98a0
--- /dev/null
+++ b/sdk/monitor/azure-resourcemanager-monitor-generated/src/main/java/com/azure/resourcemanager/monitor/generated/implementation/ActivityLogAlertsImpl.java
@@ -0,0 +1,181 @@
+// 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.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.monitor.generated.MonitorManager;
+import com.azure.resourcemanager.monitor.generated.fluent.ActivityLogAlertsClient;
+import com.azure.resourcemanager.monitor.generated.fluent.models.ActivityLogAlertResourceInner;
+import com.azure.resourcemanager.monitor.generated.models.ActivityLogAlertResource;
+import com.azure.resourcemanager.monitor.generated.models.ActivityLogAlerts;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+
+public final class ActivityLogAlertsImpl implements ActivityLogAlerts {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(ActivityLogAlertsImpl.class);
+
+ private final ActivityLogAlertsClient innerClient;
+
+ private final MonitorManager serviceManager;
+
+ public ActivityLogAlertsImpl(ActivityLogAlertsClient innerClient, MonitorManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public ActivityLogAlertResource getByResourceGroup(String resourceGroupName, String activityLogAlertName) {
+ ActivityLogAlertResourceInner inner =
+ this.serviceClient().getByResourceGroup(resourceGroupName, activityLogAlertName);
+ if (inner != null) {
+ return new ActivityLogAlertResourceImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response getByResourceGroupWithResponse(
+ String resourceGroupName, String activityLogAlertName, Context context) {
+ Response inner =
+ this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, activityLogAlertName, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new ActivityLogAlertResourceImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public void deleteByResourceGroup(String resourceGroupName, String activityLogAlertName) {
+ this.serviceClient().delete(resourceGroupName, activityLogAlertName);
+ }
+
+ public Response deleteWithResponse(String resourceGroupName, String activityLogAlertName, Context context) {
+ return this.serviceClient().deleteWithResponse(resourceGroupName, activityLogAlertName, context);
+ }
+
+ public PagedIterable list() {
+ PagedIterable inner = this.serviceClient().list();
+ return Utils.mapPage(inner, inner1 -> new ActivityLogAlertResourceImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list(Context context) {
+ PagedIterable inner = this.serviceClient().list(context);
+ return Utils.mapPage(inner, inner1 -> new ActivityLogAlertResourceImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable listByResourceGroup(String resourceGroupName) {
+ PagedIterable inner =
+ this.serviceClient().listByResourceGroup(resourceGroupName);
+ return Utils.mapPage(inner, inner1 -> new ActivityLogAlertResourceImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable listByResourceGroup(String resourceGroupName, Context context) {
+ PagedIterable inner =
+ this.serviceClient().listByResourceGroup(resourceGroupName, context);
+ return Utils.mapPage(inner, inner1 -> new ActivityLogAlertResourceImpl(inner1, this.manager()));
+ }
+
+ public ActivityLogAlertResource getById(String id) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String activityLogAlertName = Utils.getValueFromIdByName(id, "activityLogAlerts");
+ if (activityLogAlertName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format(
+ "The resource ID '%s' is not valid. Missing path segment 'activityLogAlerts'.", id)));
+ }
+ return this.getByResourceGroupWithResponse(resourceGroupName, activityLogAlertName, Context.NONE).getValue();
+ }
+
+ public Response getByIdWithResponse(String id, Context context) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String activityLogAlertName = Utils.getValueFromIdByName(id, "activityLogAlerts");
+ if (activityLogAlertName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format(
+ "The resource ID '%s' is not valid. Missing path segment 'activityLogAlerts'.", id)));
+ }
+ return this.getByResourceGroupWithResponse(resourceGroupName, activityLogAlertName, context);
+ }
+
+ public void deleteById(String id) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String activityLogAlertName = Utils.getValueFromIdByName(id, "activityLogAlerts");
+ if (activityLogAlertName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format(
+ "The resource ID '%s' is not valid. Missing path segment 'activityLogAlerts'.", id)));
+ }
+ this.deleteWithResponse(resourceGroupName, activityLogAlertName, Context.NONE).getValue();
+ }
+
+ public Response deleteByIdWithResponse(String id, Context context) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String activityLogAlertName = Utils.getValueFromIdByName(id, "activityLogAlerts");
+ if (activityLogAlertName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format(
+ "The resource ID '%s' is not valid. Missing path segment 'activityLogAlerts'.", id)));
+ }
+ return this.deleteWithResponse(resourceGroupName, activityLogAlertName, context);
+ }
+
+ private ActivityLogAlertsClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private MonitorManager manager() {
+ return this.serviceManager;
+ }
+
+ public ActivityLogAlertResourceImpl define(String name) {
+ return new ActivityLogAlertResourceImpl(name, this.manager());
+ }
+}
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 000000000000..95114498d4dd
--- /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 000000000000..729fb712a536
--- /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.ActivityLogAlertsClient;
+import com.azure.resourcemanager.monitor.generated.fluent.MonitorClient;
+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 ActivityLogAlertsClient object to access its operations. */
+ private final ActivityLogAlertsClient activityLogAlerts;
+
+ /**
+ * Gets the ActivityLogAlertsClient object to access its operations.
+ *
+ * @return the ActivityLogAlertsClient object.
+ */
+ public ActivityLogAlertsClient getActivityLogAlerts() {
+ return this.activityLogAlerts;
+ }
+
+ /**
+ * 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 = "2020-10-01";
+ this.activityLogAlerts = new ActivityLogAlertsClientImpl(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