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 Accounts service API entry point.
+ *
+ * @param credential the credential to use.
+ * @param profile the Azure profile for client.
+ * @return the Monitor Accounts service API instance.
+ */
+ public MonitorAccountsManager authenticate(TokenCredential credential, AzureProfile profile) {
+ Objects.requireNonNull(credential, "'credential' cannot be null.");
+ Objects.requireNonNull(profile, "'profile' cannot be null.");
+
+ String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion");
+
+ StringBuilder userAgentBuilder = new StringBuilder();
+ userAgentBuilder.append("azsdk-java")
+ .append("-")
+ .append("com.azure.resourcemanager.monitoraccounts")
+ .append("/")
+ .append(clientVersion);
+ 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 MonitorAccountsManager(httpPipeline, profile, defaultPollInterval);
+ }
+ }
+
+ /**
+ * Gets the resource collection API of Operations.
+ *
+ * @return Resource collection API of Operations.
+ */
+ public Operations operations() {
+ if (this.operations == null) {
+ this.operations = new OperationsImpl(clientObject.getOperations(), this);
+ }
+ return operations;
+ }
+
+ /**
+ * Gets the resource collection API of AzureMonitorWorkspaces. It manages AzureMonitorWorkspaceResource.
+ *
+ * @return Resource collection API of AzureMonitorWorkspaces.
+ */
+ public AzureMonitorWorkspaces azureMonitorWorkspaces() {
+ if (this.azureMonitorWorkspaces == null) {
+ this.azureMonitorWorkspaces
+ = new AzureMonitorWorkspacesImpl(clientObject.getAzureMonitorWorkspaces(), this);
+ }
+ return azureMonitorWorkspaces;
+ }
+
+ /**
+ * Gets the resource collection API of Issues. It manages IssueResource.
+ *
+ * @return Resource collection API of Issues.
+ */
+ public Issues issues() {
+ if (this.issues == null) {
+ this.issues = new IssuesImpl(clientObject.getIssues(), this);
+ }
+ return issues;
+ }
+
+ /**
+ * Gets the resource collection API of MetricsContainers. It manages MetricsContainerResource.
+ *
+ * @return Resource collection API of MetricsContainers.
+ */
+ public MetricsContainers metricsContainers() {
+ if (this.metricsContainers == null) {
+ this.metricsContainers = new MetricsContainersImpl(clientObject.getMetricsContainers(), this);
+ }
+ return metricsContainers;
+ }
+
+ /**
+ * Gets wrapped service client MonitorAccountsManagementClient providing direct access to the underlying
+ * auto-generated API implementation, based on Azure REST API.
+ *
+ * @return Wrapped service client MonitorAccountsManagementClient.
+ */
+ public MonitorAccountsManagementClient serviceClient() {
+ return this.clientObject;
+ }
+}
diff --git a/sdk/monitor/azure-resourcemanager-monitoraccounts/src/main/java/com/azure/resourcemanager/monitoraccounts/fluent/AzureMonitorWorkspacesClient.java b/sdk/monitor/azure-resourcemanager-monitoraccounts/src/main/java/com/azure/resourcemanager/monitoraccounts/fluent/AzureMonitorWorkspacesClient.java
new file mode 100644
index 000000000000..67d100b3e6cf
--- /dev/null
+++ b/sdk/monitor/azure-resourcemanager-monitoraccounts/src/main/java/com/azure/resourcemanager/monitoraccounts/fluent/AzureMonitorWorkspacesClient.java
@@ -0,0 +1,213 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.monitoraccounts.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.monitoraccounts.fluent.models.AzureMonitorWorkspaceResourceInner;
+
+/**
+ * An instance of this class provides access to all the operations defined in AzureMonitorWorkspacesClient.
+ */
+public interface AzureMonitorWorkspacesClient {
+ /**
+ * Returns the specified Azure Monitor Workspace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureMonitorWorkspaceName The name of the Azure Monitor Workspace. 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 an Azure Monitor Workspace definition along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getByResourceGroupWithResponse(String resourceGroupName,
+ String azureMonitorWorkspaceName, Context context);
+
+ /**
+ * Returns the specified Azure Monitor Workspace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureMonitorWorkspaceName The name of the Azure Monitor Workspace. 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 an Azure Monitor Workspace definition.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ AzureMonitorWorkspaceResourceInner getByResourceGroup(String resourceGroupName, String azureMonitorWorkspaceName);
+
+ /**
+ * Creates or updates an Azure Monitor Workspace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureMonitorWorkspaceName The name of the Azure Monitor Workspace. The name is case insensitive.
+ * @param resource Properties that need to be specified to create a new Azure Monitor Workspace.
+ * @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 Azure Monitor Workspace definition along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response createOrUpdateWithResponse(String resourceGroupName,
+ String azureMonitorWorkspaceName, AzureMonitorWorkspaceResourceInner resource, Context context);
+
+ /**
+ * Creates or updates an Azure Monitor Workspace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureMonitorWorkspaceName The name of the Azure Monitor Workspace. The name is case insensitive.
+ * @param resource Properties that need to be specified to create a new Azure Monitor Workspace.
+ * @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 Azure Monitor Workspace definition.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ AzureMonitorWorkspaceResourceInner createOrUpdate(String resourceGroupName, String azureMonitorWorkspaceName,
+ AzureMonitorWorkspaceResourceInner resource);
+
+ /**
+ * Updates part of an Azure Monitor Workspace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureMonitorWorkspaceName The name of the Azure Monitor Workspace. The name is case insensitive.
+ * @param properties The resource properties to be updated.
+ * @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 Azure Monitor Workspace definition along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response updateWithResponse(String resourceGroupName,
+ String azureMonitorWorkspaceName, AzureMonitorWorkspaceResourceInner properties, Context context);
+
+ /**
+ * Updates part of an Azure Monitor Workspace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureMonitorWorkspaceName The name of the Azure Monitor Workspace. The name is case insensitive.
+ * @param properties The resource properties to be updated.
+ * @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 Azure Monitor Workspace definition.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ AzureMonitorWorkspaceResourceInner update(String resourceGroupName, String azureMonitorWorkspaceName,
+ AzureMonitorWorkspaceResourceInner properties);
+
+ /**
+ * Deletes an Azure Monitor Workspace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureMonitorWorkspaceName The name of the Azure Monitor Workspace. 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 the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(String resourceGroupName, String azureMonitorWorkspaceName);
+
+ /**
+ * Deletes an Azure Monitor Workspace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureMonitorWorkspaceName The name of the Azure Monitor Workspace. 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 the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(String resourceGroupName, String azureMonitorWorkspaceName,
+ Context context);
+
+ /**
+ * Deletes an Azure Monitor Workspace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureMonitorWorkspaceName The name of the Azure Monitor Workspace. 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String azureMonitorWorkspaceName);
+
+ /**
+ * Deletes an Azure Monitor Workspace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureMonitorWorkspaceName The name of the Azure Monitor Workspace. 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String azureMonitorWorkspaceName, Context context);
+
+ /**
+ * Lists all Azure Monitor Workspaces in the specified 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 the response of a AzureMonitorWorkspaceResource list operation as paginated response with
+ * {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName);
+
+ /**
+ * Lists all Azure Monitor Workspaces in the specified 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 the response of a AzureMonitorWorkspaceResource list operation as paginated response with
+ * {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName, Context context);
+
+ /**
+ * Lists all Azure Monitor Workspaces in the specified 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 the response of a AzureMonitorWorkspaceResource list operation as paginated response with
+ * {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
+
+ /**
+ * Lists all Azure Monitor Workspaces in the specified 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 the response of a AzureMonitorWorkspaceResource list operation as paginated response with
+ * {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(Context context);
+}
diff --git a/sdk/monitor/azure-resourcemanager-monitoraccounts/src/main/java/com/azure/resourcemanager/monitoraccounts/fluent/IssuesClient.java b/sdk/monitor/azure-resourcemanager-monitoraccounts/src/main/java/com/azure/resourcemanager/monitoraccounts/fluent/IssuesClient.java
new file mode 100644
index 000000000000..a34ce4746fce
--- /dev/null
+++ b/sdk/monitor/azure-resourcemanager-monitoraccounts/src/main/java/com/azure/resourcemanager/monitoraccounts/fluent/IssuesClient.java
@@ -0,0 +1,440 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.monitoraccounts.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.monitoraccounts.fluent.models.BackgroundVisualizationInner;
+import com.azure.resourcemanager.monitoraccounts.fluent.models.InvestigationResultInner;
+import com.azure.resourcemanager.monitoraccounts.fluent.models.IssueResourceInner;
+import com.azure.resourcemanager.monitoraccounts.fluent.models.PagedRelatedAlertInner;
+import com.azure.resourcemanager.monitoraccounts.fluent.models.PagedRelatedResourceInner;
+import com.azure.resourcemanager.monitoraccounts.fluent.models.RelatedAlertsInner;
+import com.azure.resourcemanager.monitoraccounts.fluent.models.RelatedResourcesInner;
+import com.azure.resourcemanager.monitoraccounts.models.FetchInvestigationResultParameters;
+import com.azure.resourcemanager.monitoraccounts.models.ListParameter;
+
+/**
+ * An instance of this class provides access to all the operations defined in IssuesClient.
+ */
+public interface IssuesClient {
+ /**
+ * Create a new issue or updates an existing one.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureMonitorWorkspaceName The name of the Azure Monitor Workspace. The name is case insensitive.
+ * @param issueName The name of the IssueResource.
+ * @param resource Resource create parameters.
+ * @param related Related resource or alert that is to be added to the issue (default: empty - the issue will be
+ * created without any related resources or alerts).
+ * @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 Issue resource along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response createWithResponse(String resourceGroupName, String azureMonitorWorkspaceName,
+ String issueName, IssueResourceInner resource, String related, Context context);
+
+ /**
+ * Create a new issue or updates an existing one.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureMonitorWorkspaceName The name of the Azure Monitor Workspace. The name is case insensitive.
+ * @param issueName The name of the IssueResource.
+ * @param resource Resource create parameters.
+ * @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 Issue resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ IssueResourceInner create(String resourceGroupName, String azureMonitorWorkspaceName, String issueName,
+ IssueResourceInner resource);
+
+ /**
+ * Update an issue.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureMonitorWorkspaceName The name of the Azure Monitor Workspace. The name is case insensitive.
+ * @param issueName The name of the IssueResource.
+ * @param properties The resource properties to be updated.
+ * @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 Issue resource along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response updateWithResponse(String resourceGroupName, String azureMonitorWorkspaceName,
+ String issueName, IssueResourceInner properties, Context context);
+
+ /**
+ * Update an issue.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureMonitorWorkspaceName The name of the Azure Monitor Workspace. The name is case insensitive.
+ * @param issueName The name of the IssueResource.
+ * @param properties The resource properties to be updated.
+ * @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 Issue resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ IssueResourceInner update(String resourceGroupName, String azureMonitorWorkspaceName, String issueName,
+ IssueResourceInner properties);
+
+ /**
+ * Get issue properties.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureMonitorWorkspaceName The name of the Azure Monitor Workspace. The name is case insensitive.
+ * @param issueName The name of the IssueResource.
+ * @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 issue properties along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(String resourceGroupName, String azureMonitorWorkspaceName,
+ String issueName, Context context);
+
+ /**
+ * Get issue properties.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureMonitorWorkspaceName The name of the Azure Monitor Workspace. The name is case insensitive.
+ * @param issueName The name of the IssueResource.
+ * @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 issue properties.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ IssueResourceInner get(String resourceGroupName, String azureMonitorWorkspaceName, String issueName);
+
+ /**
+ * Delete an issue.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureMonitorWorkspaceName The name of the Azure Monitor Workspace. The name is case insensitive.
+ * @param issueName The name of the IssueResource.
+ * @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 azureMonitorWorkspaceName, String issueName,
+ Context context);
+
+ /**
+ * Delete an issue.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureMonitorWorkspaceName The name of the Azure Monitor Workspace. The name is case insensitive.
+ * @param issueName The name of the IssueResource.
+ * @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 azureMonitorWorkspaceName, String issueName);
+
+ /**
+ * List all issues under the parent.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureMonitorWorkspaceName The name of the Azure Monitor Workspace. 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 the response of a IssueResource list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String resourceGroupName, String azureMonitorWorkspaceName);
+
+ /**
+ * List all issues under the parent.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureMonitorWorkspaceName The name of the Azure Monitor Workspace. 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 the response of a IssueResource list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String resourceGroupName, String azureMonitorWorkspaceName, Context context);
+
+ /**
+ * Adds investigation result.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureMonitorWorkspaceName The name of the Azure Monitor Workspace. The name is case insensitive.
+ * @param issueName The name of the IssueResource.
+ * @param body The content of the action request.
+ * @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 details about the investigation result along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response addInvestigationResultWithResponse(String resourceGroupName,
+ String azureMonitorWorkspaceName, String issueName, InvestigationResultInner body, Context context);
+
+ /**
+ * Adds investigation result.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureMonitorWorkspaceName The name of the Azure Monitor Workspace. The name is case insensitive.
+ * @param issueName The name of the IssueResource.
+ * @param body The content of the action request.
+ * @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 details about the investigation result.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ InvestigationResultInner addInvestigationResult(String resourceGroupName, String azureMonitorWorkspaceName,
+ String issueName, InvestigationResultInner body);
+
+ /**
+ * Fetch investigation result.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureMonitorWorkspaceName The name of the Azure Monitor Workspace. The name is case insensitive.
+ * @param issueName The name of the IssueResource.
+ * @param body The content of the action request.
+ * @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 details about the investigation result along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response fetchInvestigationResultWithResponse(String resourceGroupName,
+ String azureMonitorWorkspaceName, String issueName, FetchInvestigationResultParameters body, Context context);
+
+ /**
+ * Fetch investigation result.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureMonitorWorkspaceName The name of the Azure Monitor Workspace. The name is case insensitive.
+ * @param issueName The name of the IssueResource.
+ * @param body The content of the action request.
+ * @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 details about the investigation result.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ InvestigationResultInner fetchInvestigationResult(String resourceGroupName, String azureMonitorWorkspaceName,
+ String issueName, FetchInvestigationResultParameters body);
+
+ /**
+ * List all alerts in the issue - this method uses pagination to return all alerts.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureMonitorWorkspaceName The name of the Azure Monitor Workspace. The name is case insensitive.
+ * @param issueName The name of the IssueResource.
+ * @param body The content of the action request.
+ * @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 paged collection of RelatedAlert items along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response listAlertsWithResponse(String resourceGroupName, String azureMonitorWorkspaceName,
+ String issueName, ListParameter body, Context context);
+
+ /**
+ * List all alerts in the issue - this method uses pagination to return all alerts.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureMonitorWorkspaceName The name of the Azure Monitor Workspace. The name is case insensitive.
+ * @param issueName The name of the IssueResource.
+ * @param body The content of the action request.
+ * @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 paged collection of RelatedAlert items.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ PagedRelatedAlertInner listAlerts(String resourceGroupName, String azureMonitorWorkspaceName, String issueName,
+ ListParameter body);
+
+ /**
+ * Add or update alerts in the issue.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureMonitorWorkspaceName The name of the Azure Monitor Workspace. The name is case insensitive.
+ * @param issueName The name of the IssueResource.
+ * @param body The content of the action request.
+ * @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 related alerts along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response addOrUpdateAlertsWithResponse(String resourceGroupName,
+ String azureMonitorWorkspaceName, String issueName, RelatedAlertsInner body, Context context);
+
+ /**
+ * Add or update alerts in the issue.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureMonitorWorkspaceName The name of the Azure Monitor Workspace. The name is case insensitive.
+ * @param issueName The name of the IssueResource.
+ * @param body The content of the action request.
+ * @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 related alerts.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ RelatedAlertsInner addOrUpdateAlerts(String resourceGroupName, String azureMonitorWorkspaceName, String issueName,
+ RelatedAlertsInner body);
+
+ /**
+ * List all resources in the issue - this method uses pagination to return all resources.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureMonitorWorkspaceName The name of the Azure Monitor Workspace. The name is case insensitive.
+ * @param issueName The name of the IssueResource.
+ * @param body The content of the action request.
+ * @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 paged collection of RelatedResource items along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response listResourcesWithResponse(String resourceGroupName,
+ String azureMonitorWorkspaceName, String issueName, ListParameter body, Context context);
+
+ /**
+ * List all resources in the issue - this method uses pagination to return all resources.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureMonitorWorkspaceName The name of the Azure Monitor Workspace. The name is case insensitive.
+ * @param issueName The name of the IssueResource.
+ * @param body The content of the action request.
+ * @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 paged collection of RelatedResource items.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ PagedRelatedResourceInner listResources(String resourceGroupName, String azureMonitorWorkspaceName,
+ String issueName, ListParameter body);
+
+ /**
+ * Add or update resources in the issue.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureMonitorWorkspaceName The name of the Azure Monitor Workspace. The name is case insensitive.
+ * @param issueName The name of the IssueResource.
+ * @param body The content of the action request.
+ * @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 related resources along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response addOrUpdateResourcesWithResponse(String resourceGroupName,
+ String azureMonitorWorkspaceName, String issueName, RelatedResourcesInner body, Context context);
+
+ /**
+ * Add or update resources in the issue.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureMonitorWorkspaceName The name of the Azure Monitor Workspace. The name is case insensitive.
+ * @param issueName The name of the IssueResource.
+ * @param body The content of the action request.
+ * @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 related resources.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ RelatedResourcesInner addOrUpdateResources(String resourceGroupName, String azureMonitorWorkspaceName,
+ String issueName, RelatedResourcesInner body);
+
+ /**
+ * Fetch the background visualization of the issue.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureMonitorWorkspaceName The name of the Azure Monitor Workspace. The name is case insensitive.
+ * @param issueName The name of the IssueResource.
+ * @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 issue background visualization along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response fetchBackgroundVisualizationWithResponse(String resourceGroupName,
+ String azureMonitorWorkspaceName, String issueName, Context context);
+
+ /**
+ * Fetch the background visualization of the issue.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureMonitorWorkspaceName The name of the Azure Monitor Workspace. The name is case insensitive.
+ * @param issueName The name of the IssueResource.
+ * @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 issue background visualization.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ BackgroundVisualizationInner fetchBackgroundVisualization(String resourceGroupName,
+ String azureMonitorWorkspaceName, String issueName);
+
+ /**
+ * Set the background visualization for the issue.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureMonitorWorkspaceName The name of the Azure Monitor Workspace. The name is case insensitive.
+ * @param issueName The name of the IssueResource.
+ * @param body The content of the action request.
+ * @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 setBackgroundVisualizationWithResponse(String resourceGroupName, String azureMonitorWorkspaceName,
+ String issueName, BackgroundVisualizationInner body, Context context);
+
+ /**
+ * Set the background visualization for the issue.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureMonitorWorkspaceName The name of the Azure Monitor Workspace. The name is case insensitive.
+ * @param issueName The name of the IssueResource.
+ * @param body The content of the action request.
+ * @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 setBackgroundVisualization(String resourceGroupName, String azureMonitorWorkspaceName, String issueName,
+ BackgroundVisualizationInner body);
+}
diff --git a/sdk/monitor/azure-resourcemanager-monitoraccounts/src/main/java/com/azure/resourcemanager/monitoraccounts/fluent/MetricsContainersClient.java b/sdk/monitor/azure-resourcemanager-monitoraccounts/src/main/java/com/azure/resourcemanager/monitoraccounts/fluent/MetricsContainersClient.java
new file mode 100644
index 000000000000..cac8f2e5be3d
--- /dev/null
+++ b/sdk/monitor/azure-resourcemanager-monitoraccounts/src/main/java/com/azure/resourcemanager/monitoraccounts/fluent/MetricsContainersClient.java
@@ -0,0 +1,113 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.monitoraccounts.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.monitoraccounts.fluent.models.MetricsContainerResourceInner;
+
+/**
+ * An instance of this class provides access to all the operations defined in MetricsContainersClient.
+ */
+public interface MetricsContainersClient {
+ /**
+ * Gets metrics container settings for a monitoring account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureMonitorWorkspaceName The name of the Azure Monitor Workspace. The name is case insensitive.
+ * @param metricsContainerName The name of the MetricsContainer.
+ * @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 metrics container settings for a monitoring account along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(String resourceGroupName, String azureMonitorWorkspaceName,
+ String metricsContainerName, Context context);
+
+ /**
+ * Gets metrics container settings for a monitoring account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureMonitorWorkspaceName The name of the Azure Monitor Workspace. The name is case insensitive.
+ * @param metricsContainerName The name of the MetricsContainer.
+ * @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 metrics container settings for a monitoring account.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ MetricsContainerResourceInner get(String resourceGroupName, String azureMonitorWorkspaceName,
+ String metricsContainerName);
+
+ /**
+ * Creates or updates metrics container settings for a monitoring account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureMonitorWorkspaceName The name of the Azure Monitor Workspace. The name is case insensitive.
+ * @param metricsContainerName The name of the MetricsContainer.
+ * @param resource Resource create parameters.
+ * @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 metrics container resource for an Azure Monitor Workspace along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response createOrUpdateWithResponse(String resourceGroupName,
+ String azureMonitorWorkspaceName, String metricsContainerName, MetricsContainerResourceInner resource,
+ Context context);
+
+ /**
+ * Creates or updates metrics container settings for a monitoring account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureMonitorWorkspaceName The name of the Azure Monitor Workspace. The name is case insensitive.
+ * @param metricsContainerName The name of the MetricsContainer.
+ * @param resource Resource create parameters.
+ * @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 metrics container resource for an Azure Monitor Workspace.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ MetricsContainerResourceInner createOrUpdate(String resourceGroupName, String azureMonitorWorkspaceName,
+ String metricsContainerName, MetricsContainerResourceInner resource);
+
+ /**
+ * Lists metrics containers for a monitoring account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureMonitorWorkspaceName The name of the Azure Monitor Workspace. 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 the response of a MetricsContainerResource list operation as paginated response with
+ * {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByAzureMonitorWorkspace(String resourceGroupName,
+ String azureMonitorWorkspaceName);
+
+ /**
+ * Lists metrics containers for a monitoring account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureMonitorWorkspaceName The name of the Azure Monitor Workspace. 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 the response of a MetricsContainerResource list operation as paginated response with
+ * {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByAzureMonitorWorkspace(String resourceGroupName,
+ String azureMonitorWorkspaceName, Context context);
+}
diff --git a/sdk/monitor/azure-resourcemanager-monitoraccounts/src/main/java/com/azure/resourcemanager/monitoraccounts/fluent/MonitorAccountsManagementClient.java b/sdk/monitor/azure-resourcemanager-monitoraccounts/src/main/java/com/azure/resourcemanager/monitoraccounts/fluent/MonitorAccountsManagementClient.java
new file mode 100644
index 000000000000..61a5f2234d18
--- /dev/null
+++ b/sdk/monitor/azure-resourcemanager-monitoraccounts/src/main/java/com/azure/resourcemanager/monitoraccounts/fluent/MonitorAccountsManagementClient.java
@@ -0,0 +1,76 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.monitoraccounts.fluent;
+
+import com.azure.core.http.HttpPipeline;
+import java.time.Duration;
+
+/**
+ * The interface for MonitorAccountsManagementClient class.
+ */
+public interface MonitorAccountsManagementClient {
+ /**
+ * Gets Service host.
+ *
+ * @return the endpoint value.
+ */
+ String getEndpoint();
+
+ /**
+ * Gets Version parameter.
+ *
+ * @return the apiVersion value.
+ */
+ String getApiVersion();
+
+ /**
+ * Gets The ID of the target subscription. The value must be an UUID.
+ *
+ * @return the subscriptionId value.
+ */
+ String getSubscriptionId();
+
+ /**
+ * Gets The HTTP pipeline to send requests through.
+ *
+ * @return the httpPipeline value.
+ */
+ HttpPipeline getHttpPipeline();
+
+ /**
+ * Gets The default poll interval for long-running operation.
+ *
+ * @return the defaultPollInterval value.
+ */
+ Duration getDefaultPollInterval();
+
+ /**
+ * Gets the OperationsClient object to access its operations.
+ *
+ * @return the OperationsClient object.
+ */
+ OperationsClient getOperations();
+
+ /**
+ * Gets the AzureMonitorWorkspacesClient object to access its operations.
+ *
+ * @return the AzureMonitorWorkspacesClient object.
+ */
+ AzureMonitorWorkspacesClient getAzureMonitorWorkspaces();
+
+ /**
+ * Gets the IssuesClient object to access its operations.
+ *
+ * @return the IssuesClient object.
+ */
+ IssuesClient getIssues();
+
+ /**
+ * Gets the MetricsContainersClient object to access its operations.
+ *
+ * @return the MetricsContainersClient object.
+ */
+ MetricsContainersClient getMetricsContainers();
+}
diff --git a/sdk/monitor/azure-resourcemanager-monitoraccounts/src/main/java/com/azure/resourcemanager/monitoraccounts/fluent/OperationsClient.java b/sdk/monitor/azure-resourcemanager-monitoraccounts/src/main/java/com/azure/resourcemanager/monitoraccounts/fluent/OperationsClient.java
new file mode 100644
index 000000000000..a0eaa7449069
--- /dev/null
+++ b/sdk/monitor/azure-resourcemanager-monitoraccounts/src/main/java/com/azure/resourcemanager/monitoraccounts/fluent/OperationsClient.java
@@ -0,0 +1,40 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.monitoraccounts.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.monitoraccounts.fluent.models.OperationInner;
+
+/**
+ * An instance of this class provides access to all the operations defined in OperationsClient.
+ */
+public interface OperationsClient {
+ /**
+ * List the operations for the provider.
+ *
+ * @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 REST API operations supported by an Azure Resource Provider as paginated response with
+ * {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
+
+ /**
+ * List the operations for the provider.
+ *
+ * @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 REST API operations supported by an Azure Resource Provider as paginated response with
+ * {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(Context context);
+}
diff --git a/sdk/monitor/azure-resourcemanager-monitoraccounts/src/main/java/com/azure/resourcemanager/monitoraccounts/fluent/models/AzureMonitorWorkspaceResourceInner.java b/sdk/monitor/azure-resourcemanager-monitoraccounts/src/main/java/com/azure/resourcemanager/monitoraccounts/fluent/models/AzureMonitorWorkspaceResourceInner.java
new file mode 100644
index 000000000000..96c1bcc09f44
--- /dev/null
+++ b/sdk/monitor/azure-resourcemanager-monitoraccounts/src/main/java/com/azure/resourcemanager/monitoraccounts/fluent/models/AzureMonitorWorkspaceResourceInner.java
@@ -0,0 +1,211 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.monitoraccounts.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.Resource;
+import com.azure.core.management.SystemData;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.monitoraccounts.models.AzureMonitorWorkspace;
+import com.azure.resourcemanager.monitoraccounts.models.ManagedServiceIdentity;
+import java.io.IOException;
+import java.util.Map;
+
+/**
+ * An Azure Monitor Workspace definition.
+ */
+@Fluent
+public final class AzureMonitorWorkspaceResourceInner extends Resource {
+ /*
+ * Resource properties
+ */
+ private AzureMonitorWorkspace properties;
+
+ /*
+ * The managed service identities assigned to this resource.
+ */
+ private ManagedServiceIdentity identity;
+
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ */
+ private SystemData systemData;
+
+ /*
+ * 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 AzureMonitorWorkspaceResourceInner class.
+ */
+ public AzureMonitorWorkspaceResourceInner() {
+ }
+
+ /**
+ * Get the properties property: Resource properties.
+ *
+ * @return the properties value.
+ */
+ public AzureMonitorWorkspace properties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: Resource properties.
+ *
+ * @param properties the properties value to set.
+ * @return the AzureMonitorWorkspaceResourceInner object itself.
+ */
+ public AzureMonitorWorkspaceResourceInner withProperties(AzureMonitorWorkspace properties) {
+ this.properties = properties;
+ return this;
+ }
+
+ /**
+ * Get the identity property: The managed service identities assigned to this resource.
+ *
+ * @return the identity value.
+ */
+ public ManagedServiceIdentity identity() {
+ return this.identity;
+ }
+
+ /**
+ * Set the identity property: The managed service identities assigned to this resource.
+ *
+ * @param identity the identity value to set.
+ * @return the AzureMonitorWorkspaceResourceInner object itself.
+ */
+ public AzureMonitorWorkspaceResourceInner withIdentity(ManagedServiceIdentity identity) {
+ this.identity = identity;
+ return this;
+ }
+
+ /**
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
+ /**
+ * 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 AzureMonitorWorkspaceResourceInner withLocation(String location) {
+ super.withLocation(location);
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public AzureMonitorWorkspaceResourceInner withTags(Map tags) {
+ super.withTags(tags);
+ return this;
+ }
+
+ /**
+ * {@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.properties);
+ jsonWriter.writeJsonField("identity", this.identity);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of AzureMonitorWorkspaceResourceInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of AzureMonitorWorkspaceResourceInner 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 AzureMonitorWorkspaceResourceInner.
+ */
+ public static AzureMonitorWorkspaceResourceInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ AzureMonitorWorkspaceResourceInner deserializedAzureMonitorWorkspaceResourceInner
+ = new AzureMonitorWorkspaceResourceInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedAzureMonitorWorkspaceResourceInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedAzureMonitorWorkspaceResourceInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedAzureMonitorWorkspaceResourceInner.type = reader.getString();
+ } else if ("location".equals(fieldName)) {
+ deserializedAzureMonitorWorkspaceResourceInner.withLocation(reader.getString());
+ } else if ("tags".equals(fieldName)) {
+ Map tags = reader.readMap(reader1 -> reader1.getString());
+ deserializedAzureMonitorWorkspaceResourceInner.withTags(tags);
+ } else if ("properties".equals(fieldName)) {
+ deserializedAzureMonitorWorkspaceResourceInner.properties = AzureMonitorWorkspace.fromJson(reader);
+ } else if ("identity".equals(fieldName)) {
+ deserializedAzureMonitorWorkspaceResourceInner.identity = ManagedServiceIdentity.fromJson(reader);
+ } else if ("systemData".equals(fieldName)) {
+ deserializedAzureMonitorWorkspaceResourceInner.systemData = SystemData.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedAzureMonitorWorkspaceResourceInner;
+ });
+ }
+}
diff --git a/sdk/monitor/azure-resourcemanager-monitoraccounts/src/main/java/com/azure/resourcemanager/monitoraccounts/fluent/models/BackgroundVisualizationInner.java b/sdk/monitor/azure-resourcemanager-monitoraccounts/src/main/java/com/azure/resourcemanager/monitoraccounts/fluent/models/BackgroundVisualizationInner.java
new file mode 100644
index 000000000000..e16202815e50
--- /dev/null
+++ b/sdk/monitor/azure-resourcemanager-monitoraccounts/src/main/java/com/azure/resourcemanager/monitoraccounts/fluent/models/BackgroundVisualizationInner.java
@@ -0,0 +1,103 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.monitoraccounts.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 com.azure.resourcemanager.monitoraccounts.models.Origin;
+import java.io.IOException;
+
+/**
+ * The issue background visualization.
+ */
+@Fluent
+public final class BackgroundVisualizationInner implements JsonSerializable {
+ /*
+ * The background visualization content, in Adaptive Card format
+ */
+ private String visualization;
+
+ /*
+ * The background visualization origin
+ */
+ private Origin origin;
+
+ /**
+ * Creates an instance of BackgroundVisualizationInner class.
+ */
+ public BackgroundVisualizationInner() {
+ }
+
+ /**
+ * Get the visualization property: The background visualization content, in Adaptive Card format.
+ *
+ * @return the visualization value.
+ */
+ public String visualization() {
+ return this.visualization;
+ }
+
+ /**
+ * Set the visualization property: The background visualization content, in Adaptive Card format.
+ *
+ * @param visualization the visualization value to set.
+ * @return the BackgroundVisualizationInner object itself.
+ */
+ public BackgroundVisualizationInner withVisualization(String visualization) {
+ this.visualization = visualization;
+ return this;
+ }
+
+ /**
+ * Get the origin property: The background visualization origin.
+ *
+ * @return the origin value.
+ */
+ public Origin origin() {
+ return this.origin;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("visualization", this.visualization);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of BackgroundVisualizationInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of BackgroundVisualizationInner 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 BackgroundVisualizationInner.
+ */
+ public static BackgroundVisualizationInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ BackgroundVisualizationInner deserializedBackgroundVisualizationInner = new BackgroundVisualizationInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("visualization".equals(fieldName)) {
+ deserializedBackgroundVisualizationInner.visualization = reader.getString();
+ } else if ("origin".equals(fieldName)) {
+ deserializedBackgroundVisualizationInner.origin = Origin.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedBackgroundVisualizationInner;
+ });
+ }
+}
diff --git a/sdk/monitor/azure-resourcemanager-monitoraccounts/src/main/java/com/azure/resourcemanager/monitoraccounts/fluent/models/InvestigationResultInner.java b/sdk/monitor/azure-resourcemanager-monitoraccounts/src/main/java/com/azure/resourcemanager/monitoraccounts/fluent/models/InvestigationResultInner.java
new file mode 100644
index 000000000000..e9ddf23083d0
--- /dev/null
+++ b/sdk/monitor/azure-resourcemanager-monitoraccounts/src/main/java/com/azure/resourcemanager/monitoraccounts/fluent/models/InvestigationResultInner.java
@@ -0,0 +1,206 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.monitoraccounts.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.monitoraccounts.models.Origin;
+import java.io.IOException;
+import java.time.OffsetDateTime;
+import java.time.format.DateTimeFormatter;
+
+/**
+ * Details about the investigation result.
+ */
+@Fluent
+public final class InvestigationResultInner implements JsonSerializable {
+ /*
+ * The identifier of the investigation
+ */
+ private String id;
+
+ /*
+ * The origin of the investigation
+ */
+ private Origin origin;
+
+ /*
+ * The creation time of the investigation (in UTC)
+ */
+ private OffsetDateTime createdAt;
+
+ /*
+ * The last update time of the investigation (in UTC)
+ */
+ private OffsetDateTime lastModifiedAt;
+
+ /*
+ * The result of this investigation
+ */
+ private String result;
+
+ /**
+ * Creates an instance of InvestigationResultInner class.
+ */
+ public InvestigationResultInner() {
+ }
+
+ /**
+ * Get the id property: The identifier of the investigation.
+ *
+ * @return the id value.
+ */
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * Set the id property: The identifier of the investigation.
+ *
+ * @param id the id value to set.
+ * @return the InvestigationResultInner object itself.
+ */
+ public InvestigationResultInner withId(String id) {
+ this.id = id;
+ return this;
+ }
+
+ /**
+ * Get the origin property: The origin of the investigation.
+ *
+ * @return the origin value.
+ */
+ public Origin origin() {
+ return this.origin;
+ }
+
+ /**
+ * Set the origin property: The origin of the investigation.
+ *
+ * @param origin the origin value to set.
+ * @return the InvestigationResultInner object itself.
+ */
+ public InvestigationResultInner withOrigin(Origin origin) {
+ this.origin = origin;
+ return this;
+ }
+
+ /**
+ * Get the createdAt property: The creation time of the investigation (in UTC).
+ *
+ * @return the createdAt value.
+ */
+ public OffsetDateTime createdAt() {
+ return this.createdAt;
+ }
+
+ /**
+ * Set the createdAt property: The creation time of the investigation (in UTC).
+ *
+ * @param createdAt the createdAt value to set.
+ * @return the InvestigationResultInner object itself.
+ */
+ public InvestigationResultInner withCreatedAt(OffsetDateTime createdAt) {
+ this.createdAt = createdAt;
+ return this;
+ }
+
+ /**
+ * Get the lastModifiedAt property: The last update time of the investigation (in UTC).
+ *
+ * @return the lastModifiedAt value.
+ */
+ public OffsetDateTime lastModifiedAt() {
+ return this.lastModifiedAt;
+ }
+
+ /**
+ * Set the lastModifiedAt property: The last update time of the investigation (in UTC).
+ *
+ * @param lastModifiedAt the lastModifiedAt value to set.
+ * @return the InvestigationResultInner object itself.
+ */
+ public InvestigationResultInner withLastModifiedAt(OffsetDateTime lastModifiedAt) {
+ this.lastModifiedAt = lastModifiedAt;
+ return this;
+ }
+
+ /**
+ * Get the result property: The result of this investigation.
+ *
+ * @return the result value.
+ */
+ public String result() {
+ return this.result;
+ }
+
+ /**
+ * Set the result property: The result of this investigation.
+ *
+ * @param result the result value to set.
+ * @return the InvestigationResultInner object itself.
+ */
+ public InvestigationResultInner withResult(String result) {
+ this.result = result;
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("id", this.id);
+ jsonWriter.writeStringField("result", this.result);
+ jsonWriter.writeJsonField("origin", this.origin);
+ jsonWriter.writeStringField("createdAt",
+ this.createdAt == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.createdAt));
+ jsonWriter.writeStringField("lastModifiedAt",
+ this.lastModifiedAt == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.lastModifiedAt));
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of InvestigationResultInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of InvestigationResultInner 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 InvestigationResultInner.
+ */
+ public static InvestigationResultInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ InvestigationResultInner deserializedInvestigationResultInner = new InvestigationResultInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedInvestigationResultInner.id = reader.getString();
+ } else if ("result".equals(fieldName)) {
+ deserializedInvestigationResultInner.result = reader.getString();
+ } else if ("origin".equals(fieldName)) {
+ deserializedInvestigationResultInner.origin = Origin.fromJson(reader);
+ } else if ("createdAt".equals(fieldName)) {
+ deserializedInvestigationResultInner.createdAt = reader
+ .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()));
+ } else if ("lastModifiedAt".equals(fieldName)) {
+ deserializedInvestigationResultInner.lastModifiedAt = reader
+ .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()));
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedInvestigationResultInner;
+ });
+ }
+}
diff --git a/sdk/monitor/azure-resourcemanager-monitoraccounts/src/main/java/com/azure/resourcemanager/monitoraccounts/fluent/models/IssueResourceInner.java b/sdk/monitor/azure-resourcemanager-monitoraccounts/src/main/java/com/azure/resourcemanager/monitoraccounts/fluent/models/IssueResourceInner.java
new file mode 100644
index 000000000000..c0e62bba0afc
--- /dev/null
+++ b/sdk/monitor/azure-resourcemanager-monitoraccounts/src/main/java/com/azure/resourcemanager/monitoraccounts/fluent/models/IssueResourceInner.java
@@ -0,0 +1,155 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.monitoraccounts.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.management.SystemData;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.monitoraccounts.models.IssueProperties;
+import java.io.IOException;
+
+/**
+ * The Issue resource.
+ */
+@Fluent
+public final class IssueResourceInner extends ProxyResource {
+ /*
+ * The resource-specific properties for this resource.
+ */
+ private IssueProperties properties;
+
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ */
+ private SystemData systemData;
+
+ /*
+ * 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 IssueResourceInner class.
+ */
+ public IssueResourceInner() {
+ }
+
+ /**
+ * Get the properties property: The resource-specific properties for this resource.
+ *
+ * @return the properties value.
+ */
+ public IssueProperties properties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: The resource-specific properties for this resource.
+ *
+ * @param properties the properties value to set.
+ * @return the IssueResourceInner object itself.
+ */
+ public IssueResourceInner withProperties(IssueProperties properties) {
+ this.properties = properties;
+ return this;
+ }
+
+ /**
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
+ /**
+ * 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 JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("properties", this.properties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of IssueResourceInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of IssueResourceInner 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 IssueResourceInner.
+ */
+ public static IssueResourceInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ IssueResourceInner deserializedIssueResourceInner = new IssueResourceInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedIssueResourceInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedIssueResourceInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedIssueResourceInner.type = reader.getString();
+ } else if ("properties".equals(fieldName)) {
+ deserializedIssueResourceInner.properties = IssueProperties.fromJson(reader);
+ } else if ("systemData".equals(fieldName)) {
+ deserializedIssueResourceInner.systemData = SystemData.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedIssueResourceInner;
+ });
+ }
+}
diff --git a/sdk/monitor/azure-resourcemanager-monitoraccounts/src/main/java/com/azure/resourcemanager/monitoraccounts/fluent/models/MetricsContainerResourceInner.java b/sdk/monitor/azure-resourcemanager-monitoraccounts/src/main/java/com/azure/resourcemanager/monitoraccounts/fluent/models/MetricsContainerResourceInner.java
new file mode 100644
index 000000000000..9bae7973cea1
--- /dev/null
+++ b/sdk/monitor/azure-resourcemanager-monitoraccounts/src/main/java/com/azure/resourcemanager/monitoraccounts/fluent/models/MetricsContainerResourceInner.java
@@ -0,0 +1,156 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.monitoraccounts.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.management.SystemData;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.monitoraccounts.models.MetricsContainer;
+import java.io.IOException;
+
+/**
+ * Metrics container resource for an Azure Monitor Workspace.
+ */
+@Fluent
+public final class MetricsContainerResourceInner extends ProxyResource {
+ /*
+ * The resource-specific properties for this resource.
+ */
+ private MetricsContainer properties;
+
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ */
+ private SystemData systemData;
+
+ /*
+ * 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 MetricsContainerResourceInner class.
+ */
+ public MetricsContainerResourceInner() {
+ }
+
+ /**
+ * Get the properties property: The resource-specific properties for this resource.
+ *
+ * @return the properties value.
+ */
+ public MetricsContainer properties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: The resource-specific properties for this resource.
+ *
+ * @param properties the properties value to set.
+ * @return the MetricsContainerResourceInner object itself.
+ */
+ public MetricsContainerResourceInner withProperties(MetricsContainer properties) {
+ this.properties = properties;
+ return this;
+ }
+
+ /**
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
+ /**
+ * 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 JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("properties", this.properties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of MetricsContainerResourceInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of MetricsContainerResourceInner 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 MetricsContainerResourceInner.
+ */
+ public static MetricsContainerResourceInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ MetricsContainerResourceInner deserializedMetricsContainerResourceInner
+ = new MetricsContainerResourceInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedMetricsContainerResourceInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedMetricsContainerResourceInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedMetricsContainerResourceInner.type = reader.getString();
+ } else if ("properties".equals(fieldName)) {
+ deserializedMetricsContainerResourceInner.properties = MetricsContainer.fromJson(reader);
+ } else if ("systemData".equals(fieldName)) {
+ deserializedMetricsContainerResourceInner.systemData = SystemData.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedMetricsContainerResourceInner;
+ });
+ }
+}
diff --git a/sdk/monitor/azure-resourcemanager-monitoraccounts/src/main/java/com/azure/resourcemanager/monitoraccounts/fluent/models/OperationInner.java b/sdk/monitor/azure-resourcemanager-monitoraccounts/src/main/java/com/azure/resourcemanager/monitoraccounts/fluent/models/OperationInner.java
new file mode 100644
index 000000000000..84d731e3af8e
--- /dev/null
+++ b/sdk/monitor/azure-resourcemanager-monitoraccounts/src/main/java/com/azure/resourcemanager/monitoraccounts/fluent/models/OperationInner.java
@@ -0,0 +1,150 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.monitoraccounts.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.monitoraccounts.models.ActionType;
+import com.azure.resourcemanager.monitoraccounts.models.OperationDisplay;
+import com.azure.resourcemanager.monitoraccounts.models.OriginValue;
+import java.io.IOException;
+
+/**
+ * REST API Operation
+ *
+ * Details of a REST API operation, returned from the Resource Provider Operations API.
+ */
+@Immutable
+public final class OperationInner implements JsonSerializable {
+ /*
+ * The name of the operation, as per Resource-Based Access Control (RBAC). Examples:
+ * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action"
+ */
+ private String name;
+
+ /*
+ * Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for Azure
+ * Resource Manager/control-plane operations.
+ */
+ private Boolean isDataAction;
+
+ /*
+ * Localized display information for this particular operation.
+ */
+ private OperationDisplay display;
+
+ /*
+ * The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default
+ * value is "user,system"
+ */
+ private OriginValue origin;
+
+ /*
+ * Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.
+ */
+ private ActionType actionType;
+
+ /**
+ * Creates an instance of OperationInner class.
+ */
+ private OperationInner() {
+ }
+
+ /**
+ * Get the name property: The name of the operation, as per Resource-Based Access Control (RBAC). Examples:
+ * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action".
+ *
+ * @return the name value.
+ */
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the isDataAction property: Whether the operation applies to data-plane. This is "true" for data-plane
+ * operations and "false" for Azure Resource Manager/control-plane operations.
+ *
+ * @return the isDataAction value.
+ */
+ public Boolean isDataAction() {
+ return this.isDataAction;
+ }
+
+ /**
+ * Get the display property: Localized display information for this particular operation.
+ *
+ * @return the display value.
+ */
+ public OperationDisplay display() {
+ return this.display;
+ }
+
+ /**
+ * Get the origin property: The intended executor of the operation; as in Resource Based Access Control (RBAC) and
+ * audit logs UX. Default value is "user,system".
+ *
+ * @return the origin value.
+ */
+ public OriginValue origin() {
+ return this.origin;
+ }
+
+ /**
+ * Get the actionType property: Extensible enum. Indicates the action type. "Internal" refers to actions that are
+ * for internal only APIs.
+ *
+ * @return the actionType value.
+ */
+ public ActionType actionType() {
+ return this.actionType;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("display", this.display);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of OperationInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of OperationInner 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 OperationInner.
+ */
+ public static OperationInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ OperationInner deserializedOperationInner = new OperationInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("name".equals(fieldName)) {
+ deserializedOperationInner.name = reader.getString();
+ } else if ("isDataAction".equals(fieldName)) {
+ deserializedOperationInner.isDataAction = reader.getNullable(JsonReader::getBoolean);
+ } else if ("display".equals(fieldName)) {
+ deserializedOperationInner.display = OperationDisplay.fromJson(reader);
+ } else if ("origin".equals(fieldName)) {
+ deserializedOperationInner.origin = OriginValue.fromString(reader.getString());
+ } else if ("actionType".equals(fieldName)) {
+ deserializedOperationInner.actionType = ActionType.fromString(reader.getString());
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedOperationInner;
+ });
+ }
+}
diff --git a/sdk/monitor/azure-resourcemanager-monitoraccounts/src/main/java/com/azure/resourcemanager/monitoraccounts/fluent/models/PagedRelatedAlertInner.java b/sdk/monitor/azure-resourcemanager-monitoraccounts/src/main/java/com/azure/resourcemanager/monitoraccounts/fluent/models/PagedRelatedAlertInner.java
new file mode 100644
index 000000000000..206aaac29fa0
--- /dev/null
+++ b/sdk/monitor/azure-resourcemanager-monitoraccounts/src/main/java/com/azure/resourcemanager/monitoraccounts/fluent/models/PagedRelatedAlertInner.java
@@ -0,0 +1,95 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.monitoraccounts.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.monitoraccounts.models.RelatedAlert;
+import java.io.IOException;
+import java.util.List;
+
+/**
+ * Paged collection of RelatedAlert items.
+ */
+@Immutable
+public final class PagedRelatedAlertInner implements JsonSerializable {
+ /*
+ * The RelatedAlert items on this page
+ */
+ private List value;
+
+ /*
+ * The link to the next page of items
+ */
+ private String nextLink;
+
+ /**
+ * Creates an instance of PagedRelatedAlertInner class.
+ */
+ private PagedRelatedAlertInner() {
+ }
+
+ /**
+ * Get the value property: The RelatedAlert items on this page.
+ *
+ * @return the value value.
+ */
+ public List value() {
+ return this.value;
+ }
+
+ /**
+ * Get the nextLink property: The link to the next page of items.
+ *
+ * @return the nextLink value.
+ */
+ public String nextLink() {
+ return this.nextLink;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element));
+ jsonWriter.writeStringField("nextLink", this.nextLink);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of PagedRelatedAlertInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of PagedRelatedAlertInner 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 PagedRelatedAlertInner.
+ */
+ public static PagedRelatedAlertInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ PagedRelatedAlertInner deserializedPagedRelatedAlertInner = new PagedRelatedAlertInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("value".equals(fieldName)) {
+ List value = reader.readArray(reader1 -> RelatedAlert.fromJson(reader1));
+ deserializedPagedRelatedAlertInner.value = value;
+ } else if ("nextLink".equals(fieldName)) {
+ deserializedPagedRelatedAlertInner.nextLink = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedPagedRelatedAlertInner;
+ });
+ }
+}
diff --git a/sdk/monitor/azure-resourcemanager-monitoraccounts/src/main/java/com/azure/resourcemanager/monitoraccounts/fluent/models/PagedRelatedResourceInner.java b/sdk/monitor/azure-resourcemanager-monitoraccounts/src/main/java/com/azure/resourcemanager/monitoraccounts/fluent/models/PagedRelatedResourceInner.java
new file mode 100644
index 000000000000..108610101a99
--- /dev/null
+++ b/sdk/monitor/azure-resourcemanager-monitoraccounts/src/main/java/com/azure/resourcemanager/monitoraccounts/fluent/models/PagedRelatedResourceInner.java
@@ -0,0 +1,95 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.monitoraccounts.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.monitoraccounts.models.RelatedResource;
+import java.io.IOException;
+import java.util.List;
+
+/**
+ * Paged collection of RelatedResource items.
+ */
+@Immutable
+public final class PagedRelatedResourceInner implements JsonSerializable {
+ /*
+ * The RelatedResource items on this page
+ */
+ private List value;
+
+ /*
+ * The link to the next page of items
+ */
+ private String nextLink;
+
+ /**
+ * Creates an instance of PagedRelatedResourceInner class.
+ */
+ private PagedRelatedResourceInner() {
+ }
+
+ /**
+ * Get the value property: The RelatedResource items on this page.
+ *
+ * @return the value value.
+ */
+ public List value() {
+ return this.value;
+ }
+
+ /**
+ * Get the nextLink property: The link to the next page of items.
+ *
+ * @return the nextLink value.
+ */
+ public String nextLink() {
+ return this.nextLink;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element));
+ jsonWriter.writeStringField("nextLink", this.nextLink);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of PagedRelatedResourceInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of PagedRelatedResourceInner 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 PagedRelatedResourceInner.
+ */
+ public static PagedRelatedResourceInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ PagedRelatedResourceInner deserializedPagedRelatedResourceInner = new PagedRelatedResourceInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("value".equals(fieldName)) {
+ List value = reader.readArray(reader1 -> RelatedResource.fromJson(reader1));
+ deserializedPagedRelatedResourceInner.value = value;
+ } else if ("nextLink".equals(fieldName)) {
+ deserializedPagedRelatedResourceInner.nextLink = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedPagedRelatedResourceInner;
+ });
+ }
+}
diff --git a/sdk/monitor/azure-resourcemanager-monitoraccounts/src/main/java/com/azure/resourcemanager/monitoraccounts/fluent/models/RelatedAlertsInner.java b/sdk/monitor/azure-resourcemanager-monitoraccounts/src/main/java/com/azure/resourcemanager/monitoraccounts/fluent/models/RelatedAlertsInner.java
new file mode 100644
index 000000000000..1223cf7fb443
--- /dev/null
+++ b/sdk/monitor/azure-resourcemanager-monitoraccounts/src/main/java/com/azure/resourcemanager/monitoraccounts/fluent/models/RelatedAlertsInner.java
@@ -0,0 +1,89 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.monitoraccounts.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 com.azure.resourcemanager.monitoraccounts.models.RelatedAlert;
+import java.io.IOException;
+import java.util.List;
+
+/**
+ * A list of related alerts.
+ */
+@Fluent
+public final class RelatedAlertsInner implements JsonSerializable {
+ /*
+ * A list of related alerts
+ */
+ private List value;
+
+ /**
+ * Creates an instance of RelatedAlertsInner class.
+ */
+ public RelatedAlertsInner() {
+ }
+
+ /**
+ * Get the value property: A list of related alerts.
+ *
+ * @return the value value.
+ */
+ public List value() {
+ return this.value;
+ }
+
+ /**
+ * Set the value property: A list of related alerts.
+ *
+ * @param value the value value to set.
+ * @return the RelatedAlertsInner object itself.
+ */
+ public RelatedAlertsInner withValue(List value) {
+ this.value = value;
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element));
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of RelatedAlertsInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of RelatedAlertsInner 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 RelatedAlertsInner.
+ */
+ public static RelatedAlertsInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ RelatedAlertsInner deserializedRelatedAlertsInner = new RelatedAlertsInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("value".equals(fieldName)) {
+ List value = reader.readArray(reader1 -> RelatedAlert.fromJson(reader1));
+ deserializedRelatedAlertsInner.value = value;
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedRelatedAlertsInner;
+ });
+ }
+}
diff --git a/sdk/monitor/azure-resourcemanager-monitoraccounts/src/main/java/com/azure/resourcemanager/monitoraccounts/fluent/models/RelatedResourcesInner.java b/sdk/monitor/azure-resourcemanager-monitoraccounts/src/main/java/com/azure/resourcemanager/monitoraccounts/fluent/models/RelatedResourcesInner.java
new file mode 100644
index 000000000000..9107f5d3ad77
--- /dev/null
+++ b/sdk/monitor/azure-resourcemanager-monitoraccounts/src/main/java/com/azure/resourcemanager/monitoraccounts/fluent/models/RelatedResourcesInner.java
@@ -0,0 +1,89 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.monitoraccounts.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 com.azure.resourcemanager.monitoraccounts.models.RelatedResource;
+import java.io.IOException;
+import java.util.List;
+
+/**
+ * A list of related resources.
+ */
+@Fluent
+public final class RelatedResourcesInner implements JsonSerializable {
+ /*
+ * A list of related resources
+ */
+ private List value;
+
+ /**
+ * Creates an instance of RelatedResourcesInner class.
+ */
+ public RelatedResourcesInner() {
+ }
+
+ /**
+ * Get the value property: A list of related resources.
+ *
+ * @return the value value.
+ */
+ public List value() {
+ return this.value;
+ }
+
+ /**
+ * Set the value property: A list of related resources.
+ *
+ * @param value the value value to set.
+ * @return the RelatedResourcesInner object itself.
+ */
+ public RelatedResourcesInner withValue(List value) {
+ this.value = value;
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element));
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of RelatedResourcesInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of RelatedResourcesInner 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 RelatedResourcesInner.
+ */
+ public static RelatedResourcesInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ RelatedResourcesInner deserializedRelatedResourcesInner = new RelatedResourcesInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("value".equals(fieldName)) {
+ List value = reader.readArray(reader1 -> RelatedResource.fromJson(reader1));
+ deserializedRelatedResourcesInner.value = value;
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedRelatedResourcesInner;
+ });
+ }
+}
diff --git a/sdk/monitor/azure-resourcemanager-monitoraccounts/src/main/java/com/azure/resourcemanager/monitoraccounts/fluent/models/package-info.java b/sdk/monitor/azure-resourcemanager-monitoraccounts/src/main/java/com/azure/resourcemanager/monitoraccounts/fluent/models/package-info.java
new file mode 100644
index 000000000000..d0cc7c148ed5
--- /dev/null
+++ b/sdk/monitor/azure-resourcemanager-monitoraccounts/src/main/java/com/azure/resourcemanager/monitoraccounts/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) TypeSpec Code Generator.
+
+/**
+ * Package containing the inner data models for MonitorAccounts.
+ * Monitor Management Client.
+ */
+package com.azure.resourcemanager.monitoraccounts.fluent.models;
diff --git a/sdk/monitor/azure-resourcemanager-monitoraccounts/src/main/java/com/azure/resourcemanager/monitoraccounts/fluent/package-info.java b/sdk/monitor/azure-resourcemanager-monitoraccounts/src/main/java/com/azure/resourcemanager/monitoraccounts/fluent/package-info.java
new file mode 100644
index 000000000000..6e8eb8fa9bcc
--- /dev/null
+++ b/sdk/monitor/azure-resourcemanager-monitoraccounts/src/main/java/com/azure/resourcemanager/monitoraccounts/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) TypeSpec Code Generator.
+
+/**
+ * Package containing the service clients for MonitorAccounts.
+ * Monitor Management Client.
+ */
+package com.azure.resourcemanager.monitoraccounts.fluent;
diff --git a/sdk/monitor/azure-resourcemanager-monitoraccounts/src/main/java/com/azure/resourcemanager/monitoraccounts/implementation/AzureMonitorWorkspaceResourceImpl.java b/sdk/monitor/azure-resourcemanager-monitoraccounts/src/main/java/com/azure/resourcemanager/monitoraccounts/implementation/AzureMonitorWorkspaceResourceImpl.java
new file mode 100644
index 000000000000..b7e71c024169
--- /dev/null
+++ b/sdk/monitor/azure-resourcemanager-monitoraccounts/src/main/java/com/azure/resourcemanager/monitoraccounts/implementation/AzureMonitorWorkspaceResourceImpl.java
@@ -0,0 +1,180 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.monitoraccounts.implementation;
+
+import com.azure.core.management.Region;
+import com.azure.core.management.SystemData;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.monitoraccounts.fluent.models.AzureMonitorWorkspaceResourceInner;
+import com.azure.resourcemanager.monitoraccounts.models.AzureMonitorWorkspace;
+import com.azure.resourcemanager.monitoraccounts.models.AzureMonitorWorkspaceResource;
+import com.azure.resourcemanager.monitoraccounts.models.ManagedServiceIdentity;
+import java.util.Collections;
+import java.util.Map;
+
+public final class AzureMonitorWorkspaceResourceImpl implements AzureMonitorWorkspaceResource,
+ AzureMonitorWorkspaceResource.Definition, AzureMonitorWorkspaceResource.Update {
+ private AzureMonitorWorkspaceResourceInner innerObject;
+
+ private final com.azure.resourcemanager.monitoraccounts.MonitorAccountsManager 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 AzureMonitorWorkspace properties() {
+ return this.innerModel().properties();
+ }
+
+ public ManagedServiceIdentity identity() {
+ return this.innerModel().identity();
+ }
+
+ public SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
+ public Region region() {
+ return Region.fromName(this.regionName());
+ }
+
+ public String regionName() {
+ return this.location();
+ }
+
+ public String resourceGroupName() {
+ return resourceGroupName;
+ }
+
+ public AzureMonitorWorkspaceResourceInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.monitoraccounts.MonitorAccountsManager manager() {
+ return this.serviceManager;
+ }
+
+ private String resourceGroupName;
+
+ private String azureMonitorWorkspaceName;
+
+ public AzureMonitorWorkspaceResourceImpl withExistingResourceGroup(String resourceGroupName) {
+ this.resourceGroupName = resourceGroupName;
+ return this;
+ }
+
+ public AzureMonitorWorkspaceResource create() {
+ this.innerObject = serviceManager.serviceClient()
+ .getAzureMonitorWorkspaces()
+ .createOrUpdateWithResponse(resourceGroupName, azureMonitorWorkspaceName, this.innerModel(), Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public AzureMonitorWorkspaceResource create(Context context) {
+ this.innerObject = serviceManager.serviceClient()
+ .getAzureMonitorWorkspaces()
+ .createOrUpdateWithResponse(resourceGroupName, azureMonitorWorkspaceName, this.innerModel(), context)
+ .getValue();
+ return this;
+ }
+
+ AzureMonitorWorkspaceResourceImpl(String name,
+ com.azure.resourcemanager.monitoraccounts.MonitorAccountsManager serviceManager) {
+ this.innerObject = new AzureMonitorWorkspaceResourceInner();
+ this.serviceManager = serviceManager;
+ this.azureMonitorWorkspaceName = name;
+ }
+
+ public AzureMonitorWorkspaceResourceImpl update() {
+ return this;
+ }
+
+ public AzureMonitorWorkspaceResource apply() {
+ this.innerObject = serviceManager.serviceClient()
+ .getAzureMonitorWorkspaces()
+ .updateWithResponse(resourceGroupName, azureMonitorWorkspaceName, this.innerModel(), Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public AzureMonitorWorkspaceResource apply(Context context) {
+ this.innerObject = serviceManager.serviceClient()
+ .getAzureMonitorWorkspaces()
+ .updateWithResponse(resourceGroupName, azureMonitorWorkspaceName, this.innerModel(), context)
+ .getValue();
+ return this;
+ }
+
+ AzureMonitorWorkspaceResourceImpl(AzureMonitorWorkspaceResourceInner innerObject,
+ com.azure.resourcemanager.monitoraccounts.MonitorAccountsManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups");
+ this.azureMonitorWorkspaceName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "accounts");
+ }
+
+ public AzureMonitorWorkspaceResource refresh() {
+ this.innerObject = serviceManager.serviceClient()
+ .getAzureMonitorWorkspaces()
+ .getByResourceGroupWithResponse(resourceGroupName, azureMonitorWorkspaceName, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public AzureMonitorWorkspaceResource refresh(Context context) {
+ this.innerObject = serviceManager.serviceClient()
+ .getAzureMonitorWorkspaces()
+ .getByResourceGroupWithResponse(resourceGroupName, azureMonitorWorkspaceName, context)
+ .getValue();
+ return this;
+ }
+
+ public AzureMonitorWorkspaceResourceImpl withRegion(Region location) {
+ this.innerModel().withLocation(location.toString());
+ return this;
+ }
+
+ public AzureMonitorWorkspaceResourceImpl withRegion(String location) {
+ this.innerModel().withLocation(location);
+ return this;
+ }
+
+ public AzureMonitorWorkspaceResourceImpl withTags(Map tags) {
+ this.innerModel().withTags(tags);
+ return this;
+ }
+
+ public AzureMonitorWorkspaceResourceImpl withProperties(AzureMonitorWorkspace properties) {
+ this.innerModel().withProperties(properties);
+ return this;
+ }
+
+ public AzureMonitorWorkspaceResourceImpl withIdentity(ManagedServiceIdentity identity) {
+ this.innerModel().withIdentity(identity);
+ return this;
+ }
+}
diff --git a/sdk/monitor/azure-resourcemanager-monitoraccounts/src/main/java/com/azure/resourcemanager/monitoraccounts/implementation/AzureMonitorWorkspacesClientImpl.java b/sdk/monitor/azure-resourcemanager-monitoraccounts/src/main/java/com/azure/resourcemanager/monitoraccounts/implementation/AzureMonitorWorkspacesClientImpl.java
new file mode 100644
index 000000000000..6d5b27523a3e
--- /dev/null
+++ b/sdk/monitor/azure-resourcemanager-monitoraccounts/src/main/java/com/azure/resourcemanager/monitoraccounts/implementation/AzureMonitorWorkspacesClientImpl.java
@@ -0,0 +1,935 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.monitoraccounts.implementation;
+
+import com.azure.core.annotation.BodyParam;
+import com.azure.core.annotation.Delete;
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.Patch;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.Put;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.BinaryData;
+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.monitoraccounts.fluent.AzureMonitorWorkspacesClient;
+import com.azure.resourcemanager.monitoraccounts.fluent.models.AzureMonitorWorkspaceResourceInner;
+import com.azure.resourcemanager.monitoraccounts.implementation.models.AzureMonitorWorkspaceResourceListResult;
+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 AzureMonitorWorkspacesClient.
+ */
+public final class AzureMonitorWorkspacesClientImpl implements AzureMonitorWorkspacesClient {
+ /**
+ * The proxy service used to perform REST calls.
+ */
+ private final AzureMonitorWorkspacesService service;
+
+ /**
+ * The service client containing this operation class.
+ */
+ private final MonitorAccountsManagementClientImpl client;
+
+ /**
+ * Initializes an instance of AzureMonitorWorkspacesClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ AzureMonitorWorkspacesClientImpl(MonitorAccountsManagementClientImpl client) {
+ this.service = RestProxy.create(AzureMonitorWorkspacesService.class, client.getHttpPipeline(),
+ client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for MonitorAccountsManagementClientAzureMonitorWorkspaces to be used by
+ * the proxy service to perform REST calls.
+ */
+ @Host("{endpoint}")
+ @ServiceInterface(name = "MonitorAccountsManagementClientAzureMonitorWorkspaces")
+ public interface AzureMonitorWorkspacesService {
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Monitor/accounts/{azureMonitorWorkspaceName}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> getByResourceGroup(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("azureMonitorWorkspaceName") String azureMonitorWorkspaceName,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Monitor/accounts/{azureMonitorWorkspaceName}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response getByResourceGroupSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("azureMonitorWorkspaceName") String azureMonitorWorkspaceName,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Monitor/accounts/{azureMonitorWorkspaceName}")
+ @ExpectedResponses({ 200, 201 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> createOrUpdate(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("azureMonitorWorkspaceName") String azureMonitorWorkspaceName,
+ @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept,
+ @BodyParam("application/json") AzureMonitorWorkspaceResourceInner resource, Context context);
+
+ @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Monitor/accounts/{azureMonitorWorkspaceName}")
+ @ExpectedResponses({ 200, 201 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response createOrUpdateSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("azureMonitorWorkspaceName") String azureMonitorWorkspaceName,
+ @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept,
+ @BodyParam("application/json") AzureMonitorWorkspaceResourceInner resource, Context context);
+
+ @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Monitor/accounts/{azureMonitorWorkspaceName}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> update(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("azureMonitorWorkspaceName") String azureMonitorWorkspaceName,
+ @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept,
+ @BodyParam("application/json") AzureMonitorWorkspaceResourceInner properties, Context context);
+
+ @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Monitor/accounts/{azureMonitorWorkspaceName}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response updateSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("azureMonitorWorkspaceName") String azureMonitorWorkspaceName,
+ @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept,
+ @BodyParam("application/json") AzureMonitorWorkspaceResourceInner properties, Context context);
+
+ @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" })
+ @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Monitor/accounts/{azureMonitorWorkspaceName}")
+ @ExpectedResponses({ 202, 204 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> delete(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("azureMonitorWorkspaceName") String azureMonitorWorkspaceName, Context context);
+
+ @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" })
+ @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Monitor/accounts/{azureMonitorWorkspaceName}")
+ @ExpectedResponses({ 202, 204 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response deleteSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("azureMonitorWorkspaceName") String azureMonitorWorkspaceName, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Monitor/accounts")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByResourceGroup(
+ @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Monitor/accounts")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response listByResourceGroupSync(
+ @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Monitor/accounts")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> list(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Monitor/accounts")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response listSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByResourceGroupNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response listByResourceGroupNextSync(
+ @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listBySubscriptionNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response listBySubscriptionNextSync(
+ @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint,
+ @HeaderParam("Accept") String accept, Context context);
+ }
+
+ /**
+ * Returns the specified Azure Monitor Workspace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureMonitorWorkspaceName The name of the Azure Monitor Workspace. 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 an Azure Monitor Workspace definition along with {@link Response} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>
+ getByResourceGroupWithResponseAsync(String resourceGroupName, String azureMonitorWorkspaceName) {
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, azureMonitorWorkspaceName, accept, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Returns the specified Azure Monitor Workspace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureMonitorWorkspaceName The name of the Azure Monitor Workspace. 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 an Azure Monitor Workspace definition on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getByResourceGroupAsync(String resourceGroupName,
+ String azureMonitorWorkspaceName) {
+ return getByResourceGroupWithResponseAsync(resourceGroupName, azureMonitorWorkspaceName)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Returns the specified Azure Monitor Workspace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureMonitorWorkspaceName The name of the Azure Monitor Workspace. 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 an Azure Monitor Workspace definition along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getByResourceGroupWithResponse(String resourceGroupName,
+ String azureMonitorWorkspaceName, Context context) {
+ final String accept = "application/json";
+ return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, azureMonitorWorkspaceName, accept, context);
+ }
+
+ /**
+ * Returns the specified Azure Monitor Workspace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureMonitorWorkspaceName The name of the Azure Monitor Workspace. 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 an Azure Monitor Workspace definition.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public AzureMonitorWorkspaceResourceInner getByResourceGroup(String resourceGroupName,
+ String azureMonitorWorkspaceName) {
+ return getByResourceGroupWithResponse(resourceGroupName, azureMonitorWorkspaceName, Context.NONE).getValue();
+ }
+
+ /**
+ * Creates or updates an Azure Monitor Workspace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureMonitorWorkspaceName The name of the Azure Monitor Workspace. The name is case insensitive.
+ * @param resource Properties that need to be specified to create a new Azure Monitor Workspace.
+ * @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 Azure Monitor Workspace definition along with {@link Response} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> createOrUpdateWithResponseAsync(String resourceGroupName,
+ String azureMonitorWorkspaceName, AzureMonitorWorkspaceResourceInner resource) {
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, azureMonitorWorkspaceName, contentType, accept,
+ resource, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Creates or updates an Azure Monitor Workspace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureMonitorWorkspaceName The name of the Azure Monitor Workspace. The name is case insensitive.
+ * @param resource Properties that need to be specified to create a new Azure Monitor Workspace.
+ * @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 Azure Monitor Workspace definition on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createOrUpdateAsync(String resourceGroupName,
+ String azureMonitorWorkspaceName, AzureMonitorWorkspaceResourceInner resource) {
+ return createOrUpdateWithResponseAsync(resourceGroupName, azureMonitorWorkspaceName, resource)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Creates or updates an Azure Monitor Workspace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureMonitorWorkspaceName The name of the Azure Monitor Workspace. The name is case insensitive.
+ * @param resource Properties that need to be specified to create a new Azure Monitor Workspace.
+ * @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 Azure Monitor Workspace definition along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response createOrUpdateWithResponse(String resourceGroupName,
+ String azureMonitorWorkspaceName, AzureMonitorWorkspaceResourceInner resource, Context context) {
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, azureMonitorWorkspaceName, contentType, accept,
+ resource, context);
+ }
+
+ /**
+ * Creates or updates an Azure Monitor Workspace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureMonitorWorkspaceName The name of the Azure Monitor Workspace. The name is case insensitive.
+ * @param resource Properties that need to be specified to create a new Azure Monitor Workspace.
+ * @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 Azure Monitor Workspace definition.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public AzureMonitorWorkspaceResourceInner createOrUpdate(String resourceGroupName, String azureMonitorWorkspaceName,
+ AzureMonitorWorkspaceResourceInner resource) {
+ return createOrUpdateWithResponse(resourceGroupName, azureMonitorWorkspaceName, resource, Context.NONE)
+ .getValue();
+ }
+
+ /**
+ * Updates part of an Azure Monitor Workspace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureMonitorWorkspaceName The name of the Azure Monitor Workspace. The name is case insensitive.
+ * @param properties The resource properties to be updated.
+ * @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 Azure Monitor Workspace definition along with {@link Response} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> updateWithResponseAsync(String resourceGroupName,
+ String azureMonitorWorkspaceName, AzureMonitorWorkspaceResourceInner properties) {
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, azureMonitorWorkspaceName, contentType, accept,
+ properties, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Updates part of an Azure Monitor Workspace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureMonitorWorkspaceName The name of the Azure Monitor Workspace. The name is case insensitive.
+ * @param properties The resource properties to be updated.
+ * @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 Azure Monitor Workspace definition on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono updateAsync(String resourceGroupName,
+ String azureMonitorWorkspaceName, AzureMonitorWorkspaceResourceInner properties) {
+ return updateWithResponseAsync(resourceGroupName, azureMonitorWorkspaceName, properties)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Updates part of an Azure Monitor Workspace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureMonitorWorkspaceName The name of the Azure Monitor Workspace. The name is case insensitive.
+ * @param properties The resource properties to be updated.
+ * @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 Azure Monitor Workspace definition along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response updateWithResponse(String resourceGroupName,
+ String azureMonitorWorkspaceName, AzureMonitorWorkspaceResourceInner properties, Context context) {
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, azureMonitorWorkspaceName, contentType, accept,
+ properties, context);
+ }
+
+ /**
+ * Updates part of an Azure Monitor Workspace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureMonitorWorkspaceName The name of the Azure Monitor Workspace. The name is case insensitive.
+ * @param properties The resource properties to be updated.
+ * @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 Azure Monitor Workspace definition.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public AzureMonitorWorkspaceResourceInner update(String resourceGroupName, String azureMonitorWorkspaceName,
+ AzureMonitorWorkspaceResourceInner properties) {
+ return updateWithResponse(resourceGroupName, azureMonitorWorkspaceName, properties, Context.NONE).getValue();
+ }
+
+ /**
+ * Deletes an Azure Monitor Workspace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureMonitorWorkspaceName The name of the Azure Monitor Workspace. 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 the {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> deleteWithResponseAsync(String resourceGroupName,
+ String azureMonitorWorkspaceName) {
+ return FluxUtil
+ .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, azureMonitorWorkspaceName, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Deletes an Azure Monitor Workspace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureMonitorWorkspaceName The name of the Azure Monitor Workspace. 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 the response body along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Response deleteWithResponse(String resourceGroupName, String azureMonitorWorkspaceName) {
+ return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, azureMonitorWorkspaceName, Context.NONE);
+ }
+
+ /**
+ * Deletes an Azure Monitor Workspace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureMonitorWorkspaceName The name of the Azure Monitor Workspace. 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 the response body along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Response deleteWithResponse(String resourceGroupName, String azureMonitorWorkspaceName,
+ Context context) {
+ return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, azureMonitorWorkspaceName, context);
+ }
+
+ /**
+ * Deletes an Azure Monitor Workspace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureMonitorWorkspaceName The name of the Azure Monitor Workspace. 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 the {@link PollerFlux} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, Void> beginDeleteAsync(String resourceGroupName,
+ String azureMonitorWorkspaceName) {
+ Mono>> mono = deleteWithResponseAsync(resourceGroupName, azureMonitorWorkspaceName);
+ return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class,
+ this.client.getContext());
+ }
+
+ /**
+ * Deletes an Azure Monitor Workspace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureMonitorWorkspaceName The name of the Azure Monitor Workspace. 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 the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginDelete(String resourceGroupName, String azureMonitorWorkspaceName) {
+ Response response = deleteWithResponse(resourceGroupName, azureMonitorWorkspaceName);
+ return this.client.getLroResult(response, Void.class, Void.class, Context.NONE);
+ }
+
+ /**
+ * Deletes an Azure Monitor Workspace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureMonitorWorkspaceName The name of the Azure Monitor Workspace. 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 the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginDelete(String resourceGroupName, String azureMonitorWorkspaceName,
+ Context context) {
+ Response response = deleteWithResponse(resourceGroupName, azureMonitorWorkspaceName, context);
+ return this.client.getLroResult(response, Void.class, Void.class, context);
+ }
+
+ /**
+ * Deletes an Azure Monitor Workspace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureMonitorWorkspaceName The name of the Azure Monitor Workspace. 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 {@link Mono} that completes when a successful response is received.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono deleteAsync(String resourceGroupName, String azureMonitorWorkspaceName) {
+ return beginDeleteAsync(resourceGroupName, azureMonitorWorkspaceName).last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Deletes an Azure Monitor Workspace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureMonitorWorkspaceName The name of the Azure Monitor Workspace. 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void delete(String resourceGroupName, String azureMonitorWorkspaceName) {
+ beginDelete(resourceGroupName, azureMonitorWorkspaceName).getFinalResult();
+ }
+
+ /**
+ * Deletes an Azure Monitor Workspace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureMonitorWorkspaceName The name of the Azure Monitor Workspace. 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void delete(String resourceGroupName, String azureMonitorWorkspaceName, Context context) {
+ beginDelete(resourceGroupName, azureMonitorWorkspaceName, context).getFinalResult();
+ }
+
+ /**
+ * Lists all Azure Monitor Workspaces in the specified 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 the response of a AzureMonitorWorkspaceResource list operation along with {@link PagedResponse} on
+ * successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>
+ listByResourceGroupSinglePageAsync(String resourceGroupName) {
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, accept, context))
+ .>map(res -> new PagedResponseBase<>(res.getRequest(),
+ res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Lists all Azure Monitor Workspaces in the specified 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 the response of a AzureMonitorWorkspaceResource list operation as paginated response with
+ * {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByResourceGroupAsync(String resourceGroupName) {
+ return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName),
+ nextLink -> listByResourceGroupNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Lists all Azure Monitor Workspaces in the specified 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 the response of a AzureMonitorWorkspaceResource list operation along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listByResourceGroupSinglePage(String resourceGroupName) {
+ final String accept = "application/json";
+ Response res
+ = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, accept, Context.NONE);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
+ }
+
+ /**
+ * Lists all Azure Monitor Workspaces in the specified 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 the response of a AzureMonitorWorkspaceResource list operation along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listByResourceGroupSinglePage(String resourceGroupName,
+ Context context) {
+ final String accept = "application/json";
+ Response res
+ = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, accept, context);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
+ }
+
+ /**
+ * Lists all Azure Monitor Workspaces in the specified 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 the response of a AzureMonitorWorkspaceResource list operation as paginated response with
+ * {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByResourceGroup(String resourceGroupName) {
+ return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName),
+ nextLink -> listByResourceGroupNextSinglePage(nextLink));
+ }
+
+ /**
+ * Lists all Azure Monitor Workspaces in the specified 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 the response of a AzureMonitorWorkspaceResource list operation as paginated response with
+ * {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByResourceGroup(String resourceGroupName,
+ Context context) {
+ return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, context),
+ nextLink -> listByResourceGroupNextSinglePage(nextLink, context));
+ }
+
+ /**
+ * Lists all Azure Monitor Workspaces in the specified 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 the response of a AzureMonitorWorkspaceResource list operation along with {@link PagedResponse} on
+ * successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync() {
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), accept, context))
+ .>map(res -> new PagedResponseBase<>(res.getRequest(),
+ res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Lists all Azure Monitor Workspaces in the specified 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 the response of a AzureMonitorWorkspaceResource list operation as paginated response with
+ * {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync() {
+ return new PagedFlux<>(() -> listSinglePageAsync(),
+ nextLink -> listBySubscriptionNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Lists all Azure Monitor Workspaces in the specified 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 the response of a AzureMonitorWorkspaceResource list operation along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listSinglePage() {
+ final String accept = "application/json";
+ Response res = service.listSync(this.client.getEndpoint(),
+ this.client.getApiVersion(), this.client.getSubscriptionId(), accept, Context.NONE);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
+ }
+
+ /**
+ * Lists all Azure Monitor Workspaces in the specified 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 the response of a AzureMonitorWorkspaceResource list operation along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listSinglePage(Context context) {
+ final String accept = "application/json";
+ Response res = service.listSync(this.client.getEndpoint(),
+ this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
+ }
+
+ /**
+ * Lists all Azure Monitor Workspaces in the specified 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 the response of a AzureMonitorWorkspaceResource list operation as paginated response with
+ * {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list() {
+ return new PagedIterable<>(() -> listSinglePage(), nextLink -> listBySubscriptionNextSinglePage(nextLink));
+ }
+
+ /**
+ * Lists all Azure Monitor Workspaces in the specified 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 the response of a AzureMonitorWorkspaceResource list operation as paginated response with
+ * {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(Context context) {
+ return new PagedIterable<>(() -> listSinglePage(context),
+ nextLink -> listBySubscriptionNextSinglePage(nextLink, context));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a AzureMonitorWorkspaceResource list operation along with {@link PagedResponse} on
+ * successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>
+ listByResourceGroupNextSinglePageAsync(String nextLink) {
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(res -> new PagedResponseBase<>(res.getRequest(),
+ res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a AzureMonitorWorkspaceResource list operation along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listByResourceGroupNextSinglePage(String nextLink) {
+ final String accept = "application/json";
+ Response res
+ = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a AzureMonitorWorkspaceResource list operation along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listByResourceGroupNextSinglePage(String nextLink,
+ Context context) {
+ final String accept = "application/json";
+ Response res
+ = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a AzureMonitorWorkspaceResource list operation along with {@link PagedResponse} on
+ * successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>
+ listBySubscriptionNextSinglePageAsync(String nextLink) {
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(res -> new PagedResponseBase<>(res.getRequest(),
+ res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a AzureMonitorWorkspaceResource list operation along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listBySubscriptionNextSinglePage(String nextLink) {
+ final String accept = "application/json";
+ Response res
+ = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a AzureMonitorWorkspaceResource list operation along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listBySubscriptionNextSinglePage(String nextLink,
+ Context context) {
+ final String accept = "application/json";
+ Response res
+ = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
+ }
+}
diff --git a/sdk/monitor/azure-resourcemanager-monitoraccounts/src/main/java/com/azure/resourcemanager/monitoraccounts/implementation/AzureMonitorWorkspacesImpl.java b/sdk/monitor/azure-resourcemanager-monitoraccounts/src/main/java/com/azure/resourcemanager/monitoraccounts/implementation/AzureMonitorWorkspacesImpl.java
new file mode 100644
index 000000000000..765a6ea8198a
--- /dev/null
+++ b/sdk/monitor/azure-resourcemanager-monitoraccounts/src/main/java/com/azure/resourcemanager/monitoraccounts/implementation/AzureMonitorWorkspacesImpl.java
@@ -0,0 +1,151 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.monitoraccounts.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.monitoraccounts.fluent.AzureMonitorWorkspacesClient;
+import com.azure.resourcemanager.monitoraccounts.fluent.models.AzureMonitorWorkspaceResourceInner;
+import com.azure.resourcemanager.monitoraccounts.models.AzureMonitorWorkspaceResource;
+import com.azure.resourcemanager.monitoraccounts.models.AzureMonitorWorkspaces;
+
+public final class AzureMonitorWorkspacesImpl implements AzureMonitorWorkspaces {
+ private static final ClientLogger LOGGER = new ClientLogger(AzureMonitorWorkspacesImpl.class);
+
+ private final AzureMonitorWorkspacesClient innerClient;
+
+ private final com.azure.resourcemanager.monitoraccounts.MonitorAccountsManager serviceManager;
+
+ public AzureMonitorWorkspacesImpl(AzureMonitorWorkspacesClient innerClient,
+ com.azure.resourcemanager.monitoraccounts.MonitorAccountsManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public Response getByResourceGroupWithResponse(String resourceGroupName,
+ String azureMonitorWorkspaceName, Context context) {
+ Response inner = this.serviceClient()
+ .getByResourceGroupWithResponse(resourceGroupName, azureMonitorWorkspaceName, context);
+ return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
+ new AzureMonitorWorkspaceResourceImpl(inner.getValue(), this.manager()));
+ }
+
+ public AzureMonitorWorkspaceResource getByResourceGroup(String resourceGroupName,
+ String azureMonitorWorkspaceName) {
+ AzureMonitorWorkspaceResourceInner inner
+ = this.serviceClient().getByResourceGroup(resourceGroupName, azureMonitorWorkspaceName);
+ if (inner != null) {
+ return new AzureMonitorWorkspaceResourceImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public void deleteByResourceGroup(String resourceGroupName, String azureMonitorWorkspaceName) {
+ this.serviceClient().delete(resourceGroupName, azureMonitorWorkspaceName);
+ }
+
+ public void delete(String resourceGroupName, String azureMonitorWorkspaceName, Context context) {
+ this.serviceClient().delete(resourceGroupName, azureMonitorWorkspaceName, context);
+ }
+
+ public PagedIterable listByResourceGroup(String resourceGroupName) {
+ PagedIterable inner
+ = this.serviceClient().listByResourceGroup(resourceGroupName);
+ return ResourceManagerUtils.mapPage(inner,
+ inner1 -> new AzureMonitorWorkspaceResourceImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable listByResourceGroup(String resourceGroupName, Context context) {
+ PagedIterable inner
+ = this.serviceClient().listByResourceGroup(resourceGroupName, context);
+ return ResourceManagerUtils.mapPage(inner,
+ inner1 -> new AzureMonitorWorkspaceResourceImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list() {
+ PagedIterable inner = this.serviceClient().list();
+ return ResourceManagerUtils.mapPage(inner,
+ inner1 -> new AzureMonitorWorkspaceResourceImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list(Context context) {
+ PagedIterable inner = this.serviceClient().list(context);
+ return ResourceManagerUtils.mapPage(inner,
+ inner1 -> new AzureMonitorWorkspaceResourceImpl(inner1, this.manager()));
+ }
+
+ public AzureMonitorWorkspaceResource 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 azureMonitorWorkspaceName = ResourceManagerUtils.getValueFromIdByName(id, "accounts");
+ if (azureMonitorWorkspaceName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'accounts'.", id)));
+ }
+ return this.getByResourceGroupWithResponse(resourceGroupName, azureMonitorWorkspaceName, 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 azureMonitorWorkspaceName = ResourceManagerUtils.getValueFromIdByName(id, "accounts");
+ if (azureMonitorWorkspaceName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'accounts'.", id)));
+ }
+ return this.getByResourceGroupWithResponse(resourceGroupName, azureMonitorWorkspaceName, 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 azureMonitorWorkspaceName = ResourceManagerUtils.getValueFromIdByName(id, "accounts");
+ if (azureMonitorWorkspaceName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'accounts'.", id)));
+ }
+ this.delete(resourceGroupName, azureMonitorWorkspaceName, Context.NONE);
+ }
+
+ public void 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 azureMonitorWorkspaceName = ResourceManagerUtils.getValueFromIdByName(id, "accounts");
+ if (azureMonitorWorkspaceName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'accounts'.", id)));
+ }
+ this.delete(resourceGroupName, azureMonitorWorkspaceName, context);
+ }
+
+ private AzureMonitorWorkspacesClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.monitoraccounts.MonitorAccountsManager manager() {
+ return this.serviceManager;
+ }
+
+ public AzureMonitorWorkspaceResourceImpl define(String name) {
+ return new AzureMonitorWorkspaceResourceImpl(name, this.manager());
+ }
+}
diff --git a/sdk/monitor/azure-resourcemanager-monitoraccounts/src/main/java/com/azure/resourcemanager/monitoraccounts/implementation/BackgroundVisualizationImpl.java b/sdk/monitor/azure-resourcemanager-monitoraccounts/src/main/java/com/azure/resourcemanager/monitoraccounts/implementation/BackgroundVisualizationImpl.java
new file mode 100644
index 000000000000..e12f18e901e9
--- /dev/null
+++ b/sdk/monitor/azure-resourcemanager-monitoraccounts/src/main/java/com/azure/resourcemanager/monitoraccounts/implementation/BackgroundVisualizationImpl.java
@@ -0,0 +1,37 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.monitoraccounts.implementation;
+
+import com.azure.resourcemanager.monitoraccounts.fluent.models.BackgroundVisualizationInner;
+import com.azure.resourcemanager.monitoraccounts.models.BackgroundVisualization;
+import com.azure.resourcemanager.monitoraccounts.models.Origin;
+
+public final class BackgroundVisualizationImpl implements BackgroundVisualization {
+ private BackgroundVisualizationInner innerObject;
+
+ private final com.azure.resourcemanager.monitoraccounts.MonitorAccountsManager serviceManager;
+
+ BackgroundVisualizationImpl(BackgroundVisualizationInner innerObject,
+ com.azure.resourcemanager.monitoraccounts.MonitorAccountsManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public String visualization() {
+ return this.innerModel().visualization();
+ }
+
+ public Origin origin() {
+ return this.innerModel().origin();
+ }
+
+ public BackgroundVisualizationInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.monitoraccounts.MonitorAccountsManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/monitor/azure-resourcemanager-monitoraccounts/src/main/java/com/azure/resourcemanager/monitoraccounts/implementation/InvestigationResultImpl.java b/sdk/monitor/azure-resourcemanager-monitoraccounts/src/main/java/com/azure/resourcemanager/monitoraccounts/implementation/InvestigationResultImpl.java
new file mode 100644
index 000000000000..3d7a1a5c07bb
--- /dev/null
+++ b/sdk/monitor/azure-resourcemanager-monitoraccounts/src/main/java/com/azure/resourcemanager/monitoraccounts/implementation/InvestigationResultImpl.java
@@ -0,0 +1,50 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.monitoraccounts.implementation;
+
+import com.azure.resourcemanager.monitoraccounts.fluent.models.InvestigationResultInner;
+import com.azure.resourcemanager.monitoraccounts.models.InvestigationResult;
+import com.azure.resourcemanager.monitoraccounts.models.Origin;
+import java.time.OffsetDateTime;
+
+public final class InvestigationResultImpl implements InvestigationResult {
+ private InvestigationResultInner innerObject;
+
+ private final com.azure.resourcemanager.monitoraccounts.MonitorAccountsManager serviceManager;
+
+ InvestigationResultImpl(InvestigationResultInner innerObject,
+ com.azure.resourcemanager.monitoraccounts.MonitorAccountsManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public Origin origin() {
+ return this.innerModel().origin();
+ }
+
+ public OffsetDateTime createdAt() {
+ return this.innerModel().createdAt();
+ }
+
+ public OffsetDateTime lastModifiedAt() {
+ return this.innerModel().lastModifiedAt();
+ }
+
+ public String result() {
+ return this.innerModel().result();
+ }
+
+ public InvestigationResultInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.monitoraccounts.MonitorAccountsManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/monitor/azure-resourcemanager-monitoraccounts/src/main/java/com/azure/resourcemanager/monitoraccounts/implementation/IssueResourceImpl.java b/sdk/monitor/azure-resourcemanager-monitoraccounts/src/main/java/com/azure/resourcemanager/monitoraccounts/implementation/IssueResourceImpl.java
new file mode 100644
index 000000000000..4c031fdcdfe3
--- /dev/null
+++ b/sdk/monitor/azure-resourcemanager-monitoraccounts/src/main/java/com/azure/resourcemanager/monitoraccounts/implementation/IssueResourceImpl.java
@@ -0,0 +1,238 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.monitoraccounts.implementation;
+
+import com.azure.core.http.rest.Response;
+import com.azure.core.management.SystemData;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.monitoraccounts.fluent.models.BackgroundVisualizationInner;
+import com.azure.resourcemanager.monitoraccounts.fluent.models.InvestigationResultInner;
+import com.azure.resourcemanager.monitoraccounts.fluent.models.IssueResourceInner;
+import com.azure.resourcemanager.monitoraccounts.fluent.models.RelatedAlertsInner;
+import com.azure.resourcemanager.monitoraccounts.fluent.models.RelatedResourcesInner;
+import com.azure.resourcemanager.monitoraccounts.models.BackgroundVisualization;
+import com.azure.resourcemanager.monitoraccounts.models.FetchInvestigationResultParameters;
+import com.azure.resourcemanager.monitoraccounts.models.InvestigationResult;
+import com.azure.resourcemanager.monitoraccounts.models.IssueProperties;
+import com.azure.resourcemanager.monitoraccounts.models.IssueResource;
+import com.azure.resourcemanager.monitoraccounts.models.ListParameter;
+import com.azure.resourcemanager.monitoraccounts.models.PagedRelatedAlert;
+import com.azure.resourcemanager.monitoraccounts.models.PagedRelatedResource;
+import com.azure.resourcemanager.monitoraccounts.models.RelatedAlerts;
+import com.azure.resourcemanager.monitoraccounts.models.RelatedResources;
+
+public final class IssueResourceImpl implements IssueResource, IssueResource.Definition, IssueResource.Update {
+ private IssueResourceInner innerObject;
+
+ private final com.azure.resourcemanager.monitoraccounts.MonitorAccountsManager serviceManager;
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
+ public IssueProperties properties() {
+ return this.innerModel().properties();
+ }
+
+ public SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
+ public String resourceGroupName() {
+ return resourceGroupName;
+ }
+
+ public IssueResourceInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.monitoraccounts.MonitorAccountsManager manager() {
+ return this.serviceManager;
+ }
+
+ private String resourceGroupName;
+
+ private String azureMonitorWorkspaceName;
+
+ private String issueName;
+
+ private String createRelated;
+
+ public IssueResourceImpl withExistingAccount(String resourceGroupName, String azureMonitorWorkspaceName) {
+ this.resourceGroupName = resourceGroupName;
+ this.azureMonitorWorkspaceName = azureMonitorWorkspaceName;
+ return this;
+ }
+
+ public IssueResource create() {
+ this.innerObject = serviceManager.serviceClient()
+ .getIssues()
+ .createWithResponse(resourceGroupName, azureMonitorWorkspaceName, issueName, this.innerModel(),
+ createRelated, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public IssueResource create(Context context) {
+ this.innerObject = serviceManager.serviceClient()
+ .getIssues()
+ .createWithResponse(resourceGroupName, azureMonitorWorkspaceName, issueName, this.innerModel(),
+ createRelated, context)
+ .getValue();
+ return this;
+ }
+
+ IssueResourceImpl(String name, com.azure.resourcemanager.monitoraccounts.MonitorAccountsManager serviceManager) {
+ this.innerObject = new IssueResourceInner();
+ this.serviceManager = serviceManager;
+ this.issueName = name;
+ this.createRelated = null;
+ }
+
+ public IssueResourceImpl update() {
+ return this;
+ }
+
+ public IssueResource apply() {
+ this.innerObject = serviceManager.serviceClient()
+ .getIssues()
+ .updateWithResponse(resourceGroupName, azureMonitorWorkspaceName, issueName, this.innerModel(),
+ Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public IssueResource apply(Context context) {
+ this.innerObject = serviceManager.serviceClient()
+ .getIssues()
+ .updateWithResponse(resourceGroupName, azureMonitorWorkspaceName, issueName, this.innerModel(), context)
+ .getValue();
+ return this;
+ }
+
+ IssueResourceImpl(IssueResourceInner innerObject,
+ com.azure.resourcemanager.monitoraccounts.MonitorAccountsManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups");
+ this.azureMonitorWorkspaceName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "accounts");
+ this.issueName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "issues");
+ }
+
+ public IssueResource refresh() {
+ this.innerObject = serviceManager.serviceClient()
+ .getIssues()
+ .getWithResponse(resourceGroupName, azureMonitorWorkspaceName, issueName, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public IssueResource refresh(Context context) {
+ this.innerObject = serviceManager.serviceClient()
+ .getIssues()
+ .getWithResponse(resourceGroupName, azureMonitorWorkspaceName, issueName, context)
+ .getValue();
+ return this;
+ }
+
+ public Response addInvestigationResultWithResponse(InvestigationResultInner body,
+ Context context) {
+ return serviceManager.issues()
+ .addInvestigationResultWithResponse(resourceGroupName, azureMonitorWorkspaceName, issueName, body, context);
+ }
+
+ public InvestigationResult addInvestigationResult(InvestigationResultInner body) {
+ return serviceManager.issues()
+ .addInvestigationResult(resourceGroupName, azureMonitorWorkspaceName, issueName, body);
+ }
+
+ public Response fetchInvestigationResultWithResponse(FetchInvestigationResultParameters body,
+ Context context) {
+ return serviceManager.issues()
+ .fetchInvestigationResultWithResponse(resourceGroupName, azureMonitorWorkspaceName, issueName, body,
+ context);
+ }
+
+ public InvestigationResult fetchInvestigationResult(FetchInvestigationResultParameters body) {
+ return serviceManager.issues()
+ .fetchInvestigationResult(resourceGroupName, azureMonitorWorkspaceName, issueName, body);
+ }
+
+ public Response listAlertsWithResponse(ListParameter body, Context context) {
+ return serviceManager.issues()
+ .listAlertsWithResponse(resourceGroupName, azureMonitorWorkspaceName, issueName, body, context);
+ }
+
+ public PagedRelatedAlert listAlerts(ListParameter body) {
+ return serviceManager.issues().listAlerts(resourceGroupName, azureMonitorWorkspaceName, issueName, body);
+ }
+
+ public Response addOrUpdateAlertsWithResponse(RelatedAlertsInner body, Context context) {
+ return serviceManager.issues()
+ .addOrUpdateAlertsWithResponse(resourceGroupName, azureMonitorWorkspaceName, issueName, body, context);
+ }
+
+ public RelatedAlerts addOrUpdateAlerts(RelatedAlertsInner body) {
+ return serviceManager.issues().addOrUpdateAlerts(resourceGroupName, azureMonitorWorkspaceName, issueName, body);
+ }
+
+ public Response listResourcesWithResponse(ListParameter body, Context context) {
+ return serviceManager.issues()
+ .listResourcesWithResponse(resourceGroupName, azureMonitorWorkspaceName, issueName, body, context);
+ }
+
+ public PagedRelatedResource listResources(ListParameter body) {
+ return serviceManager.issues().listResources(resourceGroupName, azureMonitorWorkspaceName, issueName, body);
+ }
+
+ public Response addOrUpdateResourcesWithResponse(RelatedResourcesInner body, Context context) {
+ return serviceManager.issues()
+ .addOrUpdateResourcesWithResponse(resourceGroupName, azureMonitorWorkspaceName, issueName, body, context);
+ }
+
+ public RelatedResources addOrUpdateResources(RelatedResourcesInner body) {
+ return serviceManager.issues()
+ .addOrUpdateResources(resourceGroupName, azureMonitorWorkspaceName, issueName, body);
+ }
+
+ public Response fetchBackgroundVisualizationWithResponse(Context context) {
+ return serviceManager.issues()
+ .fetchBackgroundVisualizationWithResponse(resourceGroupName, azureMonitorWorkspaceName, issueName, context);
+ }
+
+ public BackgroundVisualization fetchBackgroundVisualization() {
+ return serviceManager.issues()
+ .fetchBackgroundVisualization(resourceGroupName, azureMonitorWorkspaceName, issueName);
+ }
+
+ public Response setBackgroundVisualizationWithResponse(BackgroundVisualizationInner body, Context context) {
+ return serviceManager.issues()
+ .setBackgroundVisualizationWithResponse(resourceGroupName, azureMonitorWorkspaceName, issueName, body,
+ context);
+ }
+
+ public void setBackgroundVisualization(BackgroundVisualizationInner body) {
+ serviceManager.issues()
+ .setBackgroundVisualization(resourceGroupName, azureMonitorWorkspaceName, issueName, body);
+ }
+
+ public IssueResourceImpl withProperties(IssueProperties properties) {
+ this.innerModel().withProperties(properties);
+ return this;
+ }
+
+ public IssueResourceImpl withRelated(String related) {
+ this.createRelated = related;
+ return this;
+ }
+}
diff --git a/sdk/monitor/azure-resourcemanager-monitoraccounts/src/main/java/com/azure/resourcemanager/monitoraccounts/implementation/IssuesClientImpl.java b/sdk/monitor/azure-resourcemanager-monitoraccounts/src/main/java/com/azure/resourcemanager/monitoraccounts/implementation/IssuesClientImpl.java
new file mode 100644
index 000000000000..f8fe86bced26
--- /dev/null
+++ b/sdk/monitor/azure-resourcemanager-monitoraccounts/src/main/java/com/azure/resourcemanager/monitoraccounts/implementation/IssuesClientImpl.java
@@ -0,0 +1,1531 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.monitoraccounts.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.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.resourcemanager.monitoraccounts.fluent.IssuesClient;
+import com.azure.resourcemanager.monitoraccounts.fluent.models.BackgroundVisualizationInner;
+import com.azure.resourcemanager.monitoraccounts.fluent.models.InvestigationResultInner;
+import com.azure.resourcemanager.monitoraccounts.fluent.models.IssueResourceInner;
+import com.azure.resourcemanager.monitoraccounts.fluent.models.PagedRelatedAlertInner;
+import com.azure.resourcemanager.monitoraccounts.fluent.models.PagedRelatedResourceInner;
+import com.azure.resourcemanager.monitoraccounts.fluent.models.RelatedAlertsInner;
+import com.azure.resourcemanager.monitoraccounts.fluent.models.RelatedResourcesInner;
+import com.azure.resourcemanager.monitoraccounts.implementation.models.IssueResourceListResult;
+import com.azure.resourcemanager.monitoraccounts.models.FetchInvestigationResultParameters;
+import com.azure.resourcemanager.monitoraccounts.models.ListParameter;
+import reactor.core.publisher.Mono;
+
+/**
+ * An instance of this class provides access to all the operations defined in IssuesClient.
+ */
+public final class IssuesClientImpl implements IssuesClient {
+ /**
+ * The proxy service used to perform REST calls.
+ */
+ private final IssuesService service;
+
+ /**
+ * The service client containing this operation class.
+ */
+ private final MonitorAccountsManagementClientImpl client;
+
+ /**
+ * Initializes an instance of IssuesClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ IssuesClientImpl(MonitorAccountsManagementClientImpl client) {
+ this.service = RestProxy.create(IssuesService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for MonitorAccountsManagementClientIssues to be used by the proxy service
+ * to perform REST calls.
+ */
+ @Host("{endpoint}")
+ @ServiceInterface(name = "MonitorAccountsManagementClientIssues")
+ public interface IssuesService {
+ @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Monitor/accounts/{azureMonitorWorkspaceName}/issues/{issueName}")
+ @ExpectedResponses({ 200, 201 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> create(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("azureMonitorWorkspaceName") String azureMonitorWorkspaceName,
+ @PathParam("issueName") String issueName, @QueryParam("related") String related,
+ @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept,
+ @BodyParam("application/json") IssueResourceInner resource, Context context);
+
+ @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Monitor/accounts/{azureMonitorWorkspaceName}/issues/{issueName}")
+ @ExpectedResponses({ 200, 201 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response createSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("azureMonitorWorkspaceName") String azureMonitorWorkspaceName,
+ @PathParam("issueName") String issueName, @QueryParam("related") String related,
+ @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept,
+ @BodyParam("application/json") IssueResourceInner resource, Context context);
+
+ @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Monitor/accounts/{azureMonitorWorkspaceName}/issues/{issueName}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> update(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("azureMonitorWorkspaceName") String azureMonitorWorkspaceName,
+ @PathParam("issueName") String issueName, @HeaderParam("Content-Type") String contentType,
+ @HeaderParam("Accept") String accept, @BodyParam("application/json") IssueResourceInner properties,
+ Context context);
+
+ @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Monitor/accounts/{azureMonitorWorkspaceName}/issues/{issueName}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response updateSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("azureMonitorWorkspaceName") String azureMonitorWorkspaceName,
+ @PathParam("issueName") String issueName, @HeaderParam("Content-Type") String contentType,
+ @HeaderParam("Accept") String accept, @BodyParam("application/json") IssueResourceInner properties,
+ Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Monitor/accounts/{azureMonitorWorkspaceName}/issues/{issueName}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> get(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("azureMonitorWorkspaceName") String azureMonitorWorkspaceName,
+ @PathParam("issueName") String issueName, @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Monitor/accounts/{azureMonitorWorkspaceName}/issues/{issueName}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response getSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("azureMonitorWorkspaceName") String azureMonitorWorkspaceName,
+ @PathParam("issueName") String issueName, @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" })
+ @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Monitor/accounts/{azureMonitorWorkspaceName}/issues/{issueName}")
+ @ExpectedResponses({ 200, 204 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> delete(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("azureMonitorWorkspaceName") String azureMonitorWorkspaceName,
+ @PathParam("issueName") String issueName, Context context);
+
+ @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" })
+ @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Monitor/accounts/{azureMonitorWorkspaceName}/issues/{issueName}")
+ @ExpectedResponses({ 200, 204 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response deleteSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("azureMonitorWorkspaceName") String azureMonitorWorkspaceName,
+ @PathParam("issueName") String issueName, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Monitor/accounts/{azureMonitorWorkspaceName}/issues")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> list(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("azureMonitorWorkspaceName") String azureMonitorWorkspaceName,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Monitor/accounts/{azureMonitorWorkspaceName}/issues")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response listSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("azureMonitorWorkspaceName") String azureMonitorWorkspaceName,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Monitor/accounts/{azureMonitorWorkspaceName}/issues/{issueName}/addInvestigationResult")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> addInvestigationResult(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("azureMonitorWorkspaceName") String azureMonitorWorkspaceName,
+ @PathParam("issueName") String issueName, @HeaderParam("Content-Type") String contentType,
+ @HeaderParam("Accept") String accept, @BodyParam("application/json") InvestigationResultInner body,
+ Context context);
+
+ @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Monitor/accounts/{azureMonitorWorkspaceName}/issues/{issueName}/addInvestigationResult")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response addInvestigationResultSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("azureMonitorWorkspaceName") String azureMonitorWorkspaceName,
+ @PathParam("issueName") String issueName, @HeaderParam("Content-Type") String contentType,
+ @HeaderParam("Accept") String accept, @BodyParam("application/json") InvestigationResultInner body,
+ Context context);
+
+ @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Monitor/accounts/{azureMonitorWorkspaceName}/issues/{issueName}/fetchInvestigationResult")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> fetchInvestigationResult(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("azureMonitorWorkspaceName") String azureMonitorWorkspaceName,
+ @PathParam("issueName") String issueName, @HeaderParam("Content-Type") String contentType,
+ @HeaderParam("Accept") String accept,
+ @BodyParam("application/json") FetchInvestigationResultParameters body, Context context);
+
+ @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Monitor/accounts/{azureMonitorWorkspaceName}/issues/{issueName}/fetchInvestigationResult")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response fetchInvestigationResultSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("azureMonitorWorkspaceName") String azureMonitorWorkspaceName,
+ @PathParam("issueName") String issueName, @HeaderParam("Content-Type") String contentType,
+ @HeaderParam("Accept") String accept,
+ @BodyParam("application/json") FetchInvestigationResultParameters body, Context context);
+
+ @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Monitor/accounts/{azureMonitorWorkspaceName}/issues/{issueName}/listAlerts")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listAlerts(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("azureMonitorWorkspaceName") String azureMonitorWorkspaceName,
+ @PathParam("issueName") String issueName, @HeaderParam("Content-Type") String contentType,
+ @HeaderParam("Accept") String accept, @BodyParam("application/json") ListParameter body, Context context);
+
+ @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Monitor/accounts/{azureMonitorWorkspaceName}/issues/{issueName}/listAlerts")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response listAlertsSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("azureMonitorWorkspaceName") String azureMonitorWorkspaceName,
+ @PathParam("issueName") String issueName, @HeaderParam("Content-Type") String contentType,
+ @HeaderParam("Accept") String accept, @BodyParam("application/json") ListParameter body, Context context);
+
+ @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Monitor/accounts/{azureMonitorWorkspaceName}/issues/{issueName}/addOrUpdateAlerts")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> addOrUpdateAlerts(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("azureMonitorWorkspaceName") String azureMonitorWorkspaceName,
+ @PathParam("issueName") String issueName, @HeaderParam("Content-Type") String contentType,
+ @HeaderParam("Accept") String accept, @BodyParam("application/json") RelatedAlertsInner body,
+ Context context);
+
+ @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Monitor/accounts/{azureMonitorWorkspaceName}/issues/{issueName}/addOrUpdateAlerts")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response addOrUpdateAlertsSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("azureMonitorWorkspaceName") String azureMonitorWorkspaceName,
+ @PathParam("issueName") String issueName, @HeaderParam("Content-Type") String contentType,
+ @HeaderParam("Accept") String accept, @BodyParam("application/json") RelatedAlertsInner body,
+ Context context);
+
+ @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Monitor/accounts/{azureMonitorWorkspaceName}/issues/{issueName}/listResources")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listResources(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("azureMonitorWorkspaceName") String azureMonitorWorkspaceName,
+ @PathParam("issueName") String issueName, @HeaderParam("Content-Type") String contentType,
+ @HeaderParam("Accept") String accept, @BodyParam("application/json") ListParameter body, Context context);
+
+ @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Monitor/accounts/{azureMonitorWorkspaceName}/issues/{issueName}/listResources")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response listResourcesSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("azureMonitorWorkspaceName") String azureMonitorWorkspaceName,
+ @PathParam("issueName") String issueName, @HeaderParam("Content-Type") String contentType,
+ @HeaderParam("Accept") String accept, @BodyParam("application/json") ListParameter body, Context context);
+
+ @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Monitor/accounts/{azureMonitorWorkspaceName}/issues/{issueName}/addOrUpdateResources")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> addOrUpdateResources(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("azureMonitorWorkspaceName") String azureMonitorWorkspaceName,
+ @PathParam("issueName") String issueName, @HeaderParam("Content-Type") String contentType,
+ @HeaderParam("Accept") String accept, @BodyParam("application/json") RelatedResourcesInner body,
+ Context context);
+
+ @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Monitor/accounts/{azureMonitorWorkspaceName}/issues/{issueName}/addOrUpdateResources")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response addOrUpdateResourcesSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("azureMonitorWorkspaceName") String azureMonitorWorkspaceName,
+ @PathParam("issueName") String issueName, @HeaderParam("Content-Type") String contentType,
+ @HeaderParam("Accept") String accept, @BodyParam("application/json") RelatedResourcesInner body,
+ Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Monitor/accounts/{azureMonitorWorkspaceName}/issues/{issueName}/fetchBackgroundVisualization")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> fetchBackgroundVisualization(
+ @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("azureMonitorWorkspaceName") String azureMonitorWorkspaceName,
+ @PathParam("issueName") String issueName, @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Monitor/accounts/{azureMonitorWorkspaceName}/issues/{issueName}/fetchBackgroundVisualization")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response fetchBackgroundVisualizationSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("azureMonitorWorkspaceName") String azureMonitorWorkspaceName,
+ @PathParam("issueName") String issueName, @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Accept: application/json;q=0.9" })
+ @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Monitor/accounts/{azureMonitorWorkspaceName}/issues/{issueName}/setBackgroundVisualization")
+ @ExpectedResponses({ 204 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> setBackgroundVisualization(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("azureMonitorWorkspaceName") String azureMonitorWorkspaceName,
+ @PathParam("issueName") String issueName, @HeaderParam("Content-Type") String contentType,
+ @BodyParam("application/json") BackgroundVisualizationInner body, Context context);
+
+ @Headers({ "Accept: application/json;q=0.9" })
+ @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Monitor/accounts/{azureMonitorWorkspaceName}/issues/{issueName}/setBackgroundVisualization")
+ @ExpectedResponses({ 204 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response setBackgroundVisualizationSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("azureMonitorWorkspaceName") String azureMonitorWorkspaceName,
+ @PathParam("issueName") String issueName, @HeaderParam("Content-Type") String contentType,
+ @BodyParam("application/json") BackgroundVisualizationInner body, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response listNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context);
+ }
+
+ /**
+ * Create a new issue or updates an existing one.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureMonitorWorkspaceName The name of the Azure Monitor Workspace. The name is case insensitive.
+ * @param issueName The name of the IssueResource.
+ * @param resource Resource create parameters.
+ * @param related Related resource or alert that is to be added to the issue (default: empty - the issue will be
+ * created without any related resources or alerts).
+ * @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 Issue resource along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> createWithResponseAsync(String resourceGroupName,
+ String azureMonitorWorkspaceName, String issueName, IssueResourceInner resource, String related) {
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, azureMonitorWorkspaceName, issueName, related,
+ contentType, accept, resource, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Create a new issue or updates an existing one.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureMonitorWorkspaceName The name of the Azure Monitor Workspace. The name is case insensitive.
+ * @param issueName The name of the IssueResource.
+ * @param resource Resource create parameters.
+ * @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 Issue resource on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createAsync(String resourceGroupName, String azureMonitorWorkspaceName,
+ String issueName, IssueResourceInner resource) {
+ final String related = null;
+ return createWithResponseAsync(resourceGroupName, azureMonitorWorkspaceName, issueName, resource, related)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Create a new issue or updates an existing one.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureMonitorWorkspaceName The name of the Azure Monitor Workspace. The name is case insensitive.
+ * @param issueName The name of the IssueResource.
+ * @param resource Resource create parameters.
+ * @param related Related resource or alert that is to be added to the issue (default: empty - the issue will be
+ * created without any related resources or alerts).
+ * @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 Issue resource along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response createWithResponse(String resourceGroupName, String azureMonitorWorkspaceName,
+ String issueName, IssueResourceInner resource, String related, Context context) {
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, azureMonitorWorkspaceName, issueName, related,
+ contentType, accept, resource, context);
+ }
+
+ /**
+ * Create a new issue or updates an existing one.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureMonitorWorkspaceName The name of the Azure Monitor Workspace. The name is case insensitive.
+ * @param issueName The name of the IssueResource.
+ * @param resource Resource create parameters.
+ * @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 Issue resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public IssueResourceInner create(String resourceGroupName, String azureMonitorWorkspaceName, String issueName,
+ IssueResourceInner resource) {
+ final String related = null;
+ return createWithResponse(resourceGroupName, azureMonitorWorkspaceName, issueName, resource, related,
+ Context.NONE).getValue();
+ }
+
+ /**
+ * Update an issue.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureMonitorWorkspaceName The name of the Azure Monitor Workspace. The name is case insensitive.
+ * @param issueName The name of the IssueResource.
+ * @param properties The resource properties to be updated.
+ * @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 Issue resource along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> updateWithResponseAsync(String resourceGroupName,
+ String azureMonitorWorkspaceName, String issueName, IssueResourceInner properties) {
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, azureMonitorWorkspaceName, issueName, contentType,
+ accept, properties, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Update an issue.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureMonitorWorkspaceName The name of the Azure Monitor Workspace. The name is case insensitive.
+ * @param issueName The name of the IssueResource.
+ * @param properties The resource properties to be updated.
+ * @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 Issue resource on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono updateAsync(String resourceGroupName, String azureMonitorWorkspaceName,
+ String issueName, IssueResourceInner properties) {
+ return updateWithResponseAsync(resourceGroupName, azureMonitorWorkspaceName, issueName, properties)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Update an issue.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureMonitorWorkspaceName The name of the Azure Monitor Workspace. The name is case insensitive.
+ * @param issueName The name of the IssueResource.
+ * @param properties The resource properties to be updated.
+ * @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 Issue resource along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response updateWithResponse(String resourceGroupName, String azureMonitorWorkspaceName,
+ String issueName, IssueResourceInner properties, Context context) {
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, azureMonitorWorkspaceName, issueName, contentType,
+ accept, properties, context);
+ }
+
+ /**
+ * Update an issue.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureMonitorWorkspaceName The name of the Azure Monitor Workspace. The name is case insensitive.
+ * @param issueName The name of the IssueResource.
+ * @param properties The resource properties to be updated.
+ * @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 Issue resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public IssueResourceInner update(String resourceGroupName, String azureMonitorWorkspaceName, String issueName,
+ IssueResourceInner properties) {
+ return updateWithResponse(resourceGroupName, azureMonitorWorkspaceName, issueName, properties, Context.NONE)
+ .getValue();
+ }
+
+ /**
+ * Get issue properties.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureMonitorWorkspaceName The name of the Azure Monitor Workspace. The name is case insensitive.
+ * @param issueName The name of the IssueResource.
+ * @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 issue properties along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(String resourceGroupName,
+ String azureMonitorWorkspaceName, String issueName) {
+ final String accept = "application/json";
+ return FluxUtil.withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, azureMonitorWorkspaceName, issueName, accept, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get issue properties.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureMonitorWorkspaceName The name of the Azure Monitor Workspace. The name is case insensitive.
+ * @param issueName The name of the IssueResource.
+ * @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 issue properties on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync(String resourceGroupName, String azureMonitorWorkspaceName,
+ String issueName) {
+ return getWithResponseAsync(resourceGroupName, azureMonitorWorkspaceName, issueName)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Get issue properties.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureMonitorWorkspaceName The name of the Azure Monitor Workspace. The name is case insensitive.
+ * @param issueName The name of the IssueResource.
+ * @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 issue properties along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getWithResponse(String resourceGroupName, String azureMonitorWorkspaceName,
+ String issueName, Context context) {
+ final String accept = "application/json";
+ return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
+ resourceGroupName, azureMonitorWorkspaceName, issueName, accept, context);
+ }
+
+ /**
+ * Get issue properties.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureMonitorWorkspaceName The name of the Azure Monitor Workspace. The name is case insensitive.
+ * @param issueName The name of the IssueResource.
+ * @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 issue properties.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public IssueResourceInner get(String resourceGroupName, String azureMonitorWorkspaceName, String issueName) {
+ return getWithResponse(resourceGroupName, azureMonitorWorkspaceName, issueName, Context.NONE).getValue();
+ }
+
+ /**
+ * Delete an issue.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureMonitorWorkspaceName The name of the Azure Monitor Workspace. The name is case insensitive.
+ * @param issueName The name of the IssueResource.
+ * @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 azureMonitorWorkspaceName,
+ String issueName) {
+ return FluxUtil
+ .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, azureMonitorWorkspaceName, issueName, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Delete an issue.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureMonitorWorkspaceName The name of the Azure Monitor Workspace. The name is case insensitive.
+ * @param issueName The name of the IssueResource.
+ * @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 azureMonitorWorkspaceName, String issueName) {
+ return deleteWithResponseAsync(resourceGroupName, azureMonitorWorkspaceName, issueName)
+ .flatMap(ignored -> Mono.empty());
+ }
+
+ /**
+ * Delete an issue.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureMonitorWorkspaceName The name of the Azure Monitor Workspace. The name is case insensitive.
+ * @param issueName The name of the IssueResource.
+ * @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 azureMonitorWorkspaceName,
+ String issueName, Context context) {
+ return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, azureMonitorWorkspaceName, issueName, context);
+ }
+
+ /**
+ * Delete an issue.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureMonitorWorkspaceName The name of the Azure Monitor Workspace. The name is case insensitive.
+ * @param issueName The name of the IssueResource.
+ * @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 azureMonitorWorkspaceName, String issueName) {
+ deleteWithResponse(resourceGroupName, azureMonitorWorkspaceName, issueName, Context.NONE);
+ }
+
+ /**
+ * List all issues under the parent.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureMonitorWorkspaceName The name of the Azure Monitor Workspace. 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 the response of a IssueResource list operation along with {@link PagedResponse} on successful completion
+ * of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(String resourceGroupName,
+ String azureMonitorWorkspaceName) {
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, azureMonitorWorkspaceName, accept, context))
+ .>map(res -> new PagedResponseBase<>(res.getRequest(),
+ res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * List all issues under the parent.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureMonitorWorkspaceName The name of the Azure Monitor Workspace. 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 the response of a IssueResource list operation as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(String resourceGroupName, String azureMonitorWorkspaceName) {
+ return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, azureMonitorWorkspaceName),
+ nextLink -> listNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * List all issues under the parent.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureMonitorWorkspaceName The name of the Azure Monitor Workspace. 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 the response of a IssueResource list operation along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listSinglePage(String resourceGroupName,
+ String azureMonitorWorkspaceName) {
+ final String accept = "application/json";
+ Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, azureMonitorWorkspaceName, accept, Context.NONE);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
+ }
+
+ /**
+ * List all issues under the parent.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureMonitorWorkspaceName The name of the Azure Monitor Workspace. 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 the response of a IssueResource list operation along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listSinglePage(String resourceGroupName, String azureMonitorWorkspaceName,
+ Context context) {
+ final String accept = "application/json";
+ Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, azureMonitorWorkspaceName, accept, context);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
+ }
+
+ /**
+ * List all issues under the parent.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureMonitorWorkspaceName The name of the Azure Monitor Workspace. 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 the response of a IssueResource list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(String resourceGroupName, String azureMonitorWorkspaceName) {
+ return new PagedIterable<>(() -> listSinglePage(resourceGroupName, azureMonitorWorkspaceName),
+ nextLink -> listNextSinglePage(nextLink));
+ }
+
+ /**
+ * List all issues under the parent.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureMonitorWorkspaceName The name of the Azure Monitor Workspace. 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 the response of a IssueResource list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(String resourceGroupName, String azureMonitorWorkspaceName,
+ Context context) {
+ return new PagedIterable<>(() -> listSinglePage(resourceGroupName, azureMonitorWorkspaceName, context),
+ nextLink -> listNextSinglePage(nextLink, context));
+ }
+
+ /**
+ * Adds investigation result.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureMonitorWorkspaceName The name of the Azure Monitor Workspace. The name is case insensitive.
+ * @param issueName The name of the IssueResource.
+ * @param body The content of the action request.
+ * @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 details about the investigation result along with {@link Response} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> addInvestigationResultWithResponseAsync(String resourceGroupName,
+ String azureMonitorWorkspaceName, String issueName, InvestigationResultInner body) {
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.addInvestigationResult(this.client.getEndpoint(),
+ this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName,
+ azureMonitorWorkspaceName, issueName, contentType, accept, body, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Adds investigation result.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureMonitorWorkspaceName The name of the Azure Monitor Workspace. The name is case insensitive.
+ * @param issueName The name of the IssueResource.
+ * @param body The content of the action request.
+ * @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 details about the investigation result on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono addInvestigationResultAsync(String resourceGroupName,
+ String azureMonitorWorkspaceName, String issueName, InvestigationResultInner body) {
+ return addInvestigationResultWithResponseAsync(resourceGroupName, azureMonitorWorkspaceName, issueName, body)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Adds investigation result.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureMonitorWorkspaceName The name of the Azure Monitor Workspace. The name is case insensitive.
+ * @param issueName The name of the IssueResource.
+ * @param body The content of the action request.
+ * @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 details about the investigation result along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response addInvestigationResultWithResponse(String resourceGroupName,
+ String azureMonitorWorkspaceName, String issueName, InvestigationResultInner body, Context context) {
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return service.addInvestigationResultSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, azureMonitorWorkspaceName, issueName, contentType,
+ accept, body, context);
+ }
+
+ /**
+ * Adds investigation result.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureMonitorWorkspaceName The name of the Azure Monitor Workspace. The name is case insensitive.
+ * @param issueName The name of the IssueResource.
+ * @param body The content of the action request.
+ * @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 details about the investigation result.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public InvestigationResultInner addInvestigationResult(String resourceGroupName, String azureMonitorWorkspaceName,
+ String issueName, InvestigationResultInner body) {
+ return addInvestigationResultWithResponse(resourceGroupName, azureMonitorWorkspaceName, issueName, body,
+ Context.NONE).getValue();
+ }
+
+ /**
+ * Fetch investigation result.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureMonitorWorkspaceName The name of the Azure Monitor Workspace. The name is case insensitive.
+ * @param issueName The name of the IssueResource.
+ * @param body The content of the action request.
+ * @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 details about the investigation result along with {@link Response} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> fetchInvestigationResultWithResponseAsync(String resourceGroupName,
+ String azureMonitorWorkspaceName, String issueName, FetchInvestigationResultParameters body) {
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.fetchInvestigationResult(this.client.getEndpoint(),
+ this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName,
+ azureMonitorWorkspaceName, issueName, contentType, accept, body, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Fetch investigation result.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureMonitorWorkspaceName The name of the Azure Monitor Workspace. The name is case insensitive.
+ * @param issueName The name of the IssueResource.
+ * @param body The content of the action request.
+ * @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 details about the investigation result on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono fetchInvestigationResultAsync(String resourceGroupName,
+ String azureMonitorWorkspaceName, String issueName, FetchInvestigationResultParameters body) {
+ return fetchInvestigationResultWithResponseAsync(resourceGroupName, azureMonitorWorkspaceName, issueName, body)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Fetch investigation result.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureMonitorWorkspaceName The name of the Azure Monitor Workspace. The name is case insensitive.
+ * @param issueName The name of the IssueResource.
+ * @param body The content of the action request.
+ * @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 details about the investigation result along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response fetchInvestigationResultWithResponse(String resourceGroupName,
+ String azureMonitorWorkspaceName, String issueName, FetchInvestigationResultParameters body, Context context) {
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return service.fetchInvestigationResultSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, azureMonitorWorkspaceName, issueName, contentType,
+ accept, body, context);
+ }
+
+ /**
+ * Fetch investigation result.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureMonitorWorkspaceName The name of the Azure Monitor Workspace. The name is case insensitive.
+ * @param issueName The name of the IssueResource.
+ * @param body The content of the action request.
+ * @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 details about the investigation result.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public InvestigationResultInner fetchInvestigationResult(String resourceGroupName, String azureMonitorWorkspaceName,
+ String issueName, FetchInvestigationResultParameters body) {
+ return fetchInvestigationResultWithResponse(resourceGroupName, azureMonitorWorkspaceName, issueName, body,
+ Context.NONE).getValue();
+ }
+
+ /**
+ * List all alerts in the issue - this method uses pagination to return all alerts.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureMonitorWorkspaceName The name of the Azure Monitor Workspace. The name is case insensitive.
+ * @param issueName The name of the IssueResource.
+ * @param body The content of the action request.
+ * @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 paged collection of RelatedAlert items along with {@link Response} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listAlertsWithResponseAsync(String resourceGroupName,
+ String azureMonitorWorkspaceName, String issueName, ListParameter body) {
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.listAlerts(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, azureMonitorWorkspaceName, issueName, contentType,
+ accept, body, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * List all alerts in the issue - this method uses pagination to return all alerts.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureMonitorWorkspaceName The name of the Azure Monitor Workspace. The name is case insensitive.
+ * @param issueName The name of the IssueResource.
+ * @param body The content of the action request.
+ * @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 paged collection of RelatedAlert items on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono listAlertsAsync(String resourceGroupName, String azureMonitorWorkspaceName,
+ String issueName, ListParameter body) {
+ return listAlertsWithResponseAsync(resourceGroupName, azureMonitorWorkspaceName, issueName, body)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * List all alerts in the issue - this method uses pagination to return all alerts.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureMonitorWorkspaceName The name of the Azure Monitor Workspace. The name is case insensitive.
+ * @param issueName The name of the IssueResource.
+ * @param body The content of the action request.
+ * @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 paged collection of RelatedAlert items along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response listAlertsWithResponse(String resourceGroupName,
+ String azureMonitorWorkspaceName, String issueName, ListParameter body, Context context) {
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return service.listAlertsSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, azureMonitorWorkspaceName, issueName, contentType,
+ accept, body, context);
+ }
+
+ /**
+ * List all alerts in the issue - this method uses pagination to return all alerts.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureMonitorWorkspaceName The name of the Azure Monitor Workspace. The name is case insensitive.
+ * @param issueName The name of the IssueResource.
+ * @param body The content of the action request.
+ * @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 paged collection of RelatedAlert items.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public PagedRelatedAlertInner listAlerts(String resourceGroupName, String azureMonitorWorkspaceName,
+ String issueName, ListParameter body) {
+ return listAlertsWithResponse(resourceGroupName, azureMonitorWorkspaceName, issueName, body, Context.NONE)
+ .getValue();
+ }
+
+ /**
+ * Add or update alerts in the issue.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureMonitorWorkspaceName The name of the Azure Monitor Workspace. The name is case insensitive.
+ * @param issueName The name of the IssueResource.
+ * @param body The content of the action request.
+ * @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 related alerts along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> addOrUpdateAlertsWithResponseAsync(String resourceGroupName,
+ String azureMonitorWorkspaceName, String issueName, RelatedAlertsInner body) {
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.addOrUpdateAlerts(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, azureMonitorWorkspaceName, issueName, contentType,
+ accept, body, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Add or update alerts in the issue.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureMonitorWorkspaceName The name of the Azure Monitor Workspace. The name is case insensitive.
+ * @param issueName The name of the IssueResource.
+ * @param body The content of the action request.
+ * @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 related alerts on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono addOrUpdateAlertsAsync(String resourceGroupName, String azureMonitorWorkspaceName,
+ String issueName, RelatedAlertsInner body) {
+ return addOrUpdateAlertsWithResponseAsync(resourceGroupName, azureMonitorWorkspaceName, issueName, body)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Add or update alerts in the issue.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureMonitorWorkspaceName The name of the Azure Monitor Workspace. The name is case insensitive.
+ * @param issueName The name of the IssueResource.
+ * @param body The content of the action request.
+ * @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 related alerts along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response addOrUpdateAlertsWithResponse(String resourceGroupName,
+ String azureMonitorWorkspaceName, String issueName, RelatedAlertsInner body, Context context) {
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return service.addOrUpdateAlertsSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, azureMonitorWorkspaceName, issueName, contentType,
+ accept, body, context);
+ }
+
+ /**
+ * Add or update alerts in the issue.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureMonitorWorkspaceName The name of the Azure Monitor Workspace. The name is case insensitive.
+ * @param issueName The name of the IssueResource.
+ * @param body The content of the action request.
+ * @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 related alerts.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public RelatedAlertsInner addOrUpdateAlerts(String resourceGroupName, String azureMonitorWorkspaceName,
+ String issueName, RelatedAlertsInner body) {
+ return addOrUpdateAlertsWithResponse(resourceGroupName, azureMonitorWorkspaceName, issueName, body,
+ Context.NONE).getValue();
+ }
+
+ /**
+ * List all resources in the issue - this method uses pagination to return all resources.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureMonitorWorkspaceName The name of the Azure Monitor Workspace. The name is case insensitive.
+ * @param issueName The name of the IssueResource.
+ * @param body The content of the action request.
+ * @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 paged collection of RelatedResource items along with {@link Response} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listResourcesWithResponseAsync(String resourceGroupName,
+ String azureMonitorWorkspaceName, String issueName, ListParameter body) {
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.listResources(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, azureMonitorWorkspaceName, issueName, contentType,
+ accept, body, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * List all resources in the issue - this method uses pagination to return all resources.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureMonitorWorkspaceName The name of the Azure Monitor Workspace. The name is case insensitive.
+ * @param issueName The name of the IssueResource.
+ * @param body The content of the action request.
+ * @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 paged collection of RelatedResource items on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono listResourcesAsync(String resourceGroupName,
+ String azureMonitorWorkspaceName, String issueName, ListParameter body) {
+ return listResourcesWithResponseAsync(resourceGroupName, azureMonitorWorkspaceName, issueName, body)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * List all resources in the issue - this method uses pagination to return all resources.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureMonitorWorkspaceName The name of the Azure Monitor Workspace. The name is case insensitive.
+ * @param issueName The name of the IssueResource.
+ * @param body The content of the action request.
+ * @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 paged collection of RelatedResource items along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response listResourcesWithResponse(String resourceGroupName,
+ String azureMonitorWorkspaceName, String issueName, ListParameter body, Context context) {
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return service.listResourcesSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, azureMonitorWorkspaceName, issueName, contentType,
+ accept, body, context);
+ }
+
+ /**
+ * List all resources in the issue - this method uses pagination to return all resources.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureMonitorWorkspaceName The name of the Azure Monitor Workspace. The name is case insensitive.
+ * @param issueName The name of the IssueResource.
+ * @param body The content of the action request.
+ * @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 paged collection of RelatedResource items.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public PagedRelatedResourceInner listResources(String resourceGroupName, String azureMonitorWorkspaceName,
+ String issueName, ListParameter body) {
+ return listResourcesWithResponse(resourceGroupName, azureMonitorWorkspaceName, issueName, body, Context.NONE)
+ .getValue();
+ }
+
+ /**
+ * Add or update resources in the issue.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureMonitorWorkspaceName The name of the Azure Monitor Workspace. The name is case insensitive.
+ * @param issueName The name of the IssueResource.
+ * @param body The content of the action request.
+ * @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 related resources along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> addOrUpdateResourcesWithResponseAsync(String resourceGroupName,
+ String azureMonitorWorkspaceName, String issueName, RelatedResourcesInner body) {
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.addOrUpdateResources(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, azureMonitorWorkspaceName, issueName, contentType,
+ accept, body, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Add or update resources in the issue.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureMonitorWorkspaceName The name of the Azure Monitor Workspace. The name is case insensitive.
+ * @param issueName The name of the IssueResource.
+ * @param body The content of the action request.
+ * @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 related resources on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono addOrUpdateResourcesAsync(String resourceGroupName,
+ String azureMonitorWorkspaceName, String issueName, RelatedResourcesInner body) {
+ return addOrUpdateResourcesWithResponseAsync(resourceGroupName, azureMonitorWorkspaceName, issueName, body)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Add or update resources in the issue.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureMonitorWorkspaceName The name of the Azure Monitor Workspace. The name is case insensitive.
+ * @param issueName The name of the IssueResource.
+ * @param body The content of the action request.
+ * @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 related resources along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response addOrUpdateResourcesWithResponse(String resourceGroupName,
+ String azureMonitorWorkspaceName, String issueName, RelatedResourcesInner body, Context context) {
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return service.addOrUpdateResourcesSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, azureMonitorWorkspaceName, issueName, contentType,
+ accept, body, context);
+ }
+
+ /**
+ * Add or update resources in the issue.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureMonitorWorkspaceName The name of the Azure Monitor Workspace. The name is case insensitive.
+ * @param issueName The name of the IssueResource.
+ * @param body The content of the action request.
+ * @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 related resources.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public RelatedResourcesInner addOrUpdateResources(String resourceGroupName, String azureMonitorWorkspaceName,
+ String issueName, RelatedResourcesInner body) {
+ return addOrUpdateResourcesWithResponse(resourceGroupName, azureMonitorWorkspaceName, issueName, body,
+ Context.NONE).getValue();
+ }
+
+ /**
+ * Fetch the background visualization of the issue.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureMonitorWorkspaceName The name of the Azure Monitor Workspace. The name is case insensitive.
+ * @param issueName The name of the IssueResource.
+ * @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 issue background visualization along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> fetchBackgroundVisualizationWithResponseAsync(
+ String resourceGroupName, String azureMonitorWorkspaceName, String issueName) {
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.fetchBackgroundVisualization(this.client.getEndpoint(),
+ this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName,
+ azureMonitorWorkspaceName, issueName, accept, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Fetch the background visualization of the issue.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureMonitorWorkspaceName The name of the Azure Monitor Workspace. The name is case insensitive.
+ * @param issueName The name of the IssueResource.
+ * @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 issue background visualization on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono fetchBackgroundVisualizationAsync(String resourceGroupName,
+ String azureMonitorWorkspaceName, String issueName) {
+ return fetchBackgroundVisualizationWithResponseAsync(resourceGroupName, azureMonitorWorkspaceName, issueName)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Fetch the background visualization of the issue.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureMonitorWorkspaceName The name of the Azure Monitor Workspace. The name is case insensitive.
+ * @param issueName The name of the IssueResource.
+ * @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 issue background visualization along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response fetchBackgroundVisualizationWithResponse(String resourceGroupName,
+ String azureMonitorWorkspaceName, String issueName, Context context) {
+ final String accept = "application/json";
+ return service.fetchBackgroundVisualizationSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, azureMonitorWorkspaceName, issueName, accept, context);
+ }
+
+ /**
+ * Fetch the background visualization of the issue.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureMonitorWorkspaceName The name of the Azure Monitor Workspace. The name is case insensitive.
+ * @param issueName The name of the IssueResource.
+ * @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 issue background visualization.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public BackgroundVisualizationInner fetchBackgroundVisualization(String resourceGroupName,
+ String azureMonitorWorkspaceName, String issueName) {
+ return fetchBackgroundVisualizationWithResponse(resourceGroupName, azureMonitorWorkspaceName, issueName,
+ Context.NONE).getValue();
+ }
+
+ /**
+ * Set the background visualization for the issue.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureMonitorWorkspaceName The name of the Azure Monitor Workspace. The name is case insensitive.
+ * @param issueName The name of the IssueResource.
+ * @param body The content of the action request.
+ * @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> setBackgroundVisualizationWithResponseAsync(String resourceGroupName,
+ String azureMonitorWorkspaceName, String issueName, BackgroundVisualizationInner body) {
+ final String contentType = "application/json";
+ return FluxUtil
+ .withContext(context -> service.setBackgroundVisualization(this.client.getEndpoint(),
+ this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName,
+ azureMonitorWorkspaceName, issueName, contentType, body, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Set the background visualization for the issue.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureMonitorWorkspaceName The name of the Azure Monitor Workspace. The name is case insensitive.
+ * @param issueName The name of the IssueResource.
+ * @param body The content of the action request.
+ * @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 setBackgroundVisualizationAsync(String resourceGroupName, String azureMonitorWorkspaceName,
+ String issueName, BackgroundVisualizationInner body) {
+ return setBackgroundVisualizationWithResponseAsync(resourceGroupName, azureMonitorWorkspaceName, issueName,
+ body).flatMap(ignored -> Mono.empty());
+ }
+
+ /**
+ * Set the background visualization for the issue.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureMonitorWorkspaceName The name of the Azure Monitor Workspace. The name is case insensitive.
+ * @param issueName The name of the IssueResource.
+ * @param body The content of the action request.
+ * @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 setBackgroundVisualizationWithResponse(String resourceGroupName,
+ String azureMonitorWorkspaceName, String issueName, BackgroundVisualizationInner body, Context context) {
+ final String contentType = "application/json";
+ return service.setBackgroundVisualizationSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, azureMonitorWorkspaceName, issueName, contentType, body,
+ context);
+ }
+
+ /**
+ * Set the background visualization for the issue.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureMonitorWorkspaceName The name of the Azure Monitor Workspace. The name is case insensitive.
+ * @param issueName The name of the IssueResource.
+ * @param body The content of the action request.
+ * @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 setBackgroundVisualization(String resourceGroupName, String azureMonitorWorkspaceName, String issueName,
+ BackgroundVisualizationInner body) {
+ setBackgroundVisualizationWithResponse(resourceGroupName, azureMonitorWorkspaceName, issueName, body,
+ Context.NONE);
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a IssueResource list operation along with {@link PagedResponse} on successful completion
+ * of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listNextSinglePageAsync(String nextLink) {
+ final String accept = "application/json";
+ return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(res -> new PagedResponseBase<>(res.getRequest(),
+ res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a IssueResource list operation along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listNextSinglePage(String nextLink) {
+ final String accept = "application/json";
+ Response res
+ = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a IssueResource list operation along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listNextSinglePage(String nextLink, Context context) {
+ final String accept = "application/json";
+ Response res
+ = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
+ }
+}
diff --git a/sdk/monitor/azure-resourcemanager-monitoraccounts/src/main/java/com/azure/resourcemanager/monitoraccounts/implementation/IssuesImpl.java b/sdk/monitor/azure-resourcemanager-monitoraccounts/src/main/java/com/azure/resourcemanager/monitoraccounts/implementation/IssuesImpl.java
new file mode 100644
index 000000000000..ad28c9c51421
--- /dev/null
+++ b/sdk/monitor/azure-resourcemanager-monitoraccounts/src/main/java/com/azure/resourcemanager/monitoraccounts/implementation/IssuesImpl.java
@@ -0,0 +1,317 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.monitoraccounts.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.monitoraccounts.fluent.IssuesClient;
+import com.azure.resourcemanager.monitoraccounts.fluent.models.BackgroundVisualizationInner;
+import com.azure.resourcemanager.monitoraccounts.fluent.models.InvestigationResultInner;
+import com.azure.resourcemanager.monitoraccounts.fluent.models.IssueResourceInner;
+import com.azure.resourcemanager.monitoraccounts.fluent.models.PagedRelatedAlertInner;
+import com.azure.resourcemanager.monitoraccounts.fluent.models.PagedRelatedResourceInner;
+import com.azure.resourcemanager.monitoraccounts.fluent.models.RelatedAlertsInner;
+import com.azure.resourcemanager.monitoraccounts.fluent.models.RelatedResourcesInner;
+import com.azure.resourcemanager.monitoraccounts.models.BackgroundVisualization;
+import com.azure.resourcemanager.monitoraccounts.models.FetchInvestigationResultParameters;
+import com.azure.resourcemanager.monitoraccounts.models.InvestigationResult;
+import com.azure.resourcemanager.monitoraccounts.models.IssueResource;
+import com.azure.resourcemanager.monitoraccounts.models.Issues;
+import com.azure.resourcemanager.monitoraccounts.models.ListParameter;
+import com.azure.resourcemanager.monitoraccounts.models.PagedRelatedAlert;
+import com.azure.resourcemanager.monitoraccounts.models.PagedRelatedResource;
+import com.azure.resourcemanager.monitoraccounts.models.RelatedAlerts;
+import com.azure.resourcemanager.monitoraccounts.models.RelatedResources;
+
+public final class IssuesImpl implements Issues {
+ private static final ClientLogger LOGGER = new ClientLogger(IssuesImpl.class);
+
+ private final IssuesClient innerClient;
+
+ private final com.azure.resourcemanager.monitoraccounts.MonitorAccountsManager serviceManager;
+
+ public IssuesImpl(IssuesClient innerClient,
+ com.azure.resourcemanager.monitoraccounts.MonitorAccountsManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public Response getWithResponse(String resourceGroupName, String azureMonitorWorkspaceName,
+ String issueName, Context context) {
+ Response inner
+ = this.serviceClient().getWithResponse(resourceGroupName, azureMonitorWorkspaceName, issueName, context);
+ return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
+ new IssueResourceImpl(inner.getValue(), this.manager()));
+ }
+
+ public IssueResource get(String resourceGroupName, String azureMonitorWorkspaceName, String issueName) {
+ IssueResourceInner inner = this.serviceClient().get(resourceGroupName, azureMonitorWorkspaceName, issueName);
+ if (inner != null) {
+ return new IssueResourceImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response deleteWithResponse(String resourceGroupName, String azureMonitorWorkspaceName,
+ String issueName, Context context) {
+ return this.serviceClient()
+ .deleteWithResponse(resourceGroupName, azureMonitorWorkspaceName, issueName, context);
+ }
+
+ public void delete(String resourceGroupName, String azureMonitorWorkspaceName, String issueName) {
+ this.serviceClient().delete(resourceGroupName, azureMonitorWorkspaceName, issueName);
+ }
+
+ public PagedIterable list(String resourceGroupName, String azureMonitorWorkspaceName) {
+ PagedIterable inner
+ = this.serviceClient().list(resourceGroupName, azureMonitorWorkspaceName);
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new IssueResourceImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list(String resourceGroupName, String azureMonitorWorkspaceName,
+ Context context) {
+ PagedIterable inner
+ = this.serviceClient().list(resourceGroupName, azureMonitorWorkspaceName, context);
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new IssueResourceImpl(inner1, this.manager()));
+ }
+
+ public Response addInvestigationResultWithResponse(String resourceGroupName,
+ String azureMonitorWorkspaceName, String issueName, InvestigationResultInner body, Context context) {
+ Response inner = this.serviceClient()
+ .addInvestigationResultWithResponse(resourceGroupName, azureMonitorWorkspaceName, issueName, body, context);
+ return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
+ new InvestigationResultImpl(inner.getValue(), this.manager()));
+ }
+
+ public InvestigationResult addInvestigationResult(String resourceGroupName, String azureMonitorWorkspaceName,
+ String issueName, InvestigationResultInner body) {
+ InvestigationResultInner inner = this.serviceClient()
+ .addInvestigationResult(resourceGroupName, azureMonitorWorkspaceName, issueName, body);
+ if (inner != null) {
+ return new InvestigationResultImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response fetchInvestigationResultWithResponse(String resourceGroupName,
+ String azureMonitorWorkspaceName, String issueName, FetchInvestigationResultParameters body, Context context) {
+ Response inner = this.serviceClient()
+ .fetchInvestigationResultWithResponse(resourceGroupName, azureMonitorWorkspaceName, issueName, body,
+ context);
+ return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
+ new InvestigationResultImpl(inner.getValue(), this.manager()));
+ }
+
+ public InvestigationResult fetchInvestigationResult(String resourceGroupName, String azureMonitorWorkspaceName,
+ String issueName, FetchInvestigationResultParameters body) {
+ InvestigationResultInner inner = this.serviceClient()
+ .fetchInvestigationResult(resourceGroupName, azureMonitorWorkspaceName, issueName, body);
+ if (inner != null) {
+ return new InvestigationResultImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response listAlertsWithResponse(String resourceGroupName,
+ String azureMonitorWorkspaceName, String issueName, ListParameter body, Context context) {
+ Response inner = this.serviceClient()
+ .listAlertsWithResponse(resourceGroupName, azureMonitorWorkspaceName, issueName, body, context);
+ return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
+ new PagedRelatedAlertImpl(inner.getValue(), this.manager()));
+ }
+
+ public PagedRelatedAlert listAlerts(String resourceGroupName, String azureMonitorWorkspaceName, String issueName,
+ ListParameter body) {
+ PagedRelatedAlertInner inner
+ = this.serviceClient().listAlerts(resourceGroupName, azureMonitorWorkspaceName, issueName, body);
+ if (inner != null) {
+ return new PagedRelatedAlertImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response addOrUpdateAlertsWithResponse(String resourceGroupName,
+ String azureMonitorWorkspaceName, String issueName, RelatedAlertsInner body, Context context) {
+ Response inner = this.serviceClient()
+ .addOrUpdateAlertsWithResponse(resourceGroupName, azureMonitorWorkspaceName, issueName, body, context);
+ return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
+ new RelatedAlertsImpl(inner.getValue(), this.manager()));
+ }
+
+ public RelatedAlerts addOrUpdateAlerts(String resourceGroupName, String azureMonitorWorkspaceName, String issueName,
+ RelatedAlertsInner body) {
+ RelatedAlertsInner inner
+ = this.serviceClient().addOrUpdateAlerts(resourceGroupName, azureMonitorWorkspaceName, issueName, body);
+ if (inner != null) {
+ return new RelatedAlertsImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response listResourcesWithResponse(String resourceGroupName,
+ String azureMonitorWorkspaceName, String issueName, ListParameter body, Context context) {
+ Response inner = this.serviceClient()
+ .listResourcesWithResponse(resourceGroupName, azureMonitorWorkspaceName, issueName, body, context);
+ return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
+ new PagedRelatedResourceImpl(inner.getValue(), this.manager()));
+ }
+
+ public PagedRelatedResource listResources(String resourceGroupName, String azureMonitorWorkspaceName,
+ String issueName, ListParameter body) {
+ PagedRelatedResourceInner inner
+ = this.serviceClient().listResources(resourceGroupName, azureMonitorWorkspaceName, issueName, body);
+ if (inner != null) {
+ return new PagedRelatedResourceImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response addOrUpdateResourcesWithResponse(String resourceGroupName,
+ String azureMonitorWorkspaceName, String issueName, RelatedResourcesInner body, Context context) {
+ Response inner = this.serviceClient()
+ .addOrUpdateResourcesWithResponse(resourceGroupName, azureMonitorWorkspaceName, issueName, body, context);
+ return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
+ new RelatedResourcesImpl(inner.getValue(), this.manager()));
+ }
+
+ public RelatedResources addOrUpdateResources(String resourceGroupName, String azureMonitorWorkspaceName,
+ String issueName, RelatedResourcesInner body) {
+ RelatedResourcesInner inner
+ = this.serviceClient().addOrUpdateResources(resourceGroupName, azureMonitorWorkspaceName, issueName, body);
+ if (inner != null) {
+ return new RelatedResourcesImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response fetchBackgroundVisualizationWithResponse(String resourceGroupName,
+ String azureMonitorWorkspaceName, String issueName, Context context) {
+ Response