scopes = new ArrayList<>();
+ private RetryPolicy retryPolicy;
+ private RetryOptions retryOptions;
+ private Duration defaultPollInterval;
+
+ private Configurable() {
+ }
+
+ /**
+ * Sets the http client.
+ *
+ * @param httpClient the HTTP client.
+ * @return the configurable object itself.
+ */
+ public Configurable withHttpClient(HttpClient httpClient) {
+ this.httpClient = Objects.requireNonNull(httpClient, "'httpClient' cannot be null.");
+ return this;
+ }
+
+ /**
+ * Sets the logging options to the HTTP pipeline.
+ *
+ * @param httpLogOptions the HTTP log options.
+ * @return the configurable object itself.
+ */
+ public Configurable withLogOptions(HttpLogOptions httpLogOptions) {
+ this.httpLogOptions = Objects.requireNonNull(httpLogOptions, "'httpLogOptions' cannot be null.");
+ return this;
+ }
+
+ /**
+ * Adds the pipeline policy to the HTTP pipeline.
+ *
+ * @param policy the HTTP pipeline policy.
+ * @return the configurable object itself.
+ */
+ public Configurable withPolicy(HttpPipelinePolicy policy) {
+ this.policies.add(Objects.requireNonNull(policy, "'policy' cannot be null."));
+ return this;
+ }
+
+ /**
+ * Adds the scope to permission sets.
+ *
+ * @param scope the scope.
+ * @return the configurable object itself.
+ */
+ public Configurable withScope(String scope) {
+ this.scopes.add(Objects.requireNonNull(scope, "'scope' cannot be null."));
+ return this;
+ }
+
+ /**
+ * Sets the retry policy to the HTTP pipeline.
+ *
+ * @param retryPolicy the HTTP pipeline retry policy.
+ * @return the configurable object itself.
+ */
+ public Configurable withRetryPolicy(RetryPolicy retryPolicy) {
+ this.retryPolicy = Objects.requireNonNull(retryPolicy, "'retryPolicy' cannot be null.");
+ return this;
+ }
+
+ /**
+ * Sets the retry options for the HTTP pipeline retry policy.
+ *
+ * This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}.
+ *
+ * @param retryOptions the retry options for the HTTP pipeline retry policy.
+ * @return the configurable object itself.
+ */
+ public Configurable withRetryOptions(RetryOptions retryOptions) {
+ this.retryOptions = Objects.requireNonNull(retryOptions, "'retryOptions' 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, "'defaultPollInterval' cannot be null.");
+ if (this.defaultPollInterval.isNegative()) {
+ throw LOGGER
+ .logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative"));
+ }
+ return this;
+ }
+
+ /**
+ * Creates an instance of Monitor service API entry point.
+ *
+ * @param credential the credential to use.
+ * @param profile the Azure profile for client.
+ * @return the Monitor service API instance.
+ */
+ public MonitorManager authenticate(TokenCredential credential, AzureProfile profile) {
+ Objects.requireNonNull(credential, "'credential' cannot be null.");
+ Objects.requireNonNull(profile, "'profile' cannot be null.");
+
+ StringBuilder userAgentBuilder = new StringBuilder();
+ userAgentBuilder.append("azsdk-java")
+ .append("-")
+ .append("com.azure.resourcemanager.monitor.generated")
+ .append("/")
+ .append("1.0.0-beta.1");
+ if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
+ userAgentBuilder.append(" (")
+ .append(Configuration.getGlobalConfiguration().get("java.version"))
+ .append("; ")
+ .append(Configuration.getGlobalConfiguration().get("os.name"))
+ .append("; ")
+ .append(Configuration.getGlobalConfiguration().get("os.version"))
+ .append("; auto-generated)");
+ } else {
+ userAgentBuilder.append(" (auto-generated)");
+ }
+
+ if (scopes.isEmpty()) {
+ scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default");
+ }
+ if (retryPolicy == null) {
+ if (retryOptions != null) {
+ retryPolicy = new RetryPolicy(retryOptions);
+ } else {
+ retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS);
+ }
+ }
+ List policies = new ArrayList<>();
+ policies.add(new UserAgentPolicy(userAgentBuilder.toString()));
+ policies.add(new AddHeadersFromContextPolicy());
+ policies.add(new RequestIdPolicy());
+ policies.addAll(this.policies.stream()
+ .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL)
+ .collect(Collectors.toList()));
+ HttpPolicyProviders.addBeforeRetryPolicies(policies);
+ policies.add(retryPolicy);
+ policies.add(new AddDatePolicy());
+ policies.add(new BearerTokenAuthenticationPolicy(credential, scopes.toArray(new String[0])));
+ policies.addAll(this.policies.stream()
+ .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY)
+ .collect(Collectors.toList()));
+ HttpPolicyProviders.addAfterRetryPolicies(policies);
+ policies.add(new HttpLoggingPolicy(httpLogOptions));
+ HttpPipeline httpPipeline = new HttpPipelineBuilder().httpClient(httpClient)
+ .policies(policies.toArray(new HttpPipelinePolicy[0]))
+ .build();
+ return new MonitorManager(httpPipeline, profile, defaultPollInterval);
+ }
+ }
+
+ /**
+ * Gets the resource collection API of ActionGroups. It manages ActionGroupResource.
+ *
+ * @return Resource collection API of ActionGroups.
+ */
+ public ActionGroups actionGroups() {
+ if (this.actionGroups == null) {
+ this.actionGroups = new ActionGroupsImpl(clientObject.getActionGroups(), this);
+ }
+ return actionGroups;
+ }
+
+ /**
+ * Gets the resource collection API of ScheduledQueryRules. It manages ScheduledQueryRuleResource.
+ *
+ * @return Resource collection API of ScheduledQueryRules.
+ */
+ public ScheduledQueryRules scheduledQueryRules() {
+ if (this.scheduledQueryRules == null) {
+ this.scheduledQueryRules = new ScheduledQueryRulesImpl(clientObject.getScheduledQueryRules(), this);
+ }
+ return scheduledQueryRules;
+ }
+
+ /**
+ * Gets wrapped service client MonitorClient providing direct access to the underlying auto-generated API
+ * implementation, based on Azure REST API.
+ *
+ * @return Wrapped service client MonitorClient.
+ */
+ public MonitorClient serviceClient() {
+ return this.clientObject;
+ }
+}
diff --git a/sdk/monitor/azure-resourcemanager-monitor-generated/src/main/java/com/azure/resourcemanager/monitor/generated/fluent/ActionGroupsClient.java b/sdk/monitor/azure-resourcemanager-monitor-generated/src/main/java/com/azure/resourcemanager/monitor/generated/fluent/ActionGroupsClient.java
new file mode 100644
index 0000000000000..3dbee19a9503b
--- /dev/null
+++ b/sdk/monitor/azure-resourcemanager-monitor-generated/src/main/java/com/azure/resourcemanager/monitor/generated/fluent/ActionGroupsClient.java
@@ -0,0 +1,316 @@
+// 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.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.monitor.generated.fluent.models.ActionGroupResourceInner;
+import com.azure.resourcemanager.monitor.generated.fluent.models.TestNotificationDetailsResponseInner;
+import com.azure.resourcemanager.monitor.generated.models.ActionGroupPatchBody;
+import com.azure.resourcemanager.monitor.generated.models.EnableRequest;
+import com.azure.resourcemanager.monitor.generated.models.NotificationRequestBody;
+
+/**
+ * An instance of this class provides access to all the operations defined in ActionGroupsClient.
+ */
+public interface ActionGroupsClient {
+ /**
+ * Create a new action group or update an existing one.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param actionGroupName The name of the action group.
+ * @param actionGroup The action group 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 action group resource along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response createOrUpdateWithResponse(String resourceGroupName, String actionGroupName,
+ ActionGroupResourceInner actionGroup, Context context);
+
+ /**
+ * Create a new action group or update an existing one.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param actionGroupName The name of the action group.
+ * @param actionGroup The action group 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 action group resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ActionGroupResourceInner createOrUpdate(String resourceGroupName, String actionGroupName,
+ ActionGroupResourceInner actionGroup);
+
+ /**
+ * Get an action group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param actionGroupName The name of the action group.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an action group along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getByResourceGroupWithResponse(String resourceGroupName, String actionGroupName,
+ Context context);
+
+ /**
+ * Get an action group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param actionGroupName The name of the action group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an action group.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ActionGroupResourceInner getByResourceGroup(String resourceGroupName, String actionGroupName);
+
+ /**
+ * Delete an action group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param actionGroupName The name of the action group.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response deleteWithResponse(String resourceGroupName, String actionGroupName, Context context);
+
+ /**
+ * Delete an action group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param actionGroupName The name of the action group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String actionGroupName);
+
+ /**
+ * Updates an existing action group's tags. To update other fields use the CreateOrUpdate method.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param actionGroupName The name of the action group.
+ * @param actionGroupPatch 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 action group resource along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response updateWithResponse(String resourceGroupName, String actionGroupName,
+ ActionGroupPatchBody actionGroupPatch, Context context);
+
+ /**
+ * Updates an existing action group's tags. To update other fields use the CreateOrUpdate method.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param actionGroupName The name of the action group.
+ * @param actionGroupPatch 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 action group resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ActionGroupResourceInner update(String resourceGroupName, String actionGroupName,
+ ActionGroupPatchBody actionGroupPatch);
+
+ /**
+ * Send test notifications to a set of provided receivers.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param actionGroupName The name of the action group.
+ * @param notificationRequest The notification request body which includes the contact details.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of the details of the test notification results.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, TestNotificationDetailsResponseInner>
+ beginCreateNotificationsAtActionGroupResourceLevel(String resourceGroupName, String actionGroupName,
+ NotificationRequestBody notificationRequest);
+
+ /**
+ * Send test notifications to a set of provided receivers.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param actionGroupName The name of the action group.
+ * @param notificationRequest The notification request body which includes the contact details.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of the details of the test notification results.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, TestNotificationDetailsResponseInner>
+ beginCreateNotificationsAtActionGroupResourceLevel(String resourceGroupName, String actionGroupName,
+ NotificationRequestBody notificationRequest, Context context);
+
+ /**
+ * Send test notifications to a set of provided receivers.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param actionGroupName The name of the action group.
+ * @param notificationRequest The notification request body which includes the contact details.
+ * @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 details of the test notification results.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ TestNotificationDetailsResponseInner createNotificationsAtActionGroupResourceLevel(String resourceGroupName,
+ String actionGroupName, NotificationRequestBody notificationRequest);
+
+ /**
+ * Send test notifications to a set of provided receivers.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param actionGroupName The name of the action group.
+ * @param notificationRequest The notification request body which includes the contact details.
+ * @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 details of the test notification results.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ TestNotificationDetailsResponseInner createNotificationsAtActionGroupResourceLevel(String resourceGroupName,
+ String actionGroupName, NotificationRequestBody notificationRequest, Context context);
+
+ /**
+ * Get the test notifications by the notification id.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param actionGroupName The name of the action group.
+ * @param notificationId The notification id.
+ * @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 test notifications by the notification id along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getTestNotificationsAtActionGroupResourceLevelWithResponse(
+ String resourceGroupName, String actionGroupName, String notificationId, Context context);
+
+ /**
+ * Get the test notifications by the notification id.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param actionGroupName The name of the action group.
+ * @param notificationId The notification id.
+ * @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 test notifications by the notification id.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ TestNotificationDetailsResponseInner getTestNotificationsAtActionGroupResourceLevel(String resourceGroupName,
+ String actionGroupName, String notificationId);
+
+ /**
+ * Get a list of all action groups 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 action groups in a subscription as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
+
+ /**
+ * Get a list of all action groups 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 action groups in a subscription as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(Context context);
+
+ /**
+ * Get a list of all action groups 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 action groups in a resource group as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName);
+
+ /**
+ * Get a list of all action groups 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 action groups in a resource group as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName, Context context);
+
+ /**
+ * Enable a receiver in an action group. This changes the receiver's status from Disabled to Enabled. This operation
+ * is only supported for Email or SMS receivers.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param actionGroupName The name of the action group.
+ * @param enableRequest The receiver to re-enable.
+ * @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 com.azure.core.management.exception.ManagementException thrown if the request is rejected by server on
+ * status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response enableReceiverWithResponse(String resourceGroupName, String actionGroupName,
+ EnableRequest enableRequest, Context context);
+
+ /**
+ * Enable a receiver in an action group. This changes the receiver's status from Disabled to Enabled. This operation
+ * is only supported for Email or SMS receivers.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param actionGroupName The name of the action group.
+ * @param enableRequest The receiver to re-enable.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server on
+ * status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void enableReceiver(String resourceGroupName, String actionGroupName, EnableRequest enableRequest);
+}
diff --git a/sdk/monitor/azure-resourcemanager-monitor-generated/src/main/java/com/azure/resourcemanager/monitor/generated/fluent/MonitorClient.java b/sdk/monitor/azure-resourcemanager-monitor-generated/src/main/java/com/azure/resourcemanager/monitor/generated/fluent/MonitorClient.java
new file mode 100644
index 0000000000000..a3dec4c5b143f
--- /dev/null
+++ b/sdk/monitor/azure-resourcemanager-monitor-generated/src/main/java/com/azure/resourcemanager/monitor/generated/fluent/MonitorClient.java
@@ -0,0 +1,55 @@
+// 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 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 ActionGroupsClient object to access its operations.
+ *
+ * @return the ActionGroupsClient object.
+ */
+ ActionGroupsClient getActionGroups();
+
+ /**
+ * Gets the ScheduledQueryRulesClient object to access its operations.
+ *
+ * @return the ScheduledQueryRulesClient object.
+ */
+ ScheduledQueryRulesClient getScheduledQueryRules();
+}
diff --git a/sdk/monitor/azure-resourcemanager-monitor-generated/src/main/java/com/azure/resourcemanager/monitor/generated/fluent/ScheduledQueryRulesClient.java b/sdk/monitor/azure-resourcemanager-monitor-generated/src/main/java/com/azure/resourcemanager/monitor/generated/fluent/ScheduledQueryRulesClient.java
new file mode 100644
index 0000000000000..92b13004f8348
--- /dev/null
+++ b/sdk/monitor/azure-resourcemanager-monitor-generated/src/main/java/com/azure/resourcemanager/monitor/generated/fluent/ScheduledQueryRulesClient.java
@@ -0,0 +1,185 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.monitor.generated.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.monitor.generated.fluent.models.ScheduledQueryRuleResourceInner;
+import com.azure.resourcemanager.monitor.generated.models.ScheduledQueryRuleResourcePatch;
+
+/**
+ * An instance of this class provides access to all the operations defined in ScheduledQueryRulesClient.
+ */
+public interface ScheduledQueryRulesClient {
+ /**
+ * Retrieve a scheduled query rule definitions in a subscription.
+ *
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents a collection of scheduled query rule resources as paginated response with
+ * {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
+
+ /**
+ * Retrieve a scheduled query rule definitions in a subscription.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents a collection of scheduled query rule resources as paginated response with
+ * {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(Context context);
+
+ /**
+ * Retrieve scheduled query rule definitions in a resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents a collection of scheduled query rule resources as paginated response with
+ * {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName);
+
+ /**
+ * Retrieve scheduled query rule definitions in a resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents a collection of scheduled query rule resources as paginated response with
+ * {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName, Context context);
+
+ /**
+ * Retrieve an scheduled query rule definition.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param ruleName The name of the rule.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the scheduled query rule resource along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getByResourceGroupWithResponse(String resourceGroupName, String ruleName,
+ Context context);
+
+ /**
+ * Retrieve an scheduled query rule definition.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param ruleName The name of the rule.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the scheduled query rule resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ScheduledQueryRuleResourceInner getByResourceGroup(String resourceGroupName, String ruleName);
+
+ /**
+ * Creates or updates a scheduled query rule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param ruleName The name of the rule.
+ * @param parameters The parameters of the rule to create or update.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the scheduled query rule resource along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response createOrUpdateWithResponse(String resourceGroupName, String ruleName,
+ ScheduledQueryRuleResourceInner parameters, Context context);
+
+ /**
+ * Creates or updates a scheduled query rule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param ruleName The name of the rule.
+ * @param parameters The parameters of the rule to create or update.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the scheduled query rule resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ScheduledQueryRuleResourceInner createOrUpdate(String resourceGroupName, String ruleName,
+ ScheduledQueryRuleResourceInner parameters);
+
+ /**
+ * Update a scheduled query rule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param ruleName The name of the rule.
+ * @param parameters The parameters of the rule to update.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the scheduled query rule resource along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response updateWithResponse(String resourceGroupName, String ruleName,
+ ScheduledQueryRuleResourcePatch parameters, Context context);
+
+ /**
+ * Update a scheduled query rule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param ruleName The name of the rule.
+ * @param parameters The parameters of the rule to update.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the scheduled query rule resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ScheduledQueryRuleResourceInner update(String resourceGroupName, String ruleName,
+ ScheduledQueryRuleResourcePatch parameters);
+
+ /**
+ * Deletes a scheduled query rule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param ruleName The name of the rule.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response deleteWithResponse(String resourceGroupName, String ruleName, Context context);
+
+ /**
+ * Deletes a scheduled query rule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param ruleName The name of the rule.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String ruleName);
+}
diff --git a/sdk/monitor/azure-resourcemanager-monitor-generated/src/main/java/com/azure/resourcemanager/monitor/generated/fluent/models/ActionGroup.java b/sdk/monitor/azure-resourcemanager-monitor-generated/src/main/java/com/azure/resourcemanager/monitor/generated/fluent/models/ActionGroup.java
new file mode 100644
index 0000000000000..a8a82f9971278
--- /dev/null
+++ b/sdk/monitor/azure-resourcemanager-monitor-generated/src/main/java/com/azure/resourcemanager/monitor/generated/fluent/models/ActionGroup.java
@@ -0,0 +1,552 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.monitor.generated.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.monitor.generated.models.ArmRoleReceiver;
+import com.azure.resourcemanager.monitor.generated.models.AutomationRunbookReceiver;
+import com.azure.resourcemanager.monitor.generated.models.AzureAppPushReceiver;
+import com.azure.resourcemanager.monitor.generated.models.AzureFunctionReceiver;
+import com.azure.resourcemanager.monitor.generated.models.EmailReceiver;
+import com.azure.resourcemanager.monitor.generated.models.EventHubReceiver;
+import com.azure.resourcemanager.monitor.generated.models.IncidentReceiver;
+import com.azure.resourcemanager.monitor.generated.models.ItsmReceiver;
+import com.azure.resourcemanager.monitor.generated.models.LogicAppReceiver;
+import com.azure.resourcemanager.monitor.generated.models.SmsReceiver;
+import com.azure.resourcemanager.monitor.generated.models.VoiceReceiver;
+import com.azure.resourcemanager.monitor.generated.models.WebhookReceiver;
+import java.io.IOException;
+import java.util.List;
+
+/**
+ * An Azure action group.
+ */
+@Fluent
+public final class ActionGroup implements JsonSerializable {
+ /*
+ * The short name of the action group. This will be used in SMS messages.
+ */
+ private String groupShortName;
+
+ /*
+ * Indicates whether this action group is enabled. If an action group is not enabled, then none of its receivers
+ * will receive communications.
+ */
+ private boolean enabled;
+
+ /*
+ * The list of email receivers that are part of this action group.
+ */
+ private List emailReceivers;
+
+ /*
+ * The list of SMS receivers that are part of this action group.
+ */
+ private List smsReceivers;
+
+ /*
+ * The list of webhook receivers that are part of this action group.
+ */
+ private List webhookReceivers;
+
+ /*
+ * The list of ITSM receivers that are part of this action group.
+ */
+ private List itsmReceivers;
+
+ /*
+ * The list of AzureAppPush receivers that are part of this action group.
+ */
+ private List azureAppPushReceivers;
+
+ /*
+ * The list of AutomationRunbook receivers that are part of this action group.
+ */
+ private List automationRunbookReceivers;
+
+ /*
+ * The list of voice receivers that are part of this action group.
+ */
+ private List voiceReceivers;
+
+ /*
+ * The list of logic app receivers that are part of this action group.
+ */
+ private List logicAppReceivers;
+
+ /*
+ * The list of azure function receivers that are part of this action group.
+ */
+ private List azureFunctionReceivers;
+
+ /*
+ * The list of ARM role receivers that are part of this action group. Roles are Azure RBAC roles and only built-in
+ * roles are supported.
+ */
+ private List armRoleReceivers;
+
+ /*
+ * The list of event hub receivers that are part of this action group.
+ */
+ private List eventHubReceivers;
+
+ /*
+ * The list of incident receivers that are part of this action group.
+ */
+ private List incidentReceivers;
+
+ /**
+ * Creates an instance of ActionGroup class.
+ */
+ public ActionGroup() {
+ }
+
+ /**
+ * Get the groupShortName property: The short name of the action group. This will be used in SMS messages.
+ *
+ * @return the groupShortName value.
+ */
+ public String groupShortName() {
+ return this.groupShortName;
+ }
+
+ /**
+ * Set the groupShortName property: The short name of the action group. This will be used in SMS messages.
+ *
+ * @param groupShortName the groupShortName value to set.
+ * @return the ActionGroup object itself.
+ */
+ public ActionGroup withGroupShortName(String groupShortName) {
+ this.groupShortName = groupShortName;
+ return this;
+ }
+
+ /**
+ * Get the enabled property: Indicates whether this action group is enabled. If an action group is not enabled, then
+ * none of its receivers will receive communications.
+ *
+ * @return the enabled value.
+ */
+ public boolean enabled() {
+ return this.enabled;
+ }
+
+ /**
+ * Set the enabled property: Indicates whether this action group is enabled. If an action group is not enabled, then
+ * none of its receivers will receive communications.
+ *
+ * @param enabled the enabled value to set.
+ * @return the ActionGroup object itself.
+ */
+ public ActionGroup withEnabled(boolean enabled) {
+ this.enabled = enabled;
+ return this;
+ }
+
+ /**
+ * Get the emailReceivers property: The list of email receivers that are part of this action group.
+ *
+ * @return the emailReceivers value.
+ */
+ public List emailReceivers() {
+ return this.emailReceivers;
+ }
+
+ /**
+ * Set the emailReceivers property: The list of email receivers that are part of this action group.
+ *
+ * @param emailReceivers the emailReceivers value to set.
+ * @return the ActionGroup object itself.
+ */
+ public ActionGroup withEmailReceivers(List emailReceivers) {
+ this.emailReceivers = emailReceivers;
+ return this;
+ }
+
+ /**
+ * Get the smsReceivers property: The list of SMS receivers that are part of this action group.
+ *
+ * @return the smsReceivers value.
+ */
+ public List smsReceivers() {
+ return this.smsReceivers;
+ }
+
+ /**
+ * Set the smsReceivers property: The list of SMS receivers that are part of this action group.
+ *
+ * @param smsReceivers the smsReceivers value to set.
+ * @return the ActionGroup object itself.
+ */
+ public ActionGroup withSmsReceivers(List smsReceivers) {
+ this.smsReceivers = smsReceivers;
+ return this;
+ }
+
+ /**
+ * Get the webhookReceivers property: The list of webhook receivers that are part of this action group.
+ *
+ * @return the webhookReceivers value.
+ */
+ public List webhookReceivers() {
+ return this.webhookReceivers;
+ }
+
+ /**
+ * Set the webhookReceivers property: The list of webhook receivers that are part of this action group.
+ *
+ * @param webhookReceivers the webhookReceivers value to set.
+ * @return the ActionGroup object itself.
+ */
+ public ActionGroup withWebhookReceivers(List webhookReceivers) {
+ this.webhookReceivers = webhookReceivers;
+ return this;
+ }
+
+ /**
+ * Get the itsmReceivers property: The list of ITSM receivers that are part of this action group.
+ *
+ * @return the itsmReceivers value.
+ */
+ public List itsmReceivers() {
+ return this.itsmReceivers;
+ }
+
+ /**
+ * Set the itsmReceivers property: The list of ITSM receivers that are part of this action group.
+ *
+ * @param itsmReceivers the itsmReceivers value to set.
+ * @return the ActionGroup object itself.
+ */
+ public ActionGroup withItsmReceivers(List itsmReceivers) {
+ this.itsmReceivers = itsmReceivers;
+ return this;
+ }
+
+ /**
+ * Get the azureAppPushReceivers property: The list of AzureAppPush receivers that are part of this action group.
+ *
+ * @return the azureAppPushReceivers value.
+ */
+ public List azureAppPushReceivers() {
+ return this.azureAppPushReceivers;
+ }
+
+ /**
+ * Set the azureAppPushReceivers property: The list of AzureAppPush receivers that are part of this action group.
+ *
+ * @param azureAppPushReceivers the azureAppPushReceivers value to set.
+ * @return the ActionGroup object itself.
+ */
+ public ActionGroup withAzureAppPushReceivers(List azureAppPushReceivers) {
+ this.azureAppPushReceivers = azureAppPushReceivers;
+ return this;
+ }
+
+ /**
+ * Get the automationRunbookReceivers property: The list of AutomationRunbook receivers that are part of this action
+ * group.
+ *
+ * @return the automationRunbookReceivers value.
+ */
+ public List automationRunbookReceivers() {
+ return this.automationRunbookReceivers;
+ }
+
+ /**
+ * Set the automationRunbookReceivers property: The list of AutomationRunbook receivers that are part of this action
+ * group.
+ *
+ * @param automationRunbookReceivers the automationRunbookReceivers value to set.
+ * @return the ActionGroup object itself.
+ */
+ public ActionGroup withAutomationRunbookReceivers(List automationRunbookReceivers) {
+ this.automationRunbookReceivers = automationRunbookReceivers;
+ return this;
+ }
+
+ /**
+ * Get the voiceReceivers property: The list of voice receivers that are part of this action group.
+ *
+ * @return the voiceReceivers value.
+ */
+ public List voiceReceivers() {
+ return this.voiceReceivers;
+ }
+
+ /**
+ * Set the voiceReceivers property: The list of voice receivers that are part of this action group.
+ *
+ * @param voiceReceivers the voiceReceivers value to set.
+ * @return the ActionGroup object itself.
+ */
+ public ActionGroup withVoiceReceivers(List voiceReceivers) {
+ this.voiceReceivers = voiceReceivers;
+ return this;
+ }
+
+ /**
+ * Get the logicAppReceivers property: The list of logic app receivers that are part of this action group.
+ *
+ * @return the logicAppReceivers value.
+ */
+ public List logicAppReceivers() {
+ return this.logicAppReceivers;
+ }
+
+ /**
+ * Set the logicAppReceivers property: The list of logic app receivers that are part of this action group.
+ *
+ * @param logicAppReceivers the logicAppReceivers value to set.
+ * @return the ActionGroup object itself.
+ */
+ public ActionGroup withLogicAppReceivers(List logicAppReceivers) {
+ this.logicAppReceivers = logicAppReceivers;
+ return this;
+ }
+
+ /**
+ * Get the azureFunctionReceivers property: The list of azure function receivers that are part of this action group.
+ *
+ * @return the azureFunctionReceivers value.
+ */
+ public List azureFunctionReceivers() {
+ return this.azureFunctionReceivers;
+ }
+
+ /**
+ * Set the azureFunctionReceivers property: The list of azure function receivers that are part of this action group.
+ *
+ * @param azureFunctionReceivers the azureFunctionReceivers value to set.
+ * @return the ActionGroup object itself.
+ */
+ public ActionGroup withAzureFunctionReceivers(List azureFunctionReceivers) {
+ this.azureFunctionReceivers = azureFunctionReceivers;
+ return this;
+ }
+
+ /**
+ * Get the armRoleReceivers property: The list of ARM role receivers that are part of this action group. Roles are
+ * Azure RBAC roles and only built-in roles are supported.
+ *
+ * @return the armRoleReceivers value.
+ */
+ public List armRoleReceivers() {
+ return this.armRoleReceivers;
+ }
+
+ /**
+ * Set the armRoleReceivers property: The list of ARM role receivers that are part of this action group. Roles are
+ * Azure RBAC roles and only built-in roles are supported.
+ *
+ * @param armRoleReceivers the armRoleReceivers value to set.
+ * @return the ActionGroup object itself.
+ */
+ public ActionGroup withArmRoleReceivers(List armRoleReceivers) {
+ this.armRoleReceivers = armRoleReceivers;
+ return this;
+ }
+
+ /**
+ * Get the eventHubReceivers property: The list of event hub receivers that are part of this action group.
+ *
+ * @return the eventHubReceivers value.
+ */
+ public List eventHubReceivers() {
+ return this.eventHubReceivers;
+ }
+
+ /**
+ * Set the eventHubReceivers property: The list of event hub receivers that are part of this action group.
+ *
+ * @param eventHubReceivers the eventHubReceivers value to set.
+ * @return the ActionGroup object itself.
+ */
+ public ActionGroup withEventHubReceivers(List eventHubReceivers) {
+ this.eventHubReceivers = eventHubReceivers;
+ return this;
+ }
+
+ /**
+ * Get the incidentReceivers property: The list of incident receivers that are part of this action group.
+ *
+ * @return the incidentReceivers value.
+ */
+ public List incidentReceivers() {
+ return this.incidentReceivers;
+ }
+
+ /**
+ * Set the incidentReceivers property: The list of incident receivers that are part of this action group.
+ *
+ * @param incidentReceivers the incidentReceivers value to set.
+ * @return the ActionGroup object itself.
+ */
+ public ActionGroup withIncidentReceivers(List incidentReceivers) {
+ this.incidentReceivers = incidentReceivers;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (groupShortName() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Missing required property groupShortName in model ActionGroup"));
+ }
+ if (emailReceivers() != null) {
+ emailReceivers().forEach(e -> e.validate());
+ }
+ if (smsReceivers() != null) {
+ smsReceivers().forEach(e -> e.validate());
+ }
+ if (webhookReceivers() != null) {
+ webhookReceivers().forEach(e -> e.validate());
+ }
+ if (itsmReceivers() != null) {
+ itsmReceivers().forEach(e -> e.validate());
+ }
+ if (azureAppPushReceivers() != null) {
+ azureAppPushReceivers().forEach(e -> e.validate());
+ }
+ if (automationRunbookReceivers() != null) {
+ automationRunbookReceivers().forEach(e -> e.validate());
+ }
+ if (voiceReceivers() != null) {
+ voiceReceivers().forEach(e -> e.validate());
+ }
+ if (logicAppReceivers() != null) {
+ logicAppReceivers().forEach(e -> e.validate());
+ }
+ if (azureFunctionReceivers() != null) {
+ azureFunctionReceivers().forEach(e -> e.validate());
+ }
+ if (armRoleReceivers() != null) {
+ armRoleReceivers().forEach(e -> e.validate());
+ }
+ if (eventHubReceivers() != null) {
+ eventHubReceivers().forEach(e -> e.validate());
+ }
+ if (incidentReceivers() != null) {
+ incidentReceivers().forEach(e -> e.validate());
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(ActionGroup.class);
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("groupShortName", this.groupShortName);
+ jsonWriter.writeBooleanField("enabled", this.enabled);
+ jsonWriter.writeArrayField("emailReceivers", this.emailReceivers,
+ (writer, element) -> writer.writeJson(element));
+ jsonWriter.writeArrayField("smsReceivers", this.smsReceivers, (writer, element) -> writer.writeJson(element));
+ jsonWriter.writeArrayField("webhookReceivers", this.webhookReceivers,
+ (writer, element) -> writer.writeJson(element));
+ jsonWriter.writeArrayField("itsmReceivers", this.itsmReceivers, (writer, element) -> writer.writeJson(element));
+ jsonWriter.writeArrayField("azureAppPushReceivers", this.azureAppPushReceivers,
+ (writer, element) -> writer.writeJson(element));
+ jsonWriter.writeArrayField("automationRunbookReceivers", this.automationRunbookReceivers,
+ (writer, element) -> writer.writeJson(element));
+ jsonWriter.writeArrayField("voiceReceivers", this.voiceReceivers,
+ (writer, element) -> writer.writeJson(element));
+ jsonWriter.writeArrayField("logicAppReceivers", this.logicAppReceivers,
+ (writer, element) -> writer.writeJson(element));
+ jsonWriter.writeArrayField("azureFunctionReceivers", this.azureFunctionReceivers,
+ (writer, element) -> writer.writeJson(element));
+ jsonWriter.writeArrayField("armRoleReceivers", this.armRoleReceivers,
+ (writer, element) -> writer.writeJson(element));
+ jsonWriter.writeArrayField("eventHubReceivers", this.eventHubReceivers,
+ (writer, element) -> writer.writeJson(element));
+ jsonWriter.writeArrayField("incidentReceivers", this.incidentReceivers,
+ (writer, element) -> writer.writeJson(element));
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ActionGroup from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ActionGroup if the JsonReader was pointing to an instance of it, or null if it was
+ * pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the ActionGroup.
+ */
+ public static ActionGroup fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ActionGroup deserializedActionGroup = new ActionGroup();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("groupShortName".equals(fieldName)) {
+ deserializedActionGroup.groupShortName = reader.getString();
+ } else if ("enabled".equals(fieldName)) {
+ deserializedActionGroup.enabled = reader.getBoolean();
+ } else if ("emailReceivers".equals(fieldName)) {
+ List emailReceivers = reader.readArray(reader1 -> EmailReceiver.fromJson(reader1));
+ deserializedActionGroup.emailReceivers = emailReceivers;
+ } else if ("smsReceivers".equals(fieldName)) {
+ List smsReceivers = reader.readArray(reader1 -> SmsReceiver.fromJson(reader1));
+ deserializedActionGroup.smsReceivers = smsReceivers;
+ } else if ("webhookReceivers".equals(fieldName)) {
+ List webhookReceivers
+ = reader.readArray(reader1 -> WebhookReceiver.fromJson(reader1));
+ deserializedActionGroup.webhookReceivers = webhookReceivers;
+ } else if ("itsmReceivers".equals(fieldName)) {
+ List itsmReceivers = reader.readArray(reader1 -> ItsmReceiver.fromJson(reader1));
+ deserializedActionGroup.itsmReceivers = itsmReceivers;
+ } else if ("azureAppPushReceivers".equals(fieldName)) {
+ List azureAppPushReceivers
+ = reader.readArray(reader1 -> AzureAppPushReceiver.fromJson(reader1));
+ deserializedActionGroup.azureAppPushReceivers = azureAppPushReceivers;
+ } else if ("automationRunbookReceivers".equals(fieldName)) {
+ List automationRunbookReceivers
+ = reader.readArray(reader1 -> AutomationRunbookReceiver.fromJson(reader1));
+ deserializedActionGroup.automationRunbookReceivers = automationRunbookReceivers;
+ } else if ("voiceReceivers".equals(fieldName)) {
+ List voiceReceivers = reader.readArray(reader1 -> VoiceReceiver.fromJson(reader1));
+ deserializedActionGroup.voiceReceivers = voiceReceivers;
+ } else if ("logicAppReceivers".equals(fieldName)) {
+ List logicAppReceivers
+ = reader.readArray(reader1 -> LogicAppReceiver.fromJson(reader1));
+ deserializedActionGroup.logicAppReceivers = logicAppReceivers;
+ } else if ("azureFunctionReceivers".equals(fieldName)) {
+ List azureFunctionReceivers
+ = reader.readArray(reader1 -> AzureFunctionReceiver.fromJson(reader1));
+ deserializedActionGroup.azureFunctionReceivers = azureFunctionReceivers;
+ } else if ("armRoleReceivers".equals(fieldName)) {
+ List armRoleReceivers
+ = reader.readArray(reader1 -> ArmRoleReceiver.fromJson(reader1));
+ deserializedActionGroup.armRoleReceivers = armRoleReceivers;
+ } else if ("eventHubReceivers".equals(fieldName)) {
+ List eventHubReceivers
+ = reader.readArray(reader1 -> EventHubReceiver.fromJson(reader1));
+ deserializedActionGroup.eventHubReceivers = eventHubReceivers;
+ } else if ("incidentReceivers".equals(fieldName)) {
+ List incidentReceivers
+ = reader.readArray(reader1 -> IncidentReceiver.fromJson(reader1));
+ deserializedActionGroup.incidentReceivers = incidentReceivers;
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedActionGroup;
+ });
+ }
+}
diff --git a/sdk/monitor/azure-resourcemanager-monitor-generated/src/main/java/com/azure/resourcemanager/monitor/generated/fluent/models/ActionGroupPatch.java b/sdk/monitor/azure-resourcemanager-monitor-generated/src/main/java/com/azure/resourcemanager/monitor/generated/fluent/models/ActionGroupPatch.java
new file mode 100644
index 0000000000000..08eda4beb1adb
--- /dev/null
+++ b/sdk/monitor/azure-resourcemanager-monitor-generated/src/main/java/com/azure/resourcemanager/monitor/generated/fluent/models/ActionGroupPatch.java
@@ -0,0 +1,96 @@
+// 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.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
+
+/**
+ * An Azure action group for patch operations.
+ */
+@Fluent
+public final class ActionGroupPatch implements JsonSerializable {
+ /*
+ * Indicates whether this action group is enabled. If an action group is not enabled, then none of its actions will
+ * be activated.
+ */
+ private Boolean enabled;
+
+ /**
+ * Creates an instance of ActionGroupPatch class.
+ */
+ public ActionGroupPatch() {
+ }
+
+ /**
+ * Get the enabled property: Indicates whether this action group is enabled. If an action group 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 action group is enabled. If an action group is not enabled, then
+ * none of its actions will be activated.
+ *
+ * @param enabled the enabled value to set.
+ * @return the ActionGroupPatch object itself.
+ */
+ public ActionGroupPatch withEnabled(Boolean enabled) {
+ this.enabled = enabled;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeBooleanField("enabled", this.enabled);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ActionGroupPatch from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ActionGroupPatch if the JsonReader was pointing to an instance of it, or null if it was
+ * pointing to JSON null.
+ * @throws IOException If an error occurs while reading the ActionGroupPatch.
+ */
+ public static ActionGroupPatch fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ActionGroupPatch deserializedActionGroupPatch = new ActionGroupPatch();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("enabled".equals(fieldName)) {
+ deserializedActionGroupPatch.enabled = reader.getNullable(JsonReader::getBoolean);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedActionGroupPatch;
+ });
+ }
+}
diff --git a/sdk/monitor/azure-resourcemanager-monitor-generated/src/main/java/com/azure/resourcemanager/monitor/generated/fluent/models/ActionGroupResourceInner.java b/sdk/monitor/azure-resourcemanager-monitor-generated/src/main/java/com/azure/resourcemanager/monitor/generated/fluent/models/ActionGroupResourceInner.java
new file mode 100644
index 0000000000000..d0219c87f8fa4
--- /dev/null
+++ b/sdk/monitor/azure-resourcemanager-monitor-generated/src/main/java/com/azure/resourcemanager/monitor/generated/fluent/models/ActionGroupResourceInner.java
@@ -0,0 +1,537 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.monitor.generated.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.Resource;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.monitor.generated.models.ArmRoleReceiver;
+import com.azure.resourcemanager.monitor.generated.models.AutomationRunbookReceiver;
+import com.azure.resourcemanager.monitor.generated.models.AzureAppPushReceiver;
+import com.azure.resourcemanager.monitor.generated.models.AzureFunctionReceiver;
+import com.azure.resourcemanager.monitor.generated.models.EmailReceiver;
+import com.azure.resourcemanager.monitor.generated.models.EventHubReceiver;
+import com.azure.resourcemanager.monitor.generated.models.IncidentReceiver;
+import com.azure.resourcemanager.monitor.generated.models.ItsmReceiver;
+import com.azure.resourcemanager.monitor.generated.models.LogicAppReceiver;
+import com.azure.resourcemanager.monitor.generated.models.ManagedServiceIdentity;
+import com.azure.resourcemanager.monitor.generated.models.SmsReceiver;
+import com.azure.resourcemanager.monitor.generated.models.VoiceReceiver;
+import com.azure.resourcemanager.monitor.generated.models.WebhookReceiver;
+import java.io.IOException;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * An action group resource.
+ */
+@Fluent
+public final class ActionGroupResourceInner extends Resource {
+ /*
+ * The action groups properties of the resource.
+ */
+ private ActionGroup innerProperties;
+
+ /*
+ * Managed service identity (system assigned and/or user assigned identities)
+ */
+ private ManagedServiceIdentity identity;
+
+ /*
+ * The type of the resource.
+ */
+ private String type;
+
+ /*
+ * The name of the resource.
+ */
+ private String name;
+
+ /*
+ * Fully qualified resource Id for the resource.
+ */
+ private String id;
+
+ /**
+ * Creates an instance of ActionGroupResourceInner class.
+ */
+ public ActionGroupResourceInner() {
+ }
+
+ /**
+ * Get the innerProperties property: The action groups properties of the resource.
+ *
+ * @return the innerProperties value.
+ */
+ private ActionGroup innerProperties() {
+ return this.innerProperties;
+ }
+
+ /**
+ * Get the identity property: Managed service identity (system assigned and/or user assigned identities).
+ *
+ * @return the identity value.
+ */
+ public ManagedServiceIdentity identity() {
+ return this.identity;
+ }
+
+ /**
+ * Set the identity property: Managed service identity (system assigned and/or user assigned identities).
+ *
+ * @param identity the identity value to set.
+ * @return the ActionGroupResourceInner object itself.
+ */
+ public ActionGroupResourceInner withIdentity(ManagedServiceIdentity identity) {
+ this.identity = identity;
+ return this;
+ }
+
+ /**
+ * Get the type property: The type of the resource.
+ *
+ * @return the type value.
+ */
+ @Override
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Get the name property: The name of the resource.
+ *
+ * @return the name value.
+ */
+ @Override
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the id property: Fully qualified resource Id for the resource.
+ *
+ * @return the id value.
+ */
+ @Override
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public ActionGroupResourceInner withLocation(String location) {
+ super.withLocation(location);
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public ActionGroupResourceInner withTags(Map tags) {
+ super.withTags(tags);
+ return this;
+ }
+
+ /**
+ * Get the groupShortName property: The short name of the action group. This will be used in SMS messages.
+ *
+ * @return the groupShortName value.
+ */
+ public String groupShortName() {
+ return this.innerProperties() == null ? null : this.innerProperties().groupShortName();
+ }
+
+ /**
+ * Set the groupShortName property: The short name of the action group. This will be used in SMS messages.
+ *
+ * @param groupShortName the groupShortName value to set.
+ * @return the ActionGroupResourceInner object itself.
+ */
+ public ActionGroupResourceInner withGroupShortName(String groupShortName) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ActionGroup();
+ }
+ this.innerProperties().withGroupShortName(groupShortName);
+ return this;
+ }
+
+ /**
+ * Get the enabled property: Indicates whether this action group is enabled. If an action group is not enabled, then
+ * none of its receivers will receive communications.
+ *
+ * @return the enabled value.
+ */
+ public Boolean enabled() {
+ return this.innerProperties() == null ? null : this.innerProperties().enabled();
+ }
+
+ /**
+ * Set the enabled property: Indicates whether this action group is enabled. If an action group is not enabled, then
+ * none of its receivers will receive communications.
+ *
+ * @param enabled the enabled value to set.
+ * @return the ActionGroupResourceInner object itself.
+ */
+ public ActionGroupResourceInner withEnabled(Boolean enabled) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ActionGroup();
+ }
+ this.innerProperties().withEnabled(enabled);
+ return this;
+ }
+
+ /**
+ * Get the emailReceivers property: The list of email receivers that are part of this action group.
+ *
+ * @return the emailReceivers value.
+ */
+ public List emailReceivers() {
+ return this.innerProperties() == null ? null : this.innerProperties().emailReceivers();
+ }
+
+ /**
+ * Set the emailReceivers property: The list of email receivers that are part of this action group.
+ *
+ * @param emailReceivers the emailReceivers value to set.
+ * @return the ActionGroupResourceInner object itself.
+ */
+ public ActionGroupResourceInner withEmailReceivers(List emailReceivers) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ActionGroup();
+ }
+ this.innerProperties().withEmailReceivers(emailReceivers);
+ return this;
+ }
+
+ /**
+ * Get the smsReceivers property: The list of SMS receivers that are part of this action group.
+ *
+ * @return the smsReceivers value.
+ */
+ public List smsReceivers() {
+ return this.innerProperties() == null ? null : this.innerProperties().smsReceivers();
+ }
+
+ /**
+ * Set the smsReceivers property: The list of SMS receivers that are part of this action group.
+ *
+ * @param smsReceivers the smsReceivers value to set.
+ * @return the ActionGroupResourceInner object itself.
+ */
+ public ActionGroupResourceInner withSmsReceivers(List smsReceivers) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ActionGroup();
+ }
+ this.innerProperties().withSmsReceivers(smsReceivers);
+ return this;
+ }
+
+ /**
+ * Get the webhookReceivers property: The list of webhook receivers that are part of this action group.
+ *
+ * @return the webhookReceivers value.
+ */
+ public List webhookReceivers() {
+ return this.innerProperties() == null ? null : this.innerProperties().webhookReceivers();
+ }
+
+ /**
+ * Set the webhookReceivers property: The list of webhook receivers that are part of this action group.
+ *
+ * @param webhookReceivers the webhookReceivers value to set.
+ * @return the ActionGroupResourceInner object itself.
+ */
+ public ActionGroupResourceInner withWebhookReceivers(List webhookReceivers) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ActionGroup();
+ }
+ this.innerProperties().withWebhookReceivers(webhookReceivers);
+ return this;
+ }
+
+ /**
+ * Get the itsmReceivers property: The list of ITSM receivers that are part of this action group.
+ *
+ * @return the itsmReceivers value.
+ */
+ public List itsmReceivers() {
+ return this.innerProperties() == null ? null : this.innerProperties().itsmReceivers();
+ }
+
+ /**
+ * Set the itsmReceivers property: The list of ITSM receivers that are part of this action group.
+ *
+ * @param itsmReceivers the itsmReceivers value to set.
+ * @return the ActionGroupResourceInner object itself.
+ */
+ public ActionGroupResourceInner withItsmReceivers(List itsmReceivers) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ActionGroup();
+ }
+ this.innerProperties().withItsmReceivers(itsmReceivers);
+ return this;
+ }
+
+ /**
+ * Get the azureAppPushReceivers property: The list of AzureAppPush receivers that are part of this action group.
+ *
+ * @return the azureAppPushReceivers value.
+ */
+ public List azureAppPushReceivers() {
+ return this.innerProperties() == null ? null : this.innerProperties().azureAppPushReceivers();
+ }
+
+ /**
+ * Set the azureAppPushReceivers property: The list of AzureAppPush receivers that are part of this action group.
+ *
+ * @param azureAppPushReceivers the azureAppPushReceivers value to set.
+ * @return the ActionGroupResourceInner object itself.
+ */
+ public ActionGroupResourceInner withAzureAppPushReceivers(List azureAppPushReceivers) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ActionGroup();
+ }
+ this.innerProperties().withAzureAppPushReceivers(azureAppPushReceivers);
+ return this;
+ }
+
+ /**
+ * Get the automationRunbookReceivers property: The list of AutomationRunbook receivers that are part of this action
+ * group.
+ *
+ * @return the automationRunbookReceivers value.
+ */
+ public List automationRunbookReceivers() {
+ return this.innerProperties() == null ? null : this.innerProperties().automationRunbookReceivers();
+ }
+
+ /**
+ * Set the automationRunbookReceivers property: The list of AutomationRunbook receivers that are part of this action
+ * group.
+ *
+ * @param automationRunbookReceivers the automationRunbookReceivers value to set.
+ * @return the ActionGroupResourceInner object itself.
+ */
+ public ActionGroupResourceInner
+ withAutomationRunbookReceivers(List automationRunbookReceivers) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ActionGroup();
+ }
+ this.innerProperties().withAutomationRunbookReceivers(automationRunbookReceivers);
+ return this;
+ }
+
+ /**
+ * Get the voiceReceivers property: The list of voice receivers that are part of this action group.
+ *
+ * @return the voiceReceivers value.
+ */
+ public List voiceReceivers() {
+ return this.innerProperties() == null ? null : this.innerProperties().voiceReceivers();
+ }
+
+ /**
+ * Set the voiceReceivers property: The list of voice receivers that are part of this action group.
+ *
+ * @param voiceReceivers the voiceReceivers value to set.
+ * @return the ActionGroupResourceInner object itself.
+ */
+ public ActionGroupResourceInner withVoiceReceivers(List voiceReceivers) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ActionGroup();
+ }
+ this.innerProperties().withVoiceReceivers(voiceReceivers);
+ return this;
+ }
+
+ /**
+ * Get the logicAppReceivers property: The list of logic app receivers that are part of this action group.
+ *
+ * @return the logicAppReceivers value.
+ */
+ public List logicAppReceivers() {
+ return this.innerProperties() == null ? null : this.innerProperties().logicAppReceivers();
+ }
+
+ /**
+ * Set the logicAppReceivers property: The list of logic app receivers that are part of this action group.
+ *
+ * @param logicAppReceivers the logicAppReceivers value to set.
+ * @return the ActionGroupResourceInner object itself.
+ */
+ public ActionGroupResourceInner withLogicAppReceivers(List logicAppReceivers) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ActionGroup();
+ }
+ this.innerProperties().withLogicAppReceivers(logicAppReceivers);
+ return this;
+ }
+
+ /**
+ * Get the azureFunctionReceivers property: The list of azure function receivers that are part of this action group.
+ *
+ * @return the azureFunctionReceivers value.
+ */
+ public List azureFunctionReceivers() {
+ return this.innerProperties() == null ? null : this.innerProperties().azureFunctionReceivers();
+ }
+
+ /**
+ * Set the azureFunctionReceivers property: The list of azure function receivers that are part of this action group.
+ *
+ * @param azureFunctionReceivers the azureFunctionReceivers value to set.
+ * @return the ActionGroupResourceInner object itself.
+ */
+ public ActionGroupResourceInner withAzureFunctionReceivers(List azureFunctionReceivers) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ActionGroup();
+ }
+ this.innerProperties().withAzureFunctionReceivers(azureFunctionReceivers);
+ return this;
+ }
+
+ /**
+ * Get the armRoleReceivers property: The list of ARM role receivers that are part of this action group. Roles are
+ * Azure RBAC roles and only built-in roles are supported.
+ *
+ * @return the armRoleReceivers value.
+ */
+ public List armRoleReceivers() {
+ return this.innerProperties() == null ? null : this.innerProperties().armRoleReceivers();
+ }
+
+ /**
+ * Set the armRoleReceivers property: The list of ARM role receivers that are part of this action group. Roles are
+ * Azure RBAC roles and only built-in roles are supported.
+ *
+ * @param armRoleReceivers the armRoleReceivers value to set.
+ * @return the ActionGroupResourceInner object itself.
+ */
+ public ActionGroupResourceInner withArmRoleReceivers(List armRoleReceivers) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ActionGroup();
+ }
+ this.innerProperties().withArmRoleReceivers(armRoleReceivers);
+ return this;
+ }
+
+ /**
+ * Get the eventHubReceivers property: The list of event hub receivers that are part of this action group.
+ *
+ * @return the eventHubReceivers value.
+ */
+ public List eventHubReceivers() {
+ return this.innerProperties() == null ? null : this.innerProperties().eventHubReceivers();
+ }
+
+ /**
+ * Set the eventHubReceivers property: The list of event hub receivers that are part of this action group.
+ *
+ * @param eventHubReceivers the eventHubReceivers value to set.
+ * @return the ActionGroupResourceInner object itself.
+ */
+ public ActionGroupResourceInner withEventHubReceivers(List eventHubReceivers) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ActionGroup();
+ }
+ this.innerProperties().withEventHubReceivers(eventHubReceivers);
+ return this;
+ }
+
+ /**
+ * Get the incidentReceivers property: The list of incident receivers that are part of this action group.
+ *
+ * @return the incidentReceivers value.
+ */
+ public List incidentReceivers() {
+ return this.innerProperties() == null ? null : this.innerProperties().incidentReceivers();
+ }
+
+ /**
+ * Set the incidentReceivers property: The list of incident receivers that are part of this action group.
+ *
+ * @param incidentReceivers the incidentReceivers value to set.
+ * @return the ActionGroupResourceInner object itself.
+ */
+ public ActionGroupResourceInner withIncidentReceivers(List incidentReceivers) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ActionGroup();
+ }
+ this.innerProperties().withIncidentReceivers(incidentReceivers);
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
+ if (identity() != null) {
+ identity().validate();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("location", location());
+ jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element));
+ jsonWriter.writeJsonField("properties", this.innerProperties);
+ jsonWriter.writeJsonField("identity", this.identity);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ActionGroupResourceInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ActionGroupResourceInner if the JsonReader was pointing to an instance of it, or null if
+ * it was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the ActionGroupResourceInner.
+ */
+ public static ActionGroupResourceInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ActionGroupResourceInner deserializedActionGroupResourceInner = new ActionGroupResourceInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedActionGroupResourceInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedActionGroupResourceInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedActionGroupResourceInner.type = reader.getString();
+ } else if ("location".equals(fieldName)) {
+ deserializedActionGroupResourceInner.withLocation(reader.getString());
+ } else if ("tags".equals(fieldName)) {
+ Map tags = reader.readMap(reader1 -> reader1.getString());
+ deserializedActionGroupResourceInner.withTags(tags);
+ } else if ("properties".equals(fieldName)) {
+ deserializedActionGroupResourceInner.innerProperties = ActionGroup.fromJson(reader);
+ } else if ("identity".equals(fieldName)) {
+ deserializedActionGroupResourceInner.identity = ManagedServiceIdentity.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedActionGroupResourceInner;
+ });
+ }
+}
diff --git a/sdk/monitor/azure-resourcemanager-monitor-generated/src/main/java/com/azure/resourcemanager/monitor/generated/fluent/models/ScheduledQueryRuleProperties.java b/sdk/monitor/azure-resourcemanager-monitor-generated/src/main/java/com/azure/resourcemanager/monitor/generated/fluent/models/ScheduledQueryRuleProperties.java
new file mode 100644
index 0000000000000..a0610cad19303
--- /dev/null
+++ b/sdk/monitor/azure-resourcemanager-monitor-generated/src/main/java/com/azure/resourcemanager/monitor/generated/fluent/models/ScheduledQueryRuleProperties.java
@@ -0,0 +1,635 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.monitor.generated.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.CoreUtils;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.monitor.generated.models.Actions;
+import com.azure.resourcemanager.monitor.generated.models.AlertSeverity;
+import com.azure.resourcemanager.monitor.generated.models.RuleResolveConfiguration;
+import com.azure.resourcemanager.monitor.generated.models.ScheduledQueryRuleCriteria;
+import java.io.IOException;
+import java.time.Duration;
+import java.util.List;
+
+/**
+ * scheduled query rule Definition.
+ */
+@Fluent
+public final class ScheduledQueryRuleProperties implements JsonSerializable {
+ /*
+ * The api-version used when creating this alert rule
+ */
+ private String createdWithApiVersion;
+
+ /*
+ * True if alert rule is legacy Log Analytic rule
+ */
+ private Boolean isLegacyLogAnalyticsRule;
+
+ /*
+ * The description of the scheduled query rule.
+ */
+ private String description;
+
+ /*
+ * The display name of the alert rule
+ */
+ private String displayName;
+
+ /*
+ * Severity of the alert. Should be an integer between [0-4]. Value of 0 is severest. Relevant and required only for
+ * rules of the kind LogAlert.
+ */
+ private AlertSeverity severity;
+
+ /*
+ * The flag which indicates whether this scheduled query rule is enabled. Value should be true or false
+ */
+ private Boolean enabled;
+
+ /*
+ * The list of resource id's that this scheduled query rule is scoped to.
+ */
+ private List scopes;
+
+ /*
+ * How often the scheduled query rule is evaluated represented in ISO 8601 duration format. Relevant and required
+ * only for rules of the kind LogAlert.
+ */
+ private Duration evaluationFrequency;
+
+ /*
+ * The period of time (in ISO 8601 duration format) on which the Alert query will be executed (bin size). Relevant
+ * and required only for rules of the kind LogAlert.
+ */
+ private Duration windowSize;
+
+ /*
+ * If specified then overrides the query time range (default is WindowSize*NumberOfEvaluationPeriods). Relevant only
+ * for rules of the kind LogAlert.
+ */
+ private Duration overrideQueryTimeRange;
+
+ /*
+ * List of resource type of the target resource(s) on which the alert is created/updated. For example if the scope
+ * is a resource group and targetResourceTypes is Microsoft.Compute/virtualMachines, then a different alert will be
+ * fired for each virtual machine in the resource group which meet the alert criteria. Relevant only for rules of
+ * the kind LogAlert
+ */
+ private List targetResourceTypes;
+
+ /*
+ * The rule criteria that defines the conditions of the scheduled query rule.
+ */
+ private ScheduledQueryRuleCriteria criteria;
+
+ /*
+ * Mute actions for the chosen period of time (in ISO 8601 duration format) after the alert is fired. Relevant only
+ * for rules of the kind LogAlert.
+ */
+ private Duration muteActionsDuration;
+
+ /*
+ * Actions to invoke when the alert fires.
+ */
+ private Actions actions;
+
+ /*
+ * The flag which indicates whether this scheduled query rule has been configured to be stored in the customer's
+ * storage. The default is false.
+ */
+ private Boolean isWorkspaceAlertsStorageConfigured;
+
+ /*
+ * The flag which indicates whether this scheduled query rule should be stored in the customer's storage. The
+ * default is false. Relevant only for rules of the kind LogAlert.
+ */
+ private Boolean checkWorkspaceAlertsStorageConfigured;
+
+ /*
+ * The flag which indicates whether the provided query should be validated or not. The default is false. Relevant
+ * only for rules of the kind LogAlert.
+ */
+ private Boolean skipQueryValidation;
+
+ /*
+ * The flag that indicates whether the alert should be automatically resolved or not. The default is true. Relevant
+ * only for rules of the kind LogAlert.
+ */
+ private Boolean autoMitigate;
+
+ /*
+ * Defines the configuration for resolving fired alerts. Relevant only for rules of the kind LogAlert.
+ */
+ private RuleResolveConfiguration resolveConfiguration;
+
+ /**
+ * Creates an instance of ScheduledQueryRuleProperties class.
+ */
+ public ScheduledQueryRuleProperties() {
+ }
+
+ /**
+ * Get the createdWithApiVersion property: The api-version used when creating this alert rule.
+ *
+ * @return the createdWithApiVersion value.
+ */
+ public String createdWithApiVersion() {
+ return this.createdWithApiVersion;
+ }
+
+ /**
+ * Get the isLegacyLogAnalyticsRule property: True if alert rule is legacy Log Analytic rule.
+ *
+ * @return the isLegacyLogAnalyticsRule value.
+ */
+ public Boolean isLegacyLogAnalyticsRule() {
+ return this.isLegacyLogAnalyticsRule;
+ }
+
+ /**
+ * Get the description property: The description of the scheduled query rule.
+ *
+ * @return the description value.
+ */
+ public String description() {
+ return this.description;
+ }
+
+ /**
+ * Set the description property: The description of the scheduled query rule.
+ *
+ * @param description the description value to set.
+ * @return the ScheduledQueryRuleProperties object itself.
+ */
+ public ScheduledQueryRuleProperties withDescription(String description) {
+ this.description = description;
+ return this;
+ }
+
+ /**
+ * Get the displayName property: The display name of the alert rule.
+ *
+ * @return the displayName value.
+ */
+ public String displayName() {
+ return this.displayName;
+ }
+
+ /**
+ * Set the displayName property: The display name of the alert rule.
+ *
+ * @param displayName the displayName value to set.
+ * @return the ScheduledQueryRuleProperties object itself.
+ */
+ public ScheduledQueryRuleProperties withDisplayName(String displayName) {
+ this.displayName = displayName;
+ return this;
+ }
+
+ /**
+ * Get the severity property: Severity of the alert. Should be an integer between [0-4]. Value of 0 is severest.
+ * Relevant and required only for rules of the kind LogAlert.
+ *
+ * @return the severity value.
+ */
+ public AlertSeverity severity() {
+ return this.severity;
+ }
+
+ /**
+ * Set the severity property: Severity of the alert. Should be an integer between [0-4]. Value of 0 is severest.
+ * Relevant and required only for rules of the kind LogAlert.
+ *
+ * @param severity the severity value to set.
+ * @return the ScheduledQueryRuleProperties object itself.
+ */
+ public ScheduledQueryRuleProperties withSeverity(AlertSeverity severity) {
+ this.severity = severity;
+ return this;
+ }
+
+ /**
+ * Get the enabled property: The flag which indicates whether this scheduled query rule is enabled. Value should be
+ * true or false.
+ *
+ * @return the enabled value.
+ */
+ public Boolean enabled() {
+ return this.enabled;
+ }
+
+ /**
+ * Set the enabled property: The flag which indicates whether this scheduled query rule is enabled. Value should be
+ * true or false.
+ *
+ * @param enabled the enabled value to set.
+ * @return the ScheduledQueryRuleProperties object itself.
+ */
+ public ScheduledQueryRuleProperties withEnabled(Boolean enabled) {
+ this.enabled = enabled;
+ return this;
+ }
+
+ /**
+ * Get the scopes property: The list of resource id's that this scheduled query rule is scoped to.
+ *
+ * @return the scopes value.
+ */
+ public List scopes() {
+ return this.scopes;
+ }
+
+ /**
+ * Set the scopes property: The list of resource id's that this scheduled query rule is scoped to.
+ *
+ * @param scopes the scopes value to set.
+ * @return the ScheduledQueryRuleProperties object itself.
+ */
+ public ScheduledQueryRuleProperties withScopes(List scopes) {
+ this.scopes = scopes;
+ return this;
+ }
+
+ /**
+ * Get the evaluationFrequency property: How often the scheduled query rule is evaluated represented in ISO 8601
+ * duration format. Relevant and required only for rules of the kind LogAlert.
+ *
+ * @return the evaluationFrequency value.
+ */
+ public Duration evaluationFrequency() {
+ return this.evaluationFrequency;
+ }
+
+ /**
+ * Set the evaluationFrequency property: How often the scheduled query rule is evaluated represented in ISO 8601
+ * duration format. Relevant and required only for rules of the kind LogAlert.
+ *
+ * @param evaluationFrequency the evaluationFrequency value to set.
+ * @return the ScheduledQueryRuleProperties object itself.
+ */
+ public ScheduledQueryRuleProperties withEvaluationFrequency(Duration evaluationFrequency) {
+ this.evaluationFrequency = evaluationFrequency;
+ return this;
+ }
+
+ /**
+ * Get the windowSize property: The period of time (in ISO 8601 duration format) on which the Alert query will be
+ * executed (bin size). Relevant and required only for rules of the kind LogAlert.
+ *
+ * @return the windowSize value.
+ */
+ public Duration windowSize() {
+ return this.windowSize;
+ }
+
+ /**
+ * Set the windowSize property: The period of time (in ISO 8601 duration format) on which the Alert query will be
+ * executed (bin size). Relevant and required only for rules of the kind LogAlert.
+ *
+ * @param windowSize the windowSize value to set.
+ * @return the ScheduledQueryRuleProperties object itself.
+ */
+ public ScheduledQueryRuleProperties withWindowSize(Duration windowSize) {
+ this.windowSize = windowSize;
+ return this;
+ }
+
+ /**
+ * Get the overrideQueryTimeRange property: If specified then overrides the query time range (default is
+ * WindowSize*NumberOfEvaluationPeriods). Relevant only for rules of the kind LogAlert.
+ *
+ * @return the overrideQueryTimeRange value.
+ */
+ public Duration overrideQueryTimeRange() {
+ return this.overrideQueryTimeRange;
+ }
+
+ /**
+ * Set the overrideQueryTimeRange property: If specified then overrides the query time range (default is
+ * WindowSize*NumberOfEvaluationPeriods). Relevant only for rules of the kind LogAlert.
+ *
+ * @param overrideQueryTimeRange the overrideQueryTimeRange value to set.
+ * @return the ScheduledQueryRuleProperties object itself.
+ */
+ public ScheduledQueryRuleProperties withOverrideQueryTimeRange(Duration overrideQueryTimeRange) {
+ this.overrideQueryTimeRange = overrideQueryTimeRange;
+ return this;
+ }
+
+ /**
+ * Get the targetResourceTypes property: List of resource type of the target resource(s) on which the alert is
+ * created/updated. For example if the scope is a resource group and targetResourceTypes is
+ * Microsoft.Compute/virtualMachines, then a different alert will be fired for each virtual machine in the resource
+ * group which meet the alert criteria. Relevant only for rules of the kind LogAlert.
+ *
+ * @return the targetResourceTypes value.
+ */
+ public List targetResourceTypes() {
+ return this.targetResourceTypes;
+ }
+
+ /**
+ * Set the targetResourceTypes property: List of resource type of the target resource(s) on which the alert is
+ * created/updated. For example if the scope is a resource group and targetResourceTypes is
+ * Microsoft.Compute/virtualMachines, then a different alert will be fired for each virtual machine in the resource
+ * group which meet the alert criteria. Relevant only for rules of the kind LogAlert.
+ *
+ * @param targetResourceTypes the targetResourceTypes value to set.
+ * @return the ScheduledQueryRuleProperties object itself.
+ */
+ public ScheduledQueryRuleProperties withTargetResourceTypes(List targetResourceTypes) {
+ this.targetResourceTypes = targetResourceTypes;
+ return this;
+ }
+
+ /**
+ * Get the criteria property: The rule criteria that defines the conditions of the scheduled query rule.
+ *
+ * @return the criteria value.
+ */
+ public ScheduledQueryRuleCriteria criteria() {
+ return this.criteria;
+ }
+
+ /**
+ * Set the criteria property: The rule criteria that defines the conditions of the scheduled query rule.
+ *
+ * @param criteria the criteria value to set.
+ * @return the ScheduledQueryRuleProperties object itself.
+ */
+ public ScheduledQueryRuleProperties withCriteria(ScheduledQueryRuleCriteria criteria) {
+ this.criteria = criteria;
+ return this;
+ }
+
+ /**
+ * Get the muteActionsDuration property: Mute actions for the chosen period of time (in ISO 8601 duration format)
+ * after the alert is fired. Relevant only for rules of the kind LogAlert.
+ *
+ * @return the muteActionsDuration value.
+ */
+ public Duration muteActionsDuration() {
+ return this.muteActionsDuration;
+ }
+
+ /**
+ * Set the muteActionsDuration property: Mute actions for the chosen period of time (in ISO 8601 duration format)
+ * after the alert is fired. Relevant only for rules of the kind LogAlert.
+ *
+ * @param muteActionsDuration the muteActionsDuration value to set.
+ * @return the ScheduledQueryRuleProperties object itself.
+ */
+ public ScheduledQueryRuleProperties withMuteActionsDuration(Duration muteActionsDuration) {
+ this.muteActionsDuration = muteActionsDuration;
+ return this;
+ }
+
+ /**
+ * Get the actions property: Actions to invoke when the alert fires.
+ *
+ * @return the actions value.
+ */
+ public Actions actions() {
+ return this.actions;
+ }
+
+ /**
+ * Set the actions property: Actions to invoke when the alert fires.
+ *
+ * @param actions the actions value to set.
+ * @return the ScheduledQueryRuleProperties object itself.
+ */
+ public ScheduledQueryRuleProperties withActions(Actions actions) {
+ this.actions = actions;
+ return this;
+ }
+
+ /**
+ * Get the isWorkspaceAlertsStorageConfigured property: The flag which indicates whether this scheduled query rule
+ * has been configured to be stored in the customer's storage. The default is false.
+ *
+ * @return the isWorkspaceAlertsStorageConfigured value.
+ */
+ public Boolean isWorkspaceAlertsStorageConfigured() {
+ return this.isWorkspaceAlertsStorageConfigured;
+ }
+
+ /**
+ * Get the checkWorkspaceAlertsStorageConfigured property: The flag which indicates whether this scheduled query
+ * rule should be stored in the customer's storage. The default is false. Relevant only for rules of the kind
+ * LogAlert.
+ *
+ * @return the checkWorkspaceAlertsStorageConfigured value.
+ */
+ public Boolean checkWorkspaceAlertsStorageConfigured() {
+ return this.checkWorkspaceAlertsStorageConfigured;
+ }
+
+ /**
+ * Set the checkWorkspaceAlertsStorageConfigured property: The flag which indicates whether this scheduled query
+ * rule should be stored in the customer's storage. The default is false. Relevant only for rules of the kind
+ * LogAlert.
+ *
+ * @param checkWorkspaceAlertsStorageConfigured the checkWorkspaceAlertsStorageConfigured value to set.
+ * @return the ScheduledQueryRuleProperties object itself.
+ */
+ public ScheduledQueryRuleProperties
+ withCheckWorkspaceAlertsStorageConfigured(Boolean checkWorkspaceAlertsStorageConfigured) {
+ this.checkWorkspaceAlertsStorageConfigured = checkWorkspaceAlertsStorageConfigured;
+ return this;
+ }
+
+ /**
+ * Get the skipQueryValidation property: The flag which indicates whether the provided query should be validated or
+ * not. The default is false. Relevant only for rules of the kind LogAlert.
+ *
+ * @return the skipQueryValidation value.
+ */
+ public Boolean skipQueryValidation() {
+ return this.skipQueryValidation;
+ }
+
+ /**
+ * Set the skipQueryValidation property: The flag which indicates whether the provided query should be validated or
+ * not. The default is false. Relevant only for rules of the kind LogAlert.
+ *
+ * @param skipQueryValidation the skipQueryValidation value to set.
+ * @return the ScheduledQueryRuleProperties object itself.
+ */
+ public ScheduledQueryRuleProperties withSkipQueryValidation(Boolean skipQueryValidation) {
+ this.skipQueryValidation = skipQueryValidation;
+ return this;
+ }
+
+ /**
+ * Get the autoMitigate property: The flag that indicates whether the alert should be automatically resolved or not.
+ * The default is true. Relevant only for rules of the kind LogAlert.
+ *
+ * @return the autoMitigate value.
+ */
+ public Boolean autoMitigate() {
+ return this.autoMitigate;
+ }
+
+ /**
+ * Set the autoMitigate property: The flag that indicates whether the alert should be automatically resolved or not.
+ * The default is true. Relevant only for rules of the kind LogAlert.
+ *
+ * @param autoMitigate the autoMitigate value to set.
+ * @return the ScheduledQueryRuleProperties object itself.
+ */
+ public ScheduledQueryRuleProperties withAutoMitigate(Boolean autoMitigate) {
+ this.autoMitigate = autoMitigate;
+ return this;
+ }
+
+ /**
+ * Get the resolveConfiguration property: Defines the configuration for resolving fired alerts. Relevant only for
+ * rules of the kind LogAlert.
+ *
+ * @return the resolveConfiguration value.
+ */
+ public RuleResolveConfiguration resolveConfiguration() {
+ return this.resolveConfiguration;
+ }
+
+ /**
+ * Set the resolveConfiguration property: Defines the configuration for resolving fired alerts. Relevant only for
+ * rules of the kind LogAlert.
+ *
+ * @param resolveConfiguration the resolveConfiguration value to set.
+ * @return the ScheduledQueryRuleProperties object itself.
+ */
+ public ScheduledQueryRuleProperties withResolveConfiguration(RuleResolveConfiguration resolveConfiguration) {
+ this.resolveConfiguration = resolveConfiguration;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (criteria() != null) {
+ criteria().validate();
+ }
+ if (actions() != null) {
+ actions().validate();
+ }
+ if (resolveConfiguration() != null) {
+ resolveConfiguration().validate();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("description", this.description);
+ jsonWriter.writeStringField("displayName", this.displayName);
+ jsonWriter.writeNumberField("severity", this.severity == null ? null : this.severity.getValue());
+ jsonWriter.writeBooleanField("enabled", this.enabled);
+ jsonWriter.writeArrayField("scopes", this.scopes, (writer, element) -> writer.writeString(element));
+ jsonWriter.writeStringField("evaluationFrequency",
+ CoreUtils.durationToStringWithDays(this.evaluationFrequency));
+ jsonWriter.writeStringField("windowSize", CoreUtils.durationToStringWithDays(this.windowSize));
+ jsonWriter.writeStringField("overrideQueryTimeRange",
+ CoreUtils.durationToStringWithDays(this.overrideQueryTimeRange));
+ jsonWriter.writeArrayField("targetResourceTypes", this.targetResourceTypes,
+ (writer, element) -> writer.writeString(element));
+ jsonWriter.writeJsonField("criteria", this.criteria);
+ jsonWriter.writeStringField("muteActionsDuration",
+ CoreUtils.durationToStringWithDays(this.muteActionsDuration));
+ jsonWriter.writeJsonField("actions", this.actions);
+ jsonWriter.writeBooleanField("checkWorkspaceAlertsStorageConfigured",
+ this.checkWorkspaceAlertsStorageConfigured);
+ jsonWriter.writeBooleanField("skipQueryValidation", this.skipQueryValidation);
+ jsonWriter.writeBooleanField("autoMitigate", this.autoMitigate);
+ jsonWriter.writeJsonField("resolveConfiguration", this.resolveConfiguration);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ScheduledQueryRuleProperties from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ScheduledQueryRuleProperties if the JsonReader was pointing to an instance of it, or null
+ * if it was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the ScheduledQueryRuleProperties.
+ */
+ public static ScheduledQueryRuleProperties fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ScheduledQueryRuleProperties deserializedScheduledQueryRuleProperties = new ScheduledQueryRuleProperties();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("createdWithApiVersion".equals(fieldName)) {
+ deserializedScheduledQueryRuleProperties.createdWithApiVersion = reader.getString();
+ } else if ("isLegacyLogAnalyticsRule".equals(fieldName)) {
+ deserializedScheduledQueryRuleProperties.isLegacyLogAnalyticsRule
+ = reader.getNullable(JsonReader::getBoolean);
+ } else if ("description".equals(fieldName)) {
+ deserializedScheduledQueryRuleProperties.description = reader.getString();
+ } else if ("displayName".equals(fieldName)) {
+ deserializedScheduledQueryRuleProperties.displayName = reader.getString();
+ } else if ("severity".equals(fieldName)) {
+ deserializedScheduledQueryRuleProperties.severity = AlertSeverity.fromValue(reader.getLong());
+ } else if ("enabled".equals(fieldName)) {
+ deserializedScheduledQueryRuleProperties.enabled = reader.getNullable(JsonReader::getBoolean);
+ } else if ("scopes".equals(fieldName)) {
+ List scopes = reader.readArray(reader1 -> reader1.getString());
+ deserializedScheduledQueryRuleProperties.scopes = scopes;
+ } else if ("evaluationFrequency".equals(fieldName)) {
+ deserializedScheduledQueryRuleProperties.evaluationFrequency
+ = reader.getNullable(nonNullReader -> Duration.parse(nonNullReader.getString()));
+ } else if ("windowSize".equals(fieldName)) {
+ deserializedScheduledQueryRuleProperties.windowSize
+ = reader.getNullable(nonNullReader -> Duration.parse(nonNullReader.getString()));
+ } else if ("overrideQueryTimeRange".equals(fieldName)) {
+ deserializedScheduledQueryRuleProperties.overrideQueryTimeRange
+ = reader.getNullable(nonNullReader -> Duration.parse(nonNullReader.getString()));
+ } else if ("targetResourceTypes".equals(fieldName)) {
+ List targetResourceTypes = reader.readArray(reader1 -> reader1.getString());
+ deserializedScheduledQueryRuleProperties.targetResourceTypes = targetResourceTypes;
+ } else if ("criteria".equals(fieldName)) {
+ deserializedScheduledQueryRuleProperties.criteria = ScheduledQueryRuleCriteria.fromJson(reader);
+ } else if ("muteActionsDuration".equals(fieldName)) {
+ deserializedScheduledQueryRuleProperties.muteActionsDuration
+ = reader.getNullable(nonNullReader -> Duration.parse(nonNullReader.getString()));
+ } else if ("actions".equals(fieldName)) {
+ deserializedScheduledQueryRuleProperties.actions = Actions.fromJson(reader);
+ } else if ("isWorkspaceAlertsStorageConfigured".equals(fieldName)) {
+ deserializedScheduledQueryRuleProperties.isWorkspaceAlertsStorageConfigured
+ = reader.getNullable(JsonReader::getBoolean);
+ } else if ("checkWorkspaceAlertsStorageConfigured".equals(fieldName)) {
+ deserializedScheduledQueryRuleProperties.checkWorkspaceAlertsStorageConfigured
+ = reader.getNullable(JsonReader::getBoolean);
+ } else if ("skipQueryValidation".equals(fieldName)) {
+ deserializedScheduledQueryRuleProperties.skipQueryValidation
+ = reader.getNullable(JsonReader::getBoolean);
+ } else if ("autoMitigate".equals(fieldName)) {
+ deserializedScheduledQueryRuleProperties.autoMitigate = reader.getNullable(JsonReader::getBoolean);
+ } else if ("resolveConfiguration".equals(fieldName)) {
+ deserializedScheduledQueryRuleProperties.resolveConfiguration
+ = RuleResolveConfiguration.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedScheduledQueryRuleProperties;
+ });
+ }
+}
diff --git a/sdk/monitor/azure-resourcemanager-monitor-generated/src/main/java/com/azure/resourcemanager/monitor/generated/fluent/models/ScheduledQueryRuleResourceInner.java b/sdk/monitor/azure-resourcemanager-monitor-generated/src/main/java/com/azure/resourcemanager/monitor/generated/fluent/models/ScheduledQueryRuleResourceInner.java
new file mode 100644
index 0000000000000..7f550030070c5
--- /dev/null
+++ b/sdk/monitor/azure-resourcemanager-monitor-generated/src/main/java/com/azure/resourcemanager/monitor/generated/fluent/models/ScheduledQueryRuleResourceInner.java
@@ -0,0 +1,703 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.monitor.generated.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.Resource;
+import com.azure.core.management.SystemData;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.monitor.generated.models.Actions;
+import com.azure.resourcemanager.monitor.generated.models.AlertSeverity;
+import com.azure.resourcemanager.monitor.generated.models.Identity;
+import com.azure.resourcemanager.monitor.generated.models.Kind;
+import com.azure.resourcemanager.monitor.generated.models.RuleResolveConfiguration;
+import com.azure.resourcemanager.monitor.generated.models.ScheduledQueryRuleCriteria;
+import java.io.IOException;
+import java.time.Duration;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * The scheduled query rule resource.
+ */
+@Fluent
+public final class ScheduledQueryRuleResourceInner extends Resource {
+ /*
+ * The identity of the resource.
+ */
+ private Identity identity;
+
+ /*
+ * Indicates the type of scheduled query rule. The default is LogAlert.
+ */
+ private Kind kind;
+
+ /*
+ * The etag field is *not* required. If it is provided in the response body, it must also be provided as a header
+ * per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested
+ * resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section
+ * 14.26), and If-Range (section 14.27) header fields.
+ */
+ private String etag;
+
+ /*
+ * SystemData of ScheduledQueryRule.
+ */
+ private SystemData systemData;
+
+ /*
+ * The rule properties of the resource.
+ */
+ private ScheduledQueryRuleProperties innerProperties = new ScheduledQueryRuleProperties();
+
+ /*
+ * The type of the resource.
+ */
+ private String type;
+
+ /*
+ * The name of the resource.
+ */
+ private String name;
+
+ /*
+ * Fully qualified resource Id for the resource.
+ */
+ private String id;
+
+ /**
+ * Creates an instance of ScheduledQueryRuleResourceInner class.
+ */
+ public ScheduledQueryRuleResourceInner() {
+ }
+
+ /**
+ * Get the identity property: The identity of the resource.
+ *
+ * @return the identity value.
+ */
+ public Identity identity() {
+ return this.identity;
+ }
+
+ /**
+ * Set the identity property: The identity of the resource.
+ *
+ * @param identity the identity value to set.
+ * @return the ScheduledQueryRuleResourceInner object itself.
+ */
+ public ScheduledQueryRuleResourceInner withIdentity(Identity identity) {
+ this.identity = identity;
+ return this;
+ }
+
+ /**
+ * Get the kind property: Indicates the type of scheduled query rule. The default is LogAlert.
+ *
+ * @return the kind value.
+ */
+ public Kind kind() {
+ return this.kind;
+ }
+
+ /**
+ * Set the kind property: Indicates the type of scheduled query rule. The default is LogAlert.
+ *
+ * @param kind the kind value to set.
+ * @return the ScheduledQueryRuleResourceInner object itself.
+ */
+ public ScheduledQueryRuleResourceInner withKind(Kind kind) {
+ this.kind = kind;
+ return this;
+ }
+
+ /**
+ * Get the etag property: The etag field is *not* required. If it is provided in the response body, it must also be
+ * provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from
+ * the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24),
+ * If-None-Match (section 14.26), and If-Range (section 14.27) header fields.
+ *
+ * @return the etag value.
+ */
+ public String etag() {
+ return this.etag;
+ }
+
+ /**
+ * Get the systemData property: SystemData of ScheduledQueryRule.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
+ /**
+ * Get the innerProperties property: The rule properties of the resource.
+ *
+ * @return the innerProperties value.
+ */
+ private ScheduledQueryRuleProperties innerProperties() {
+ return this.innerProperties;
+ }
+
+ /**
+ * Get the type property: The type of the resource.
+ *
+ * @return the type value.
+ */
+ @Override
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Get the name property: The name of the resource.
+ *
+ * @return the name value.
+ */
+ @Override
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the id property: Fully qualified resource Id for the resource.
+ *
+ * @return the id value.
+ */
+ @Override
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public ScheduledQueryRuleResourceInner withLocation(String location) {
+ super.withLocation(location);
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public ScheduledQueryRuleResourceInner withTags(Map tags) {
+ super.withTags(tags);
+ return this;
+ }
+
+ /**
+ * Get the createdWithApiVersion property: The api-version used when creating this alert rule.
+ *
+ * @return the createdWithApiVersion value.
+ */
+ public String createdWithApiVersion() {
+ return this.innerProperties() == null ? null : this.innerProperties().createdWithApiVersion();
+ }
+
+ /**
+ * Get the isLegacyLogAnalyticsRule property: True if alert rule is legacy Log Analytic rule.
+ *
+ * @return the isLegacyLogAnalyticsRule value.
+ */
+ public Boolean isLegacyLogAnalyticsRule() {
+ return this.innerProperties() == null ? null : this.innerProperties().isLegacyLogAnalyticsRule();
+ }
+
+ /**
+ * Get the description property: The description of the scheduled query rule.
+ *
+ * @return the description value.
+ */
+ public String description() {
+ return this.innerProperties() == null ? null : this.innerProperties().description();
+ }
+
+ /**
+ * Set the description property: The description of the scheduled query rule.
+ *
+ * @param description the description value to set.
+ * @return the ScheduledQueryRuleResourceInner object itself.
+ */
+ public ScheduledQueryRuleResourceInner withDescription(String description) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ScheduledQueryRuleProperties();
+ }
+ this.innerProperties().withDescription(description);
+ return this;
+ }
+
+ /**
+ * Get the displayName property: The display name of the alert rule.
+ *
+ * @return the displayName value.
+ */
+ public String displayName() {
+ return this.innerProperties() == null ? null : this.innerProperties().displayName();
+ }
+
+ /**
+ * Set the displayName property: The display name of the alert rule.
+ *
+ * @param displayName the displayName value to set.
+ * @return the ScheduledQueryRuleResourceInner object itself.
+ */
+ public ScheduledQueryRuleResourceInner withDisplayName(String displayName) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ScheduledQueryRuleProperties();
+ }
+ this.innerProperties().withDisplayName(displayName);
+ return this;
+ }
+
+ /**
+ * Get the severity property: Severity of the alert. Should be an integer between [0-4]. Value of 0 is severest.
+ * Relevant and required only for rules of the kind LogAlert.
+ *
+ * @return the severity value.
+ */
+ public AlertSeverity severity() {
+ return this.innerProperties() == null ? null : this.innerProperties().severity();
+ }
+
+ /**
+ * Set the severity property: Severity of the alert. Should be an integer between [0-4]. Value of 0 is severest.
+ * Relevant and required only for rules of the kind LogAlert.
+ *
+ * @param severity the severity value to set.
+ * @return the ScheduledQueryRuleResourceInner object itself.
+ */
+ public ScheduledQueryRuleResourceInner withSeverity(AlertSeverity severity) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ScheduledQueryRuleProperties();
+ }
+ this.innerProperties().withSeverity(severity);
+ return this;
+ }
+
+ /**
+ * Get the enabled property: The flag which indicates whether this scheduled query rule is enabled. Value should be
+ * true or false.
+ *
+ * @return the enabled value.
+ */
+ public Boolean enabled() {
+ return this.innerProperties() == null ? null : this.innerProperties().enabled();
+ }
+
+ /**
+ * Set the enabled property: The flag which indicates whether this scheduled query rule is enabled. Value should be
+ * true or false.
+ *
+ * @param enabled the enabled value to set.
+ * @return the ScheduledQueryRuleResourceInner object itself.
+ */
+ public ScheduledQueryRuleResourceInner withEnabled(Boolean enabled) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ScheduledQueryRuleProperties();
+ }
+ this.innerProperties().withEnabled(enabled);
+ return this;
+ }
+
+ /**
+ * Get the scopes property: The list of resource id's that this scheduled query rule is scoped to.
+ *
+ * @return the scopes value.
+ */
+ public List scopes() {
+ return this.innerProperties() == null ? null : this.innerProperties().scopes();
+ }
+
+ /**
+ * Set the scopes property: The list of resource id's that this scheduled query rule is scoped to.
+ *
+ * @param scopes the scopes value to set.
+ * @return the ScheduledQueryRuleResourceInner object itself.
+ */
+ public ScheduledQueryRuleResourceInner withScopes(List scopes) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ScheduledQueryRuleProperties();
+ }
+ this.innerProperties().withScopes(scopes);
+ return this;
+ }
+
+ /**
+ * Get the evaluationFrequency property: How often the scheduled query rule is evaluated represented in ISO 8601
+ * duration format. Relevant and required only for rules of the kind LogAlert.
+ *
+ * @return the evaluationFrequency value.
+ */
+ public Duration evaluationFrequency() {
+ return this.innerProperties() == null ? null : this.innerProperties().evaluationFrequency();
+ }
+
+ /**
+ * Set the evaluationFrequency property: How often the scheduled query rule is evaluated represented in ISO 8601
+ * duration format. Relevant and required only for rules of the kind LogAlert.
+ *
+ * @param evaluationFrequency the evaluationFrequency value to set.
+ * @return the ScheduledQueryRuleResourceInner object itself.
+ */
+ public ScheduledQueryRuleResourceInner withEvaluationFrequency(Duration evaluationFrequency) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ScheduledQueryRuleProperties();
+ }
+ this.innerProperties().withEvaluationFrequency(evaluationFrequency);
+ return this;
+ }
+
+ /**
+ * Get the windowSize property: The period of time (in ISO 8601 duration format) on which the Alert query will be
+ * executed (bin size). Relevant and required only for rules of the kind LogAlert.
+ *
+ * @return the windowSize value.
+ */
+ public Duration windowSize() {
+ return this.innerProperties() == null ? null : this.innerProperties().windowSize();
+ }
+
+ /**
+ * Set the windowSize property: The period of time (in ISO 8601 duration format) on which the Alert query will be
+ * executed (bin size). Relevant and required only for rules of the kind LogAlert.
+ *
+ * @param windowSize the windowSize value to set.
+ * @return the ScheduledQueryRuleResourceInner object itself.
+ */
+ public ScheduledQueryRuleResourceInner withWindowSize(Duration windowSize) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ScheduledQueryRuleProperties();
+ }
+ this.innerProperties().withWindowSize(windowSize);
+ return this;
+ }
+
+ /**
+ * Get the overrideQueryTimeRange property: If specified then overrides the query time range (default is
+ * WindowSize*NumberOfEvaluationPeriods). Relevant only for rules of the kind LogAlert.
+ *
+ * @return the overrideQueryTimeRange value.
+ */
+ public Duration overrideQueryTimeRange() {
+ return this.innerProperties() == null ? null : this.innerProperties().overrideQueryTimeRange();
+ }
+
+ /**
+ * Set the overrideQueryTimeRange property: If specified then overrides the query time range (default is
+ * WindowSize*NumberOfEvaluationPeriods). Relevant only for rules of the kind LogAlert.
+ *
+ * @param overrideQueryTimeRange the overrideQueryTimeRange value to set.
+ * @return the ScheduledQueryRuleResourceInner object itself.
+ */
+ public ScheduledQueryRuleResourceInner withOverrideQueryTimeRange(Duration overrideQueryTimeRange) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ScheduledQueryRuleProperties();
+ }
+ this.innerProperties().withOverrideQueryTimeRange(overrideQueryTimeRange);
+ return this;
+ }
+
+ /**
+ * Get the targetResourceTypes property: List of resource type of the target resource(s) on which the alert is
+ * created/updated. For example if the scope is a resource group and targetResourceTypes is
+ * Microsoft.Compute/virtualMachines, then a different alert will be fired for each virtual machine in the resource
+ * group which meet the alert criteria. Relevant only for rules of the kind LogAlert.
+ *
+ * @return the targetResourceTypes value.
+ */
+ public List targetResourceTypes() {
+ return this.innerProperties() == null ? null : this.innerProperties().targetResourceTypes();
+ }
+
+ /**
+ * Set the targetResourceTypes property: List of resource type of the target resource(s) on which the alert is
+ * created/updated. For example if the scope is a resource group and targetResourceTypes is
+ * Microsoft.Compute/virtualMachines, then a different alert will be fired for each virtual machine in the resource
+ * group which meet the alert criteria. Relevant only for rules of the kind LogAlert.
+ *
+ * @param targetResourceTypes the targetResourceTypes value to set.
+ * @return the ScheduledQueryRuleResourceInner object itself.
+ */
+ public ScheduledQueryRuleResourceInner withTargetResourceTypes(List targetResourceTypes) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ScheduledQueryRuleProperties();
+ }
+ this.innerProperties().withTargetResourceTypes(targetResourceTypes);
+ return this;
+ }
+
+ /**
+ * Get the criteria property: The rule criteria that defines the conditions of the scheduled query rule.
+ *
+ * @return the criteria value.
+ */
+ public ScheduledQueryRuleCriteria criteria() {
+ return this.innerProperties() == null ? null : this.innerProperties().criteria();
+ }
+
+ /**
+ * Set the criteria property: The rule criteria that defines the conditions of the scheduled query rule.
+ *
+ * @param criteria the criteria value to set.
+ * @return the ScheduledQueryRuleResourceInner object itself.
+ */
+ public ScheduledQueryRuleResourceInner withCriteria(ScheduledQueryRuleCriteria criteria) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ScheduledQueryRuleProperties();
+ }
+ this.innerProperties().withCriteria(criteria);
+ return this;
+ }
+
+ /**
+ * Get the muteActionsDuration property: Mute actions for the chosen period of time (in ISO 8601 duration format)
+ * after the alert is fired. Relevant only for rules of the kind LogAlert.
+ *
+ * @return the muteActionsDuration value.
+ */
+ public Duration muteActionsDuration() {
+ return this.innerProperties() == null ? null : this.innerProperties().muteActionsDuration();
+ }
+
+ /**
+ * Set the muteActionsDuration property: Mute actions for the chosen period of time (in ISO 8601 duration format)
+ * after the alert is fired. Relevant only for rules of the kind LogAlert.
+ *
+ * @param muteActionsDuration the muteActionsDuration value to set.
+ * @return the ScheduledQueryRuleResourceInner object itself.
+ */
+ public ScheduledQueryRuleResourceInner withMuteActionsDuration(Duration muteActionsDuration) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ScheduledQueryRuleProperties();
+ }
+ this.innerProperties().withMuteActionsDuration(muteActionsDuration);
+ return this;
+ }
+
+ /**
+ * Get the actions property: Actions to invoke when the alert fires.
+ *
+ * @return the actions value.
+ */
+ public Actions actions() {
+ return this.innerProperties() == null ? null : this.innerProperties().actions();
+ }
+
+ /**
+ * Set the actions property: Actions to invoke when the alert fires.
+ *
+ * @param actions the actions value to set.
+ * @return the ScheduledQueryRuleResourceInner object itself.
+ */
+ public ScheduledQueryRuleResourceInner withActions(Actions actions) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ScheduledQueryRuleProperties();
+ }
+ this.innerProperties().withActions(actions);
+ return this;
+ }
+
+ /**
+ * Get the isWorkspaceAlertsStorageConfigured property: The flag which indicates whether this scheduled query rule
+ * has been configured to be stored in the customer's storage. The default is false.
+ *
+ * @return the isWorkspaceAlertsStorageConfigured value.
+ */
+ public Boolean isWorkspaceAlertsStorageConfigured() {
+ return this.innerProperties() == null ? null : this.innerProperties().isWorkspaceAlertsStorageConfigured();
+ }
+
+ /**
+ * Get the checkWorkspaceAlertsStorageConfigured property: The flag which indicates whether this scheduled query
+ * rule should be stored in the customer's storage. The default is false. Relevant only for rules of the kind
+ * LogAlert.
+ *
+ * @return the checkWorkspaceAlertsStorageConfigured value.
+ */
+ public Boolean checkWorkspaceAlertsStorageConfigured() {
+ return this.innerProperties() == null ? null : this.innerProperties().checkWorkspaceAlertsStorageConfigured();
+ }
+
+ /**
+ * Set the checkWorkspaceAlertsStorageConfigured property: The flag which indicates whether this scheduled query
+ * rule should be stored in the customer's storage. The default is false. Relevant only for rules of the kind
+ * LogAlert.
+ *
+ * @param checkWorkspaceAlertsStorageConfigured the checkWorkspaceAlertsStorageConfigured value to set.
+ * @return the ScheduledQueryRuleResourceInner object itself.
+ */
+ public ScheduledQueryRuleResourceInner
+ withCheckWorkspaceAlertsStorageConfigured(Boolean checkWorkspaceAlertsStorageConfigured) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ScheduledQueryRuleProperties();
+ }
+ this.innerProperties().withCheckWorkspaceAlertsStorageConfigured(checkWorkspaceAlertsStorageConfigured);
+ return this;
+ }
+
+ /**
+ * Get the skipQueryValidation property: The flag which indicates whether the provided query should be validated or
+ * not. The default is false. Relevant only for rules of the kind LogAlert.
+ *
+ * @return the skipQueryValidation value.
+ */
+ public Boolean skipQueryValidation() {
+ return this.innerProperties() == null ? null : this.innerProperties().skipQueryValidation();
+ }
+
+ /**
+ * Set the skipQueryValidation property: The flag which indicates whether the provided query should be validated or
+ * not. The default is false. Relevant only for rules of the kind LogAlert.
+ *
+ * @param skipQueryValidation the skipQueryValidation value to set.
+ * @return the ScheduledQueryRuleResourceInner object itself.
+ */
+ public ScheduledQueryRuleResourceInner withSkipQueryValidation(Boolean skipQueryValidation) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ScheduledQueryRuleProperties();
+ }
+ this.innerProperties().withSkipQueryValidation(skipQueryValidation);
+ return this;
+ }
+
+ /**
+ * Get the autoMitigate property: The flag that indicates whether the alert should be automatically resolved or not.
+ * The default is true. Relevant only for rules of the kind LogAlert.
+ *
+ * @return the autoMitigate value.
+ */
+ public Boolean autoMitigate() {
+ return this.innerProperties() == null ? null : this.innerProperties().autoMitigate();
+ }
+
+ /**
+ * Set the autoMitigate property: The flag that indicates whether the alert should be automatically resolved or not.
+ * The default is true. Relevant only for rules of the kind LogAlert.
+ *
+ * @param autoMitigate the autoMitigate value to set.
+ * @return the ScheduledQueryRuleResourceInner object itself.
+ */
+ public ScheduledQueryRuleResourceInner withAutoMitigate(Boolean autoMitigate) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ScheduledQueryRuleProperties();
+ }
+ this.innerProperties().withAutoMitigate(autoMitigate);
+ return this;
+ }
+
+ /**
+ * Get the resolveConfiguration property: Defines the configuration for resolving fired alerts. Relevant only for
+ * rules of the kind LogAlert.
+ *
+ * @return the resolveConfiguration value.
+ */
+ public RuleResolveConfiguration resolveConfiguration() {
+ return this.innerProperties() == null ? null : this.innerProperties().resolveConfiguration();
+ }
+
+ /**
+ * Set the resolveConfiguration property: Defines the configuration for resolving fired alerts. Relevant only for
+ * rules of the kind LogAlert.
+ *
+ * @param resolveConfiguration the resolveConfiguration value to set.
+ * @return the ScheduledQueryRuleResourceInner object itself.
+ */
+ public ScheduledQueryRuleResourceInner withResolveConfiguration(RuleResolveConfiguration resolveConfiguration) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ScheduledQueryRuleProperties();
+ }
+ this.innerProperties().withResolveConfiguration(resolveConfiguration);
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (identity() != null) {
+ identity().validate();
+ }
+ if (innerProperties() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Missing required property innerProperties in model ScheduledQueryRuleResourceInner"));
+ } else {
+ innerProperties().validate();
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(ScheduledQueryRuleResourceInner.class);
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("location", location());
+ jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element));
+ jsonWriter.writeJsonField("properties", this.innerProperties);
+ jsonWriter.writeJsonField("identity", this.identity);
+ jsonWriter.writeStringField("kind", this.kind == null ? null : this.kind.toString());
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ScheduledQueryRuleResourceInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ScheduledQueryRuleResourceInner if the JsonReader was pointing to an instance of it, or
+ * null if it was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the ScheduledQueryRuleResourceInner.
+ */
+ public static ScheduledQueryRuleResourceInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ScheduledQueryRuleResourceInner deserializedScheduledQueryRuleResourceInner
+ = new ScheduledQueryRuleResourceInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedScheduledQueryRuleResourceInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedScheduledQueryRuleResourceInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedScheduledQueryRuleResourceInner.type = reader.getString();
+ } else if ("location".equals(fieldName)) {
+ deserializedScheduledQueryRuleResourceInner.withLocation(reader.getString());
+ } else if ("tags".equals(fieldName)) {
+ Map tags = reader.readMap(reader1 -> reader1.getString());
+ deserializedScheduledQueryRuleResourceInner.withTags(tags);
+ } else if ("properties".equals(fieldName)) {
+ deserializedScheduledQueryRuleResourceInner.innerProperties
+ = ScheduledQueryRuleProperties.fromJson(reader);
+ } else if ("identity".equals(fieldName)) {
+ deserializedScheduledQueryRuleResourceInner.identity = Identity.fromJson(reader);
+ } else if ("kind".equals(fieldName)) {
+ deserializedScheduledQueryRuleResourceInner.kind = Kind.fromString(reader.getString());
+ } else if ("etag".equals(fieldName)) {
+ deserializedScheduledQueryRuleResourceInner.etag = reader.getString();
+ } else if ("systemData".equals(fieldName)) {
+ deserializedScheduledQueryRuleResourceInner.systemData = SystemData.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedScheduledQueryRuleResourceInner;
+ });
+ }
+}
diff --git a/sdk/monitor/azure-resourcemanager-monitor-generated/src/main/java/com/azure/resourcemanager/monitor/generated/fluent/models/TestNotificationDetailsResponseInner.java b/sdk/monitor/azure-resourcemanager-monitor-generated/src/main/java/com/azure/resourcemanager/monitor/generated/fluent/models/TestNotificationDetailsResponseInner.java
new file mode 100644
index 0000000000000..3f456b5060196
--- /dev/null
+++ b/sdk/monitor/azure-resourcemanager-monitor-generated/src/main/java/com/azure/resourcemanager/monitor/generated/fluent/models/TestNotificationDetailsResponseInner.java
@@ -0,0 +1,226 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.monitor.generated.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.monitor.generated.models.ActionDetail;
+import com.azure.resourcemanager.monitor.generated.models.Context;
+import java.io.IOException;
+import java.util.List;
+
+/**
+ * The details of the test notification results.
+ */
+@Fluent
+public final class TestNotificationDetailsResponseInner
+ implements JsonSerializable {
+ /*
+ * The context info
+ */
+ private Context context;
+
+ /*
+ * The overall state
+ */
+ private String state;
+
+ /*
+ * The completed time
+ */
+ private String completedTime;
+
+ /*
+ * The created time
+ */
+ private String createdTime;
+
+ /*
+ * The list of action detail
+ */
+ private List actionDetails;
+
+ /**
+ * Creates an instance of TestNotificationDetailsResponseInner class.
+ */
+ public TestNotificationDetailsResponseInner() {
+ }
+
+ /**
+ * Get the context property: The context info.
+ *
+ * @return the context value.
+ */
+ public Context context() {
+ return this.context;
+ }
+
+ /**
+ * Set the context property: The context info.
+ *
+ * @param context the context value to set.
+ * @return the TestNotificationDetailsResponseInner object itself.
+ */
+ public TestNotificationDetailsResponseInner withContext(Context context) {
+ this.context = context;
+ return this;
+ }
+
+ /**
+ * Get the state property: The overall state.
+ *
+ * @return the state value.
+ */
+ public String state() {
+ return this.state;
+ }
+
+ /**
+ * Set the state property: The overall state.
+ *
+ * @param state the state value to set.
+ * @return the TestNotificationDetailsResponseInner object itself.
+ */
+ public TestNotificationDetailsResponseInner withState(String state) {
+ this.state = state;
+ return this;
+ }
+
+ /**
+ * Get the completedTime property: The completed time.
+ *
+ * @return the completedTime value.
+ */
+ public String completedTime() {
+ return this.completedTime;
+ }
+
+ /**
+ * Set the completedTime property: The completed time.
+ *
+ * @param completedTime the completedTime value to set.
+ * @return the TestNotificationDetailsResponseInner object itself.
+ */
+ public TestNotificationDetailsResponseInner withCompletedTime(String completedTime) {
+ this.completedTime = completedTime;
+ return this;
+ }
+
+ /**
+ * Get the createdTime property: The created time.
+ *
+ * @return the createdTime value.
+ */
+ public String createdTime() {
+ return this.createdTime;
+ }
+
+ /**
+ * Set the createdTime property: The created time.
+ *
+ * @param createdTime the createdTime value to set.
+ * @return the TestNotificationDetailsResponseInner object itself.
+ */
+ public TestNotificationDetailsResponseInner withCreatedTime(String createdTime) {
+ this.createdTime = createdTime;
+ return this;
+ }
+
+ /**
+ * Get the actionDetails property: The list of action detail.
+ *
+ * @return the actionDetails value.
+ */
+ public List actionDetails() {
+ return this.actionDetails;
+ }
+
+ /**
+ * Set the actionDetails property: The list of action detail.
+ *
+ * @param actionDetails the actionDetails value to set.
+ * @return the TestNotificationDetailsResponseInner object itself.
+ */
+ public TestNotificationDetailsResponseInner withActionDetails(List actionDetails) {
+ this.actionDetails = actionDetails;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (context() != null) {
+ context().validate();
+ }
+ if (state() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Missing required property state in model TestNotificationDetailsResponseInner"));
+ }
+ if (actionDetails() != null) {
+ actionDetails().forEach(e -> e.validate());
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(TestNotificationDetailsResponseInner.class);
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("state", this.state);
+ jsonWriter.writeJsonField("context", this.context);
+ jsonWriter.writeStringField("completedTime", this.completedTime);
+ jsonWriter.writeStringField("createdTime", this.createdTime);
+ jsonWriter.writeArrayField("actionDetails", this.actionDetails, (writer, element) -> writer.writeJson(element));
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of TestNotificationDetailsResponseInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of TestNotificationDetailsResponseInner if the JsonReader was pointing to an instance of it,
+ * or null if it was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the TestNotificationDetailsResponseInner.
+ */
+ public static TestNotificationDetailsResponseInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ TestNotificationDetailsResponseInner deserializedTestNotificationDetailsResponseInner
+ = new TestNotificationDetailsResponseInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("state".equals(fieldName)) {
+ deserializedTestNotificationDetailsResponseInner.state = reader.getString();
+ } else if ("context".equals(fieldName)) {
+ deserializedTestNotificationDetailsResponseInner.context = Context.fromJson(reader);
+ } else if ("completedTime".equals(fieldName)) {
+ deserializedTestNotificationDetailsResponseInner.completedTime = reader.getString();
+ } else if ("createdTime".equals(fieldName)) {
+ deserializedTestNotificationDetailsResponseInner.createdTime = reader.getString();
+ } else if ("actionDetails".equals(fieldName)) {
+ List actionDetails = reader.readArray(reader1 -> ActionDetail.fromJson(reader1));
+ deserializedTestNotificationDetailsResponseInner.actionDetails = actionDetails;
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedTestNotificationDetailsResponseInner;
+ });
+ }
+}
diff --git a/sdk/monitor/azure-resourcemanager-monitor-generated/src/main/java/com/azure/resourcemanager/monitor/generated/fluent/models/package-info.java b/sdk/monitor/azure-resourcemanager-monitor-generated/src/main/java/com/azure/resourcemanager/monitor/generated/fluent/models/package-info.java
new file mode 100644
index 0000000000000..3d3e111b3e8d8
--- /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,9 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+/**
+ * Package containing the inner data models for MonitorClient.
+ * Monitor Management Client.
+ */
+package com.azure.resourcemanager.monitor.generated.fluent.models;
diff --git a/sdk/monitor/azure-resourcemanager-monitor-generated/src/main/java/com/azure/resourcemanager/monitor/generated/fluent/package-info.java b/sdk/monitor/azure-resourcemanager-monitor-generated/src/main/java/com/azure/resourcemanager/monitor/generated/fluent/package-info.java
new file mode 100644
index 0000000000000..f76ecdb8d7d15
--- /dev/null
+++ b/sdk/monitor/azure-resourcemanager-monitor-generated/src/main/java/com/azure/resourcemanager/monitor/generated/fluent/package-info.java
@@ -0,0 +1,9 @@
+// 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/ActionGroupResourceImpl.java b/sdk/monitor/azure-resourcemanager-monitor-generated/src/main/java/com/azure/resourcemanager/monitor/generated/implementation/ActionGroupResourceImpl.java
new file mode 100644
index 0000000000000..f45c581021361
--- /dev/null
+++ b/sdk/monitor/azure-resourcemanager-monitor-generated/src/main/java/com/azure/resourcemanager/monitor/generated/implementation/ActionGroupResourceImpl.java
@@ -0,0 +1,413 @@
+// 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.Response;
+import com.azure.core.management.Region;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.monitor.generated.fluent.models.ActionGroupResourceInner;
+import com.azure.resourcemanager.monitor.generated.models.ActionGroupPatchBody;
+import com.azure.resourcemanager.monitor.generated.models.ActionGroupResource;
+import com.azure.resourcemanager.monitor.generated.models.ArmRoleReceiver;
+import com.azure.resourcemanager.monitor.generated.models.AutomationRunbookReceiver;
+import com.azure.resourcemanager.monitor.generated.models.AzureAppPushReceiver;
+import com.azure.resourcemanager.monitor.generated.models.AzureFunctionReceiver;
+import com.azure.resourcemanager.monitor.generated.models.EmailReceiver;
+import com.azure.resourcemanager.monitor.generated.models.EnableRequest;
+import com.azure.resourcemanager.monitor.generated.models.EventHubReceiver;
+import com.azure.resourcemanager.monitor.generated.models.IncidentReceiver;
+import com.azure.resourcemanager.monitor.generated.models.ItsmReceiver;
+import com.azure.resourcemanager.monitor.generated.models.LogicAppReceiver;
+import com.azure.resourcemanager.monitor.generated.models.ManagedServiceIdentity;
+import com.azure.resourcemanager.monitor.generated.models.NotificationRequestBody;
+import com.azure.resourcemanager.monitor.generated.models.SmsReceiver;
+import com.azure.resourcemanager.monitor.generated.models.TestNotificationDetailsResponse;
+import com.azure.resourcemanager.monitor.generated.models.VoiceReceiver;
+import com.azure.resourcemanager.monitor.generated.models.WebhookReceiver;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+
+public final class ActionGroupResourceImpl
+ implements ActionGroupResource, ActionGroupResource.Definition, ActionGroupResource.Update {
+ private ActionGroupResourceInner innerObject;
+
+ private final com.azure.resourcemanager.monitor.generated.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 ManagedServiceIdentity identity() {
+ return this.innerModel().identity();
+ }
+
+ public String groupShortName() {
+ return this.innerModel().groupShortName();
+ }
+
+ public boolean enabled() {
+ return this.innerModel().enabled();
+ }
+
+ public List emailReceivers() {
+ List inner = this.innerModel().emailReceivers();
+ if (inner != null) {
+ return Collections.unmodifiableList(inner);
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public List smsReceivers() {
+ List inner = this.innerModel().smsReceivers();
+ if (inner != null) {
+ return Collections.unmodifiableList(inner);
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public List webhookReceivers() {
+ List inner = this.innerModel().webhookReceivers();
+ if (inner != null) {
+ return Collections.unmodifiableList(inner);
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public List itsmReceivers() {
+ List inner = this.innerModel().itsmReceivers();
+ if (inner != null) {
+ return Collections.unmodifiableList(inner);
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public List azureAppPushReceivers() {
+ List inner = this.innerModel().azureAppPushReceivers();
+ if (inner != null) {
+ return Collections.unmodifiableList(inner);
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public List automationRunbookReceivers() {
+ List inner = this.innerModel().automationRunbookReceivers();
+ if (inner != null) {
+ return Collections.unmodifiableList(inner);
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public List voiceReceivers() {
+ List inner = this.innerModel().voiceReceivers();
+ if (inner != null) {
+ return Collections.unmodifiableList(inner);
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public List logicAppReceivers() {
+ List inner = this.innerModel().logicAppReceivers();
+ if (inner != null) {
+ return Collections.unmodifiableList(inner);
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public List azureFunctionReceivers() {
+ List inner = this.innerModel().azureFunctionReceivers();
+ if (inner != null) {
+ return Collections.unmodifiableList(inner);
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public List armRoleReceivers() {
+ List inner = this.innerModel().armRoleReceivers();
+ if (inner != null) {
+ return Collections.unmodifiableList(inner);
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public List eventHubReceivers() {
+ List inner = this.innerModel().eventHubReceivers();
+ if (inner != null) {
+ return Collections.unmodifiableList(inner);
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public List incidentReceivers() {
+ List inner = this.innerModel().incidentReceivers();
+ if (inner != null) {
+ return Collections.unmodifiableList(inner);
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public Region region() {
+ return Region.fromName(this.regionName());
+ }
+
+ public String regionName() {
+ return this.location();
+ }
+
+ public String resourceGroupName() {
+ return resourceGroupName;
+ }
+
+ public ActionGroupResourceInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.monitor.generated.MonitorManager manager() {
+ return this.serviceManager;
+ }
+
+ private String resourceGroupName;
+
+ private String actionGroupName;
+
+ private ActionGroupPatchBody updateActionGroupPatch;
+
+ public ActionGroupResourceImpl withExistingResourceGroup(String resourceGroupName) {
+ this.resourceGroupName = resourceGroupName;
+ return this;
+ }
+
+ public ActionGroupResource create() {
+ this.innerObject = serviceManager.serviceClient()
+ .getActionGroups()
+ .createOrUpdateWithResponse(resourceGroupName, actionGroupName, this.innerModel(), Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public ActionGroupResource create(Context context) {
+ this.innerObject = serviceManager.serviceClient()
+ .getActionGroups()
+ .createOrUpdateWithResponse(resourceGroupName, actionGroupName, this.innerModel(), context)
+ .getValue();
+ return this;
+ }
+
+ ActionGroupResourceImpl(String name, com.azure.resourcemanager.monitor.generated.MonitorManager serviceManager) {
+ this.innerObject = new ActionGroupResourceInner();
+ this.serviceManager = serviceManager;
+ this.actionGroupName = name;
+ }
+
+ public ActionGroupResourceImpl update() {
+ this.updateActionGroupPatch = new ActionGroupPatchBody();
+ return this;
+ }
+
+ public ActionGroupResource apply() {
+ this.innerObject = serviceManager.serviceClient()
+ .getActionGroups()
+ .updateWithResponse(resourceGroupName, actionGroupName, updateActionGroupPatch, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public ActionGroupResource apply(Context context) {
+ this.innerObject = serviceManager.serviceClient()
+ .getActionGroups()
+ .updateWithResponse(resourceGroupName, actionGroupName, updateActionGroupPatch, context)
+ .getValue();
+ return this;
+ }
+
+ ActionGroupResourceImpl(ActionGroupResourceInner innerObject,
+ com.azure.resourcemanager.monitor.generated.MonitorManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups");
+ this.actionGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "actionGroups");
+ }
+
+ public ActionGroupResource refresh() {
+ this.innerObject = serviceManager.serviceClient()
+ .getActionGroups()
+ .getByResourceGroupWithResponse(resourceGroupName, actionGroupName, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public ActionGroupResource refresh(Context context) {
+ this.innerObject = serviceManager.serviceClient()
+ .getActionGroups()
+ .getByResourceGroupWithResponse(resourceGroupName, actionGroupName, context)
+ .getValue();
+ return this;
+ }
+
+ public TestNotificationDetailsResponse
+ createNotificationsAtActionGroupResourceLevel(NotificationRequestBody notificationRequest) {
+ return serviceManager.actionGroups()
+ .createNotificationsAtActionGroupResourceLevel(resourceGroupName, actionGroupName, notificationRequest);
+ }
+
+ public TestNotificationDetailsResponse
+ createNotificationsAtActionGroupResourceLevel(NotificationRequestBody notificationRequest, Context context) {
+ return serviceManager.actionGroups()
+ .createNotificationsAtActionGroupResourceLevel(resourceGroupName, actionGroupName, notificationRequest,
+ context);
+ }
+
+ public Response enableReceiverWithResponse(EnableRequest enableRequest, Context context) {
+ return serviceManager.actionGroups()
+ .enableReceiverWithResponse(resourceGroupName, actionGroupName, enableRequest, context);
+ }
+
+ public void enableReceiver(EnableRequest enableRequest) {
+ serviceManager.actionGroups().enableReceiver(resourceGroupName, actionGroupName, enableRequest);
+ }
+
+ public ActionGroupResourceImpl withRegion(Region location) {
+ this.innerModel().withLocation(location.toString());
+ return this;
+ }
+
+ public ActionGroupResourceImpl withRegion(String location) {
+ this.innerModel().withLocation(location);
+ return this;
+ }
+
+ public ActionGroupResourceImpl withTags(Map tags) {
+ if (isInCreateMode()) {
+ this.innerModel().withTags(tags);
+ return this;
+ } else {
+ this.updateActionGroupPatch.withTags(tags);
+ return this;
+ }
+ }
+
+ public ActionGroupResourceImpl withIdentity(ManagedServiceIdentity identity) {
+ if (isInCreateMode()) {
+ this.innerModel().withIdentity(identity);
+ return this;
+ } else {
+ this.updateActionGroupPatch.withIdentity(identity);
+ return this;
+ }
+ }
+
+ public ActionGroupResourceImpl withGroupShortName(String groupShortName) {
+ this.innerModel().withGroupShortName(groupShortName);
+ return this;
+ }
+
+ public ActionGroupResourceImpl withEnabled(boolean enabled) {
+ this.innerModel().withEnabled(enabled);
+ return this;
+ }
+
+ public ActionGroupResourceImpl withEmailReceivers(List emailReceivers) {
+ this.innerModel().withEmailReceivers(emailReceivers);
+ return this;
+ }
+
+ public ActionGroupResourceImpl withSmsReceivers(List smsReceivers) {
+ this.innerModel().withSmsReceivers(smsReceivers);
+ return this;
+ }
+
+ public ActionGroupResourceImpl withWebhookReceivers(List webhookReceivers) {
+ this.innerModel().withWebhookReceivers(webhookReceivers);
+ return this;
+ }
+
+ public ActionGroupResourceImpl withItsmReceivers(List itsmReceivers) {
+ this.innerModel().withItsmReceivers(itsmReceivers);
+ return this;
+ }
+
+ public ActionGroupResourceImpl withAzureAppPushReceivers(List azureAppPushReceivers) {
+ this.innerModel().withAzureAppPushReceivers(azureAppPushReceivers);
+ return this;
+ }
+
+ public ActionGroupResourceImpl
+ withAutomationRunbookReceivers(List automationRunbookReceivers) {
+ this.innerModel().withAutomationRunbookReceivers(automationRunbookReceivers);
+ return this;
+ }
+
+ public ActionGroupResourceImpl withVoiceReceivers(List voiceReceivers) {
+ this.innerModel().withVoiceReceivers(voiceReceivers);
+ return this;
+ }
+
+ public ActionGroupResourceImpl withLogicAppReceivers(List logicAppReceivers) {
+ this.innerModel().withLogicAppReceivers(logicAppReceivers);
+ return this;
+ }
+
+ public ActionGroupResourceImpl withAzureFunctionReceivers(List azureFunctionReceivers) {
+ this.innerModel().withAzureFunctionReceivers(azureFunctionReceivers);
+ return this;
+ }
+
+ public ActionGroupResourceImpl withArmRoleReceivers(List armRoleReceivers) {
+ this.innerModel().withArmRoleReceivers(armRoleReceivers);
+ return this;
+ }
+
+ public ActionGroupResourceImpl withEventHubReceivers(List eventHubReceivers) {
+ this.innerModel().withEventHubReceivers(eventHubReceivers);
+ return this;
+ }
+
+ public ActionGroupResourceImpl withIncidentReceivers(List incidentReceivers) {
+ this.innerModel().withIncidentReceivers(incidentReceivers);
+ return this;
+ }
+
+ public ActionGroupResourceImpl withEnabled(Boolean enabled) {
+ this.updateActionGroupPatch.withEnabled(enabled);
+ 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/ActionGroupsClientImpl.java b/sdk/monitor/azure-resourcemanager-monitor-generated/src/main/java/com/azure/resourcemanager/monitor/generated/implementation/ActionGroupsClientImpl.java
new file mode 100644
index 0000000000000..ad7fb09ebbbf9
--- /dev/null
+++ b/sdk/monitor/azure-resourcemanager-monitor-generated/src/main/java/com/azure/resourcemanager/monitor/generated/implementation/ActionGroupsClientImpl.java
@@ -0,0 +1,1471 @@
+// 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.Post;
+import com.azure.core.annotation.Put;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.core.util.polling.PollerFlux;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.monitor.generated.fluent.ActionGroupsClient;
+import com.azure.resourcemanager.monitor.generated.fluent.models.ActionGroupResourceInner;
+import com.azure.resourcemanager.monitor.generated.fluent.models.TestNotificationDetailsResponseInner;
+import com.azure.resourcemanager.monitor.generated.models.ActionGroupList;
+import com.azure.resourcemanager.monitor.generated.models.ActionGroupPatchBody;
+import com.azure.resourcemanager.monitor.generated.models.EnableRequest;
+import com.azure.resourcemanager.monitor.generated.models.NotificationRequestBody;
+import java.nio.ByteBuffer;
+import reactor.core.publisher.Flux;
+import reactor.core.publisher.Mono;
+
+/**
+ * An instance of this class provides access to all the operations defined in ActionGroupsClient.
+ */
+public final class ActionGroupsClientImpl implements ActionGroupsClient {
+ /**
+ * The proxy service used to perform REST calls.
+ */
+ private final ActionGroupsService service;
+
+ /**
+ * The service client containing this operation class.
+ */
+ private final MonitorClientImpl client;
+
+ /**
+ * Initializes an instance of ActionGroupsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ ActionGroupsClientImpl(MonitorClientImpl client) {
+ this.service
+ = RestProxy.create(ActionGroupsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for MonitorClientActionGroups to be used by the proxy service to perform
+ * REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "MonitorClientActionG")
+ public interface ActionGroupsService {
+ @Headers({ "Content-Type: application/json" })
+ @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/actionGroups/{actionGroupName}")
+ @ExpectedResponses({ 200, 201 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> createOrUpdate(@HostParam("$host") String endpoint,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("actionGroupName") String actionGroupName, @PathParam("subscriptionId") String subscriptionId,
+ @QueryParam("api-version") String apiVersion,
+ @BodyParam("application/json") ActionGroupResourceInner actionGroup, @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/actionGroups/{actionGroupName}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> getByResourceGroup(@HostParam("$host") String endpoint,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("actionGroupName") String actionGroupName, @PathParam("subscriptionId") String subscriptionId,
+ @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/actionGroups/{actionGroupName}")
+ @ExpectedResponses({ 200, 204 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> delete(@HostParam("$host") String endpoint,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("actionGroupName") String actionGroupName, @PathParam("subscriptionId") String subscriptionId,
+ @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/actionGroups/{actionGroupName}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> update(@HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("actionGroupName") String actionGroupName, @QueryParam("api-version") String apiVersion,
+ @BodyParam("application/json") ActionGroupPatchBody actionGroupPatch, @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/actionGroups/{actionGroupName}/createNotifications")
+ @ExpectedResponses({ 200, 202 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> createNotificationsAtActionGroupResourceLevel(
+ @HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("actionGroupName") String actionGroupName, @QueryParam("api-version") String apiVersion,
+ @BodyParam("application/json") NotificationRequestBody notificationRequest,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/actionGroups/{actionGroupName}/notificationStatus/{notificationId}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> getTestNotificationsAtActionGroupResourceLevel(
+ @HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("actionGroupName") String actionGroupName, @PathParam("notificationId") String notificationId,
+ @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Insights/actionGroups")
+ @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/actionGroups")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByResourceGroup(@HostParam("$host") String endpoint,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/actionGroups/{actionGroupName}/subscribe")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(value = ManagementException.class, code = { 409 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> enableReceiver(@HostParam("$host") String endpoint,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("actionGroupName") String actionGroupName, @PathParam("subscriptionId") String subscriptionId,
+ @QueryParam("api-version") String apiVersion, @BodyParam("application/json") EnableRequest enableRequest,
+ @HeaderParam("Accept") String accept, Context context);
+ }
+
+ /**
+ * Create a new action group or update an existing one.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param actionGroupName The name of the action group.
+ * @param actionGroup The action group 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 action group resource along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> createOrUpdateWithResponseAsync(String resourceGroupName,
+ String actionGroupName, ActionGroupResourceInner actionGroup) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (actionGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter actionGroupName 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 (actionGroup == null) {
+ return Mono.error(new IllegalArgumentException("Parameter actionGroup is required and cannot be null."));
+ } else {
+ actionGroup.validate();
+ }
+ final String apiVersion = "2024-10-01-preview";
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName,
+ actionGroupName, this.client.getSubscriptionId(), apiVersion, actionGroup, accept, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Create a new action group or update an existing one.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param actionGroupName The name of the action group.
+ * @param actionGroup The action group 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 action group resource along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> createOrUpdateWithResponseAsync(String resourceGroupName,
+ String actionGroupName, ActionGroupResourceInner actionGroup, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (actionGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter actionGroupName 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 (actionGroup == null) {
+ return Mono.error(new IllegalArgumentException("Parameter actionGroup is required and cannot be null."));
+ } else {
+ actionGroup.validate();
+ }
+ final String apiVersion = "2024-10-01-preview";
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, actionGroupName,
+ this.client.getSubscriptionId(), apiVersion, actionGroup, accept, context);
+ }
+
+ /**
+ * Create a new action group or update an existing one.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param actionGroupName The name of the action group.
+ * @param actionGroup The action group 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 action group resource on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createOrUpdateAsync(String resourceGroupName, String actionGroupName,
+ ActionGroupResourceInner actionGroup) {
+ return createOrUpdateWithResponseAsync(resourceGroupName, actionGroupName, actionGroup)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Create a new action group or update an existing one.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param actionGroupName The name of the action group.
+ * @param actionGroup The action group 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 action group resource along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response createOrUpdateWithResponse(String resourceGroupName,
+ String actionGroupName, ActionGroupResourceInner actionGroup, Context context) {
+ return createOrUpdateWithResponseAsync(resourceGroupName, actionGroupName, actionGroup, context).block();
+ }
+
+ /**
+ * Create a new action group or update an existing one.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param actionGroupName The name of the action group.
+ * @param actionGroup The action group 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 action group resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public ActionGroupResourceInner createOrUpdate(String resourceGroupName, String actionGroupName,
+ ActionGroupResourceInner actionGroup) {
+ return createOrUpdateWithResponse(resourceGroupName, actionGroupName, actionGroup, Context.NONE).getValue();
+ }
+
+ /**
+ * Get an action group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param actionGroupName The name of the action group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an action group along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName,
+ String actionGroupName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (actionGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter actionGroupName 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 apiVersion = "2024-10-01-preview";
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName,
+ actionGroupName, this.client.getSubscriptionId(), apiVersion, accept, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get an action group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param actionGroupName The name of the action group.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an action group along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName,
+ String actionGroupName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (actionGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter actionGroupName 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 apiVersion = "2024-10-01-preview";
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, actionGroupName,
+ this.client.getSubscriptionId(), apiVersion, accept, context);
+ }
+
+ /**
+ * Get an action group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param actionGroupName The name of the action group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an action group on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getByResourceGroupAsync(String resourceGroupName, String actionGroupName) {
+ return getByResourceGroupWithResponseAsync(resourceGroupName, actionGroupName)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Get an action group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param actionGroupName The name of the action group.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an action group along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getByResourceGroupWithResponse(String resourceGroupName,
+ String actionGroupName, Context context) {
+ return getByResourceGroupWithResponseAsync(resourceGroupName, actionGroupName, context).block();
+ }
+
+ /**
+ * Get an action group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param actionGroupName The name of the action group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an action group.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public ActionGroupResourceInner getByResourceGroup(String resourceGroupName, String actionGroupName) {
+ return getByResourceGroupWithResponse(resourceGroupName, actionGroupName, Context.NONE).getValue();
+ }
+
+ /**
+ * Delete an action group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param actionGroupName The name of the action group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> deleteWithResponseAsync(String resourceGroupName, String actionGroupName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (actionGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter actionGroupName 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 apiVersion = "2024-10-01-preview";
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, actionGroupName,
+ this.client.getSubscriptionId(), apiVersion, accept, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Delete an action group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param actionGroupName The name of the action group.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> deleteWithResponseAsync(String resourceGroupName, String actionGroupName,
+ Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (actionGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter actionGroupName 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 apiVersion = "2024-10-01-preview";
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.delete(this.client.getEndpoint(), resourceGroupName, actionGroupName,
+ this.client.getSubscriptionId(), apiVersion, accept, context);
+ }
+
+ /**
+ * Delete an action group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param actionGroupName The name of the action group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return A {@link Mono} that completes when a successful response is received.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono deleteAsync(String resourceGroupName, String actionGroupName) {
+ return deleteWithResponseAsync(resourceGroupName, actionGroupName).flatMap(ignored -> Mono.empty());
+ }
+
+ /**
+ * Delete an action group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param actionGroupName The name of the action group.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response deleteWithResponse(String resourceGroupName, String actionGroupName, Context context) {
+ return deleteWithResponseAsync(resourceGroupName, actionGroupName, context).block();
+ }
+
+ /**
+ * Delete an action group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param actionGroupName The name of the action group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void delete(String resourceGroupName, String actionGroupName) {
+ deleteWithResponse(resourceGroupName, actionGroupName, Context.NONE);
+ }
+
+ /**
+ * Updates an existing action group's tags. To update other fields use the CreateOrUpdate method.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param actionGroupName The name of the action group.
+ * @param actionGroupPatch 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 action group resource along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> updateWithResponseAsync(String resourceGroupName,
+ String actionGroupName, ActionGroupPatchBody actionGroupPatch) {
+ 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 (actionGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter actionGroupName is required and cannot be null."));
+ }
+ if (actionGroupPatch == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter actionGroupPatch is required and cannot be null."));
+ } else {
+ actionGroupPatch.validate();
+ }
+ final String apiVersion = "2024-10-01-preview";
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(),
+ resourceGroupName, actionGroupName, apiVersion, actionGroupPatch, accept, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Updates an existing action group's tags. To update other fields use the CreateOrUpdate method.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param actionGroupName The name of the action group.
+ * @param actionGroupPatch 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 action group resource along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> updateWithResponseAsync(String resourceGroupName,
+ String actionGroupName, ActionGroupPatchBody actionGroupPatch, 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 (actionGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter actionGroupName is required and cannot be null."));
+ }
+ if (actionGroupPatch == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter actionGroupPatch is required and cannot be null."));
+ } else {
+ actionGroupPatch.validate();
+ }
+ final String apiVersion = "2024-10-01-preview";
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName,
+ actionGroupName, apiVersion, actionGroupPatch, accept, context);
+ }
+
+ /**
+ * Updates an existing action group's tags. To update other fields use the CreateOrUpdate method.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param actionGroupName The name of the action group.
+ * @param actionGroupPatch 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 action group resource on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono updateAsync(String resourceGroupName, String actionGroupName,
+ ActionGroupPatchBody actionGroupPatch) {
+ return updateWithResponseAsync(resourceGroupName, actionGroupName, actionGroupPatch)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Updates an existing action group's tags. To update other fields use the CreateOrUpdate method.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param actionGroupName The name of the action group.
+ * @param actionGroupPatch 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 action group resource along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response updateWithResponse(String resourceGroupName, String actionGroupName,
+ ActionGroupPatchBody actionGroupPatch, Context context) {
+ return updateWithResponseAsync(resourceGroupName, actionGroupName, actionGroupPatch, context).block();
+ }
+
+ /**
+ * Updates an existing action group's tags. To update other fields use the CreateOrUpdate method.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param actionGroupName The name of the action group.
+ * @param actionGroupPatch 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 action group resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public ActionGroupResourceInner update(String resourceGroupName, String actionGroupName,
+ ActionGroupPatchBody actionGroupPatch) {
+ return updateWithResponse(resourceGroupName, actionGroupName, actionGroupPatch, Context.NONE).getValue();
+ }
+
+ /**
+ * Send test notifications to a set of provided receivers.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param actionGroupName The name of the action group.
+ * @param notificationRequest The notification request body which includes the contact details.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 details of the test notification results along with {@link Response} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createNotificationsAtActionGroupResourceLevelWithResponseAsync(
+ String resourceGroupName, String actionGroupName, NotificationRequestBody notificationRequest) {
+ 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 (actionGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter actionGroupName is required and cannot be null."));
+ }
+ if (notificationRequest == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter notificationRequest is required and cannot be null."));
+ } else {
+ notificationRequest.validate();
+ }
+ final String apiVersion = "2024-10-01-preview";
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.createNotificationsAtActionGroupResourceLevel(this.client.getEndpoint(),
+ this.client.getSubscriptionId(), resourceGroupName, actionGroupName, apiVersion, notificationRequest,
+ accept, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Send test notifications to a set of provided receivers.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param actionGroupName The name of the action group.
+ * @param notificationRequest The notification request body which includes the contact details.
+ * @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 details of the test notification results along with {@link Response} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createNotificationsAtActionGroupResourceLevelWithResponseAsync(
+ String resourceGroupName, String actionGroupName, NotificationRequestBody notificationRequest,
+ 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 (actionGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter actionGroupName is required and cannot be null."));
+ }
+ if (notificationRequest == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter notificationRequest is required and cannot be null."));
+ } else {
+ notificationRequest.validate();
+ }
+ final String apiVersion = "2024-10-01-preview";
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.createNotificationsAtActionGroupResourceLevel(this.client.getEndpoint(),
+ this.client.getSubscriptionId(), resourceGroupName, actionGroupName, apiVersion, notificationRequest,
+ accept, context);
+ }
+
+ /**
+ * Send test notifications to a set of provided receivers.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param actionGroupName The name of the action group.
+ * @param notificationRequest The notification request body which includes the contact details.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of the details of the test notification results.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, TestNotificationDetailsResponseInner>
+ beginCreateNotificationsAtActionGroupResourceLevelAsync(String resourceGroupName, String actionGroupName,
+ NotificationRequestBody notificationRequest) {
+ Mono>> mono = createNotificationsAtActionGroupResourceLevelWithResponseAsync(
+ resourceGroupName, actionGroupName, notificationRequest);
+ return this.client.getLroResult(
+ mono, this.client.getHttpPipeline(), TestNotificationDetailsResponseInner.class,
+ TestNotificationDetailsResponseInner.class, this.client.getContext());
+ }
+
+ /**
+ * Send test notifications to a set of provided receivers.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param actionGroupName The name of the action group.
+ * @param notificationRequest The notification request body which includes the contact details.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of the details of the test notification results.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, TestNotificationDetailsResponseInner>
+ beginCreateNotificationsAtActionGroupResourceLevelAsync(String resourceGroupName, String actionGroupName,
+ NotificationRequestBody notificationRequest, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono = createNotificationsAtActionGroupResourceLevelWithResponseAsync(
+ resourceGroupName, actionGroupName, notificationRequest, context);
+ return this.client.getLroResult(
+ mono, this.client.getHttpPipeline(), TestNotificationDetailsResponseInner.class,
+ TestNotificationDetailsResponseInner.class, context);
+ }
+
+ /**
+ * Send test notifications to a set of provided receivers.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param actionGroupName The name of the action group.
+ * @param notificationRequest The notification request body which includes the contact details.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of the details of the test notification results.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, TestNotificationDetailsResponseInner>
+ beginCreateNotificationsAtActionGroupResourceLevel(String resourceGroupName, String actionGroupName,
+ NotificationRequestBody notificationRequest) {
+ return this
+ .beginCreateNotificationsAtActionGroupResourceLevelAsync(resourceGroupName, actionGroupName,
+ notificationRequest)
+ .getSyncPoller();
+ }
+
+ /**
+ * Send test notifications to a set of provided receivers.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param actionGroupName The name of the action group.
+ * @param notificationRequest The notification request body which includes the contact details.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of the details of the test notification results.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, TestNotificationDetailsResponseInner>
+ beginCreateNotificationsAtActionGroupResourceLevel(String resourceGroupName, String actionGroupName,
+ NotificationRequestBody notificationRequest, Context context) {
+ return this
+ .beginCreateNotificationsAtActionGroupResourceLevelAsync(resourceGroupName, actionGroupName,
+ notificationRequest, context)
+ .getSyncPoller();
+ }
+
+ /**
+ * Send test notifications to a set of provided receivers.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param actionGroupName The name of the action group.
+ * @param notificationRequest The notification request body which includes the contact details.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 details of the test notification results on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createNotificationsAtActionGroupResourceLevelAsync(
+ String resourceGroupName, String actionGroupName, NotificationRequestBody notificationRequest) {
+ return beginCreateNotificationsAtActionGroupResourceLevelAsync(resourceGroupName, actionGroupName,
+ notificationRequest).last().flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Send test notifications to a set of provided receivers.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param actionGroupName The name of the action group.
+ * @param notificationRequest The notification request body which includes the contact details.
+ * @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 details of the test notification results on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createNotificationsAtActionGroupResourceLevelAsync(
+ String resourceGroupName, String actionGroupName, NotificationRequestBody notificationRequest,
+ Context context) {
+ return beginCreateNotificationsAtActionGroupResourceLevelAsync(resourceGroupName, actionGroupName,
+ notificationRequest, context).last().flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Send test notifications to a set of provided receivers.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param actionGroupName The name of the action group.
+ * @param notificationRequest The notification request body which includes the contact details.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 details of the test notification results.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public TestNotificationDetailsResponseInner createNotificationsAtActionGroupResourceLevel(String resourceGroupName,
+ String actionGroupName, NotificationRequestBody notificationRequest) {
+ return createNotificationsAtActionGroupResourceLevelAsync(resourceGroupName, actionGroupName,
+ notificationRequest).block();
+ }
+
+ /**
+ * Send test notifications to a set of provided receivers.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param actionGroupName The name of the action group.
+ * @param notificationRequest The notification request body which includes the contact details.
+ * @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 details of the test notification results.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public TestNotificationDetailsResponseInner createNotificationsAtActionGroupResourceLevel(String resourceGroupName,
+ String actionGroupName, NotificationRequestBody notificationRequest, Context context) {
+ return createNotificationsAtActionGroupResourceLevelAsync(resourceGroupName, actionGroupName,
+ notificationRequest, context).block();
+ }
+
+ /**
+ * Get the test notifications by the notification id.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param actionGroupName The name of the action group.
+ * @param notificationId The notification id.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 test notifications by the notification id along with {@link Response} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>
+ getTestNotificationsAtActionGroupResourceLevelWithResponseAsync(String resourceGroupName,
+ String actionGroupName, String notificationId) {
+ 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 (actionGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter actionGroupName is required and cannot be null."));
+ }
+ if (notificationId == null) {
+ return Mono.error(new IllegalArgumentException("Parameter notificationId is required and cannot be null."));
+ }
+ final String apiVersion = "2024-10-01-preview";
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.getTestNotificationsAtActionGroupResourceLevel(this.client.getEndpoint(),
+ this.client.getSubscriptionId(), resourceGroupName, actionGroupName, notificationId, apiVersion, accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the test notifications by the notification id.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param actionGroupName The name of the action group.
+ * @param notificationId The notification id.
+ * @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 test notifications by the notification id along with {@link Response} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>
+ getTestNotificationsAtActionGroupResourceLevelWithResponseAsync(String resourceGroupName,
+ String actionGroupName, String notificationId, 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 (actionGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter actionGroupName is required and cannot be null."));
+ }
+ if (notificationId == null) {
+ return Mono.error(new IllegalArgumentException("Parameter notificationId is required and cannot be null."));
+ }
+ final String apiVersion = "2024-10-01-preview";
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.getTestNotificationsAtActionGroupResourceLevel(this.client.getEndpoint(),
+ this.client.getSubscriptionId(), resourceGroupName, actionGroupName, notificationId, apiVersion, accept,
+ context);
+ }
+
+ /**
+ * Get the test notifications by the notification id.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param actionGroupName The name of the action group.
+ * @param notificationId The notification id.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 test notifications by the notification id on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getTestNotificationsAtActionGroupResourceLevelAsync(
+ String resourceGroupName, String actionGroupName, String notificationId) {
+ return getTestNotificationsAtActionGroupResourceLevelWithResponseAsync(resourceGroupName, actionGroupName,
+ notificationId).flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Get the test notifications by the notification id.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param actionGroupName The name of the action group.
+ * @param notificationId The notification id.
+ * @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 test notifications by the notification id along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getTestNotificationsAtActionGroupResourceLevelWithResponse(
+ String resourceGroupName, String actionGroupName, String notificationId, Context context) {
+ return getTestNotificationsAtActionGroupResourceLevelWithResponseAsync(resourceGroupName, actionGroupName,
+ notificationId, context).block();
+ }
+
+ /**
+ * Get the test notifications by the notification id.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param actionGroupName The name of the action group.
+ * @param notificationId The notification id.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 test notifications by the notification id.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public TestNotificationDetailsResponseInner getTestNotificationsAtActionGroupResourceLevel(String resourceGroupName,
+ String actionGroupName, String notificationId) {
+ return getTestNotificationsAtActionGroupResourceLevelWithResponse(resourceGroupName, actionGroupName,
+ notificationId, Context.NONE).getValue();
+ }
+
+ /**
+ * Get a list of all action groups 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 action groups in a subscription along with {@link PagedResponse} on successful completion
+ * of {@link Mono}.
+ */
+ @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 apiVersion = "2024-10-01-preview";
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), apiVersion,
+ accept, context))
+ .>map(res -> new PagedResponseBase<>(res.getRequest(),
+ res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get a list of all action groups 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 action groups in a subscription along with {@link PagedResponse} on successful completion
+ * of {@link Mono}.
+ */
+ @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 apiVersion = "2024-10-01-preview";
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), apiVersion, accept, context)
+ .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
+ res.getValue().value(), null, null));
+ }
+
+ /**
+ * Get a list of all action groups 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 action groups in a subscription as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync() {
+ return new PagedFlux<>(() -> listSinglePageAsync());
+ }
+
+ /**
+ * Get a list of all action groups 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 action groups in a subscription as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(Context context) {
+ return new PagedFlux<>(() -> listSinglePageAsync(context));
+ }
+
+ /**
+ * Get a list of all action groups 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 action groups in a subscription as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list() {
+ return new PagedIterable<>(listAsync());
+ }
+
+ /**
+ * Get a list of all action groups 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 action groups in a subscription as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(Context context) {
+ return new PagedIterable<>(listAsync(context));
+ }
+
+ /**
+ * Get a list of all action groups 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 action groups in a resource group along with {@link PagedResponse} on successful completion
+ * of {@link Mono}.
+ */
+ @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 (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName 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 apiVersion = "2024-10-01-preview";
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), resourceGroupName,
+ this.client.getSubscriptionId(), apiVersion, accept, context))
+ .>map(res -> new PagedResponseBase<>(res.getRequest(),
+ res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get a list of all action groups 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 action groups in a resource group along with {@link PagedResponse} on successful completion
+ * of {@link Mono}.
+ */
+ @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 (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName 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 apiVersion = "2024-10-01-preview";
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listByResourceGroup(this.client.getEndpoint(), resourceGroupName, this.client.getSubscriptionId(),
+ apiVersion, accept, context)
+ .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
+ res.getValue().value(), null, null));
+ }
+
+ /**
+ * Get a list of all action groups 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 action groups in a resource group as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByResourceGroupAsync(String resourceGroupName) {
+ return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName));
+ }
+
+ /**
+ * Get a list of all action groups 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 action groups in a resource group as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) {
+ return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context));
+ }
+
+ /**
+ * Get a list of all action groups 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 action groups in a resource group as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByResourceGroup(String resourceGroupName) {
+ return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName));
+ }
+
+ /**
+ * Get a list of all action groups 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 action groups in a resource group as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByResourceGroup(String resourceGroupName, Context context) {
+ return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context));
+ }
+
+ /**
+ * Enable a receiver in an action group. This changes the receiver's status from Disabled to Enabled. This operation
+ * is only supported for Email or SMS receivers.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param actionGroupName The name of the action group.
+ * @param enableRequest The receiver to re-enable.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws ManagementException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> enableReceiverWithResponseAsync(String resourceGroupName, String actionGroupName,
+ EnableRequest enableRequest) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (actionGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter actionGroupName 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 (enableRequest == null) {
+ return Mono.error(new IllegalArgumentException("Parameter enableRequest is required and cannot be null."));
+ } else {
+ enableRequest.validate();
+ }
+ final String apiVersion = "2024-10-01-preview";
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.enableReceiver(this.client.getEndpoint(), resourceGroupName,
+ actionGroupName, this.client.getSubscriptionId(), apiVersion, enableRequest, accept, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Enable a receiver in an action group. This changes the receiver's status from Disabled to Enabled. This operation
+ * is only supported for Email or SMS receivers.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param actionGroupName The name of the action group.
+ * @param enableRequest The receiver to re-enable.
+ * @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 ManagementException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> enableReceiverWithResponseAsync(String resourceGroupName, String actionGroupName,
+ EnableRequest enableRequest, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (actionGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter actionGroupName 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 (enableRequest == null) {
+ return Mono.error(new IllegalArgumentException("Parameter enableRequest is required and cannot be null."));
+ } else {
+ enableRequest.validate();
+ }
+ final String apiVersion = "2024-10-01-preview";
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.enableReceiver(this.client.getEndpoint(), resourceGroupName, actionGroupName,
+ this.client.getSubscriptionId(), apiVersion, enableRequest, accept, context);
+ }
+
+ /**
+ * Enable a receiver in an action group. This changes the receiver's status from Disabled to Enabled. This operation
+ * is only supported for Email or SMS receivers.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param actionGroupName The name of the action group.
+ * @param enableRequest The receiver to re-enable.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws ManagementException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return A {@link Mono} that completes when a successful response is received.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono enableReceiverAsync(String resourceGroupName, String actionGroupName,
+ EnableRequest enableRequest) {
+ return enableReceiverWithResponseAsync(resourceGroupName, actionGroupName, enableRequest)
+ .flatMap(ignored -> Mono.empty());
+ }
+
+ /**
+ * Enable a receiver in an action group. This changes the receiver's status from Disabled to Enabled. This operation
+ * is only supported for Email or SMS receivers.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param actionGroupName The name of the action group.
+ * @param enableRequest The receiver to re-enable.
+ * @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 ManagementException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response enableReceiverWithResponse(String resourceGroupName, String actionGroupName,
+ EnableRequest enableRequest, Context context) {
+ return enableReceiverWithResponseAsync(resourceGroupName, actionGroupName, enableRequest, context).block();
+ }
+
+ /**
+ * Enable a receiver in an action group. This changes the receiver's status from Disabled to Enabled. This operation
+ * is only supported for Email or SMS receivers.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param actionGroupName The name of the action group.
+ * @param enableRequest The receiver to re-enable.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws ManagementException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void enableReceiver(String resourceGroupName, String actionGroupName, EnableRequest enableRequest) {
+ enableReceiverWithResponse(resourceGroupName, actionGroupName, enableRequest, Context.NONE);
+ }
+}
diff --git a/sdk/monitor/azure-resourcemanager-monitor-generated/src/main/java/com/azure/resourcemanager/monitor/generated/implementation/ActionGroupsImpl.java b/sdk/monitor/azure-resourcemanager-monitor-generated/src/main/java/com/azure/resourcemanager/monitor/generated/implementation/ActionGroupsImpl.java
new file mode 100644
index 0000000000000..b6290456c24f5
--- /dev/null
+++ b/sdk/monitor/azure-resourcemanager-monitor-generated/src/main/java/com/azure/resourcemanager/monitor/generated/implementation/ActionGroupsImpl.java
@@ -0,0 +1,209 @@
+// 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.fluent.ActionGroupsClient;
+import com.azure.resourcemanager.monitor.generated.fluent.models.ActionGroupResourceInner;
+import com.azure.resourcemanager.monitor.generated.fluent.models.TestNotificationDetailsResponseInner;
+import com.azure.resourcemanager.monitor.generated.models.ActionGroupResource;
+import com.azure.resourcemanager.monitor.generated.models.ActionGroups;
+import com.azure.resourcemanager.monitor.generated.models.EnableRequest;
+import com.azure.resourcemanager.monitor.generated.models.NotificationRequestBody;
+import com.azure.resourcemanager.monitor.generated.models.TestNotificationDetailsResponse;
+
+public final class ActionGroupsImpl implements ActionGroups {
+ private static final ClientLogger LOGGER = new ClientLogger(ActionGroupsImpl.class);
+
+ private final ActionGroupsClient innerClient;
+
+ private final com.azure.resourcemanager.monitor.generated.MonitorManager serviceManager;
+
+ public ActionGroupsImpl(ActionGroupsClient innerClient,
+ com.azure.resourcemanager.monitor.generated.MonitorManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public Response getByResourceGroupWithResponse(String resourceGroupName,
+ String actionGroupName, Context context) {
+ Response inner
+ = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, actionGroupName, context);
+ if (inner != null) {
+ return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
+ new ActionGroupResourceImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public ActionGroupResource getByResourceGroup(String resourceGroupName, String actionGroupName) {
+ ActionGroupResourceInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, actionGroupName);
+ if (inner != null) {
+ return new ActionGroupResourceImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response deleteByResourceGroupWithResponse(String resourceGroupName, String actionGroupName,
+ Context context) {
+ return this.serviceClient().deleteWithResponse(resourceGroupName, actionGroupName, context);
+ }
+
+ public void deleteByResourceGroup(String resourceGroupName, String actionGroupName) {
+ this.serviceClient().delete(resourceGroupName, actionGroupName);
+ }
+
+ public TestNotificationDetailsResponse createNotificationsAtActionGroupResourceLevel(String resourceGroupName,
+ String actionGroupName, NotificationRequestBody notificationRequest) {
+ TestNotificationDetailsResponseInner inner = this.serviceClient()
+ .createNotificationsAtActionGroupResourceLevel(resourceGroupName, actionGroupName, notificationRequest);
+ if (inner != null) {
+ return new TestNotificationDetailsResponseImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public TestNotificationDetailsResponse createNotificationsAtActionGroupResourceLevel(String resourceGroupName,
+ String actionGroupName, NotificationRequestBody notificationRequest, Context context) {
+ TestNotificationDetailsResponseInner inner = this.serviceClient()
+ .createNotificationsAtActionGroupResourceLevel(resourceGroupName, actionGroupName, notificationRequest,
+ context);
+ if (inner != null) {
+ return new TestNotificationDetailsResponseImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response getTestNotificationsAtActionGroupResourceLevelWithResponse(
+ String resourceGroupName, String actionGroupName, String notificationId, Context context) {
+ Response inner = this.serviceClient()
+ .getTestNotificationsAtActionGroupResourceLevelWithResponse(resourceGroupName, actionGroupName,
+ notificationId, context);
+ if (inner != null) {
+ return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
+ new TestNotificationDetailsResponseImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public TestNotificationDetailsResponse getTestNotificationsAtActionGroupResourceLevel(String resourceGroupName,
+ String actionGroupName, String notificationId) {
+ TestNotificationDetailsResponseInner inner = this.serviceClient()
+ .getTestNotificationsAtActionGroupResourceLevel(resourceGroupName, actionGroupName, notificationId);
+ if (inner != null) {
+ return new TestNotificationDetailsResponseImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public PagedIterable list() {
+ PagedIterable inner = this.serviceClient().list();
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new ActionGroupResourceImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list(Context context) {
+ PagedIterable inner = this.serviceClient().list(context);
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new ActionGroupResourceImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable listByResourceGroup(String resourceGroupName) {
+ PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName);
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new ActionGroupResourceImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable listByResourceGroup(String resourceGroupName, Context context) {
+ PagedIterable inner
+ = this.serviceClient().listByResourceGroup(resourceGroupName, context);
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new ActionGroupResourceImpl(inner1, this.manager()));
+ }
+
+ public Response enableReceiverWithResponse(String resourceGroupName, String actionGroupName,
+ EnableRequest enableRequest, Context context) {
+ return this.serviceClient()
+ .enableReceiverWithResponse(resourceGroupName, actionGroupName, enableRequest, context);
+ }
+
+ public void enableReceiver(String resourceGroupName, String actionGroupName, EnableRequest enableRequest) {
+ this.serviceClient().enableReceiver(resourceGroupName, actionGroupName, enableRequest);
+ }
+
+ public ActionGroupResource getById(String id) {
+ String resourceGroupName = ResourceManagerUtils.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 actionGroupName = ResourceManagerUtils.getValueFromIdByName(id, "actionGroups");
+ if (actionGroupName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'actionGroups'.", id)));
+ }
+ return this.getByResourceGroupWithResponse(resourceGroupName, actionGroupName, Context.NONE).getValue();
+ }
+
+ public Response getByIdWithResponse(String id, Context context) {
+ String resourceGroupName = ResourceManagerUtils.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 actionGroupName = ResourceManagerUtils.getValueFromIdByName(id, "actionGroups");
+ if (actionGroupName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'actionGroups'.", id)));
+ }
+ return this.getByResourceGroupWithResponse(resourceGroupName, actionGroupName, context);
+ }
+
+ public void deleteById(String id) {
+ String resourceGroupName = ResourceManagerUtils.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 actionGroupName = ResourceManagerUtils.getValueFromIdByName(id, "actionGroups");
+ if (actionGroupName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'actionGroups'.", id)));
+ }
+ this.deleteByResourceGroupWithResponse(resourceGroupName, actionGroupName, Context.NONE);
+ }
+
+ public Response deleteByIdWithResponse(String id, Context context) {
+ String resourceGroupName = ResourceManagerUtils.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 actionGroupName = ResourceManagerUtils.getValueFromIdByName(id, "actionGroups");
+ if (actionGroupName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'actionGroups'.", id)));
+ }
+ return this.deleteByResourceGroupWithResponse(resourceGroupName, actionGroupName, context);
+ }
+
+ private ActionGroupsClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.monitor.generated.MonitorManager manager() {
+ return this.serviceManager;
+ }
+
+ public ActionGroupResourceImpl define(String name) {
+ return new ActionGroupResourceImpl(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 0000000000000..23d060e45e2ef
--- /dev/null
+++ b/sdk/monitor/azure-resourcemanager-monitor-generated/src/main/java/com/azure/resourcemanager/monitor/generated/implementation/MonitorClientBuilder.java
@@ -0,0 +1,138 @@
+// 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.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 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 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 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() {
+ String localEndpoint = (endpoint != null) ? endpoint : "https://management.azure.com";
+ AzureEnvironment localEnvironment = (environment != null) ? environment : AzureEnvironment.AZURE;
+ HttpPipeline localPipeline = (pipeline != null)
+ ? pipeline
+ : new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build();
+ Duration localDefaultPollInterval
+ = (defaultPollInterval != null) ? defaultPollInterval : Duration.ofSeconds(30);
+ SerializerAdapter localSerializerAdapter = (serializerAdapter != null)
+ ? serializerAdapter
+ : SerializerFactory.createDefaultManagementSerializerAdapter();
+ MonitorClientImpl client = new MonitorClientImpl(localPipeline, localSerializerAdapter,
+ localDefaultPollInterval, localEnvironment, this.subscriptionId, localEndpoint);
+ return client;
+ }
+}
diff --git a/sdk/monitor/azure-resourcemanager-monitor-generated/src/main/java/com/azure/resourcemanager/monitor/generated/implementation/MonitorClientImpl.java b/sdk/monitor/azure-resourcemanager-monitor-generated/src/main/java/com/azure/resourcemanager/monitor/generated/implementation/MonitorClientImpl.java
new file mode 100644
index 0000000000000..faa5fc61a3427
--- /dev/null
+++ b/sdk/monitor/azure-resourcemanager-monitor-generated/src/main/java/com/azure/resourcemanager/monitor/generated/implementation/MonitorClientImpl.java
@@ -0,0 +1,289 @@
+// 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.HttpHeaderName;
+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.CoreUtils;
+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.ActionGroupsClient;
+import com.azure.resourcemanager.monitor.generated.fluent.MonitorClient;
+import com.azure.resourcemanager.monitor.generated.fluent.ScheduledQueryRulesClient;
+import java.io.IOException;
+import java.lang.reflect.Type;
+import java.nio.ByteBuffer;
+import java.nio.charset.Charset;
+import java.nio.charset.StandardCharsets;
+import java.time.Duration;
+import 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 {
+ /**
+ * 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;
+ }
+
+ /**
+ * 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 ActionGroupsClient object to access its operations.
+ */
+ private final ActionGroupsClient actionGroups;
+
+ /**
+ * Gets the ActionGroupsClient object to access its operations.
+ *
+ * @return the ActionGroupsClient object.
+ */
+ public ActionGroupsClient getActionGroups() {
+ return this.actionGroups;
+ }
+
+ /**
+ * The ScheduledQueryRulesClient object to access its operations.
+ */
+ private final ScheduledQueryRulesClient scheduledQueryRules;
+
+ /**
+ * Gets the ScheduledQueryRulesClient object to access its operations.
+ *
+ * @return the ScheduledQueryRulesClient object.
+ */
+ public ScheduledQueryRulesClient getScheduledQueryRules() {
+ return this.scheduledQueryRules;
+ }
+
+ /**
+ * Initializes an instance of MonitorClient client.
+ *
+ * @param httpPipeline The HTTP pipeline to send requests through.
+ * @param serializerAdapter The serializer to serialize an object into a string.
+ * @param defaultPollInterval The default poll interval for long-running operation.
+ * @param environment The Azure environment.
+ * @param subscriptionId The ID of the target subscription.
+ * @param endpoint server parameter.
+ */
+ MonitorClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, Duration defaultPollInterval,
+ AzureEnvironment environment, String subscriptionId, String endpoint) {
+ this.httpPipeline = httpPipeline;
+ this.serializerAdapter = serializerAdapter;
+ this.defaultPollInterval = defaultPollInterval;
+ this.subscriptionId = subscriptionId;
+ this.endpoint = endpoint;
+ this.actionGroups = new ActionGroupsClientImpl(this);
+ this.scheduledQueryRules = new ScheduledQueryRulesClientImpl(this);
+ }
+
+ /**
+ * Gets default client context.
+ *
+ * @return the default client context.
+ */
+ public Context getContext() {
+ return Context.NONE;
+ }
+
+ /**
+ * Merges default client context with provided context.
+ *
+ * @param context the context to be merged with default client context.
+ * @return the merged context.
+ */
+ public Context mergeContext(Context context) {
+ return CoreUtils.mergeContexts(this.getContext(), context);
+ }
+
+ /**
+ * Gets long running operation result.
+ *
+ * @param activationResponse the response of activation operation.
+ * @param httpPipeline the http pipeline.
+ * @param pollResultType type of poll result.
+ * @param finalResultType type of final result.
+ * @param context the context shared by all requests.
+ * @param type of poll result.
+ * @param type of final result.
+ * @return poller flux for poll result and final result.
+ */
+ public PollerFlux, U> getLroResult(Mono>> activationResponse,
+ HttpPipeline httpPipeline, Type pollResultType, Type finalResultType, Context context) {
+ return PollerFactory.create(serializerAdapter, httpPipeline, pollResultType, finalResultType,
+ defaultPollInterval, activationResponse, context);
+ }
+
+ /**
+ * Gets the final result, or an error, based on last async poll response.
+ *
+ * @param response the last async poll response.
+ * @param type of poll result.
+ * @param type of final result.
+ * @return the final result, or an error.
+ */
+ public