diff --git a/eng/lintingconfigs/revapi/track2/revapi.json b/eng/lintingconfigs/revapi/track2/revapi.json index 488d16e3a01a..9d8652fde72c 100644 --- a/eng/lintingconfigs/revapi/track2/revapi.json +++ b/eng/lintingconfigs/revapi/track2/revapi.json @@ -1839,6 +1839,25 @@ "old" : "method com.azure.resourcemanager.monitor.models.ConditionOperator[] com.azure.resourcemanager.monitor.models.ConditionOperator::values()", "justification": "TypeSpec migration: ConditionOperator changed from enum to ExpandableStringEnum, values() return type changed." }, + { + "code": "java.method.removed", + "old" : { + "matcher": "regex", + "match": "method .* com\\.azure\\.resourcemanager\\.monitor\\.models\\.CategoryType.*" + }, + "justification": "TypeSpec migration: CategoryType changed from enum to ExpandableStringEnum; enum-specific methods removed. Matches swagger x-ms-enum modelAsString:true intent." + }, + { + "code": "java.method.visibilityIncreased", + "old" : "method void com.azure.resourcemanager.monitor.models.CategoryType::(java.lang.String)", + "new" : "method void com.azure.resourcemanager.monitor.models.CategoryType::()", + "justification": "TypeSpec migration: CategoryType changed from enum to ExpandableStringEnum, constructor visibility increased." + }, + { + "code": "java.method.returnTypeChanged", + "old" : "method com.azure.resourcemanager.monitor.models.CategoryType[] com.azure.resourcemanager.monitor.models.CategoryType::values()", + "justification": "TypeSpec migration: CategoryType changed from enum to ExpandableStringEnum, values() return type changed." + }, { "ignore": true, "code": "java.field.enumConstantOrderChanged", diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index 78adec6c91a2..ef8044d9205e 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -518,7 +518,7 @@ com.azure.resourcemanager:azure-resourcemanager-azurestackhci-vm;1.0.0-beta.1;1. com.azure.resourcemanager:azure-resourcemanager-workloadorchestration;1.0.0-beta.1;1.0.0-beta.2 com.azure.resourcemanager:azure-resourcemanager-disconnectedoperations;1.0.0;1.1.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-compute-recommender;1.0.0-beta.1;1.0.0-beta.2 -com.azure.resourcemanager:azure-resourcemanager-computelimit;1.2.0;1.3.0 +com.azure.resourcemanager:azure-resourcemanager-computelimit;1.3.0;1.4.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-containerregistry-tasks;1.0.0-beta.1;1.0.0-beta.2 com.azure.resourcemanager:azure-resourcemanager-virtualenclaves;1.0.0-beta.1;1.0.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-edgeactions;1.0.0-beta.1;1.0.0-beta.2 diff --git a/sdk/computelimit/azure-resourcemanager-computelimit/CHANGELOG.md b/sdk/computelimit/azure-resourcemanager-computelimit/CHANGELOG.md index 9938bbf04f01..ab471dac8757 100644 --- a/sdk/computelimit/azure-resourcemanager-computelimit/CHANGELOG.md +++ b/sdk/computelimit/azure-resourcemanager-computelimit/CHANGELOG.md @@ -1,5 +1,15 @@ # Release History +## 1.4.0-beta.1 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + ## 1.3.0 (2026-07-07) - Azure Resource Manager ComputeLimit client library for Java. This package contains Microsoft Azure SDK for ComputeLimit Management SDK. Microsoft Azure Compute Limit Resource Provider. Package api-version 2026-07-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). diff --git a/sdk/computelimit/azure-resourcemanager-computelimit/pom.xml b/sdk/computelimit/azure-resourcemanager-computelimit/pom.xml index cfba92197232..4b5532495136 100644 --- a/sdk/computelimit/azure-resourcemanager-computelimit/pom.xml +++ b/sdk/computelimit/azure-resourcemanager-computelimit/pom.xml @@ -14,7 +14,7 @@ com.azure.resourcemanager azure-resourcemanager-computelimit - 1.3.0 + 1.4.0-beta.1 jar Microsoft Azure SDK for ComputeLimit Management diff --git a/sdk/monitor/azure-resourcemanager-monitor/assets.json b/sdk/monitor/azure-resourcemanager-monitor/assets.json index d01547d6533c..22b33d9e4451 100644 --- a/sdk/monitor/azure-resourcemanager-monitor/assets.json +++ b/sdk/monitor/azure-resourcemanager-monitor/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "java", "TagPrefix": "java/monitor/azure-resourcemanager-monitor", - "Tag": "java/monitor/azure-resourcemanager-monitor_bb6ce78dc6" + "Tag": "java/monitor/azure-resourcemanager-monitor_9fadd20cc6" } diff --git a/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/ActionGroupsClient.java b/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/ActionGroupsClient.java index 74bfd868c236..d9fe7de609b8 100644 --- a/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/ActionGroupsClient.java +++ b/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/ActionGroupsClient.java @@ -338,7 +338,8 @@ ActionGroupResourceInner update(String resourceGroupName, String actionGroupName * @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 body along with {@link Response} on successful completion of {@link Mono}. + * @return the details of the test notification results along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) Mono>> createNotificationsAtActionGroupResourceLevelWithResponseAsync( @@ -353,7 +354,7 @@ Mono>> createNotificationsAtActionGroupResourceLevelWi * @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 PollerFlux} for polling of long-running operation. + * @return the {@link PollerFlux} for polling of the details of the test notification results. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) PollerFlux, TestNotificationDetailsResponseInner> @@ -369,7 +370,7 @@ Mono>> createNotificationsAtActionGroupResourceLevelWi * @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. + * @return the {@link SyncPoller} for polling of the details of the test notification results. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, TestNotificationDetailsResponseInner> @@ -386,7 +387,7 @@ Mono>> createNotificationsAtActionGroupResourceLevelWi * @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. + * @return the {@link SyncPoller} for polling of the details of the test notification results. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, TestNotificationDetailsResponseInner> @@ -402,7 +403,7 @@ Mono>> createNotificationsAtActionGroupResourceLevelWi * @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 body on successful completion of {@link Mono}. + * @return the details of the test notification results on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) Mono createNotificationsAtActionGroupResourceLevelAsync( @@ -417,7 +418,7 @@ Mono createNotificationsAtActionGroupResou * @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. + * @return the details of the test notification results. */ @ServiceMethod(returns = ReturnType.SINGLE) TestNotificationDetailsResponseInner createNotificationsAtActionGroupResourceLevel(String resourceGroupName, @@ -433,7 +434,7 @@ TestNotificationDetailsResponseInner createNotificationsAtActionGroupResourceLev * @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. + * @return the details of the test notification results. */ @ServiceMethod(returns = ReturnType.SINGLE) TestNotificationDetailsResponseInner createNotificationsAtActionGroupResourceLevel(String resourceGroupName, diff --git a/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/AlertRuleManagementClient.java b/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/AlertRuleManagementClient.java index 946404bc436d..704d075707fe 100644 --- a/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/AlertRuleManagementClient.java +++ b/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/AlertRuleManagementClient.java @@ -45,18 +45,4 @@ public interface AlertRuleManagementClient { * @return the AlertRulesClient object. */ AlertRulesClient getAlertRules(); - - /** - * Gets the DiagnosticSettingsOperationsClient object to access its operations. - * - * @return the DiagnosticSettingsOperationsClient object. - */ - DiagnosticSettingsOperationsClient getDiagnosticSettingsOperations(); - - /** - * Gets the DiagnosticSettingsCategoriesClient object to access its operations. - * - * @return the DiagnosticSettingsCategoriesClient object. - */ - DiagnosticSettingsCategoriesClient getDiagnosticSettingsCategories(); } diff --git a/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/DataCollectionRuleAssociationsClient.java b/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/DataCollectionRuleAssociationsClient.java index 92ebdc79c241..1bf658b4f0bd 100644 --- a/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/DataCollectionRuleAssociationsClient.java +++ b/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/DataCollectionRuleAssociationsClient.java @@ -123,7 +123,7 @@ Response getWithResponse(St /** * Creates or updates an association. * - * @param resourceUri The identifier of the resource. + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @param associationName The name of the association. The name is case insensitive. * @param body The payload. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -139,7 +139,7 @@ Mono> createWithRe /** * Creates or updates an association. * - * @param resourceUri The identifier of the resource. + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @param associationName The name of the association. 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. @@ -152,7 +152,7 @@ Mono> createWithRe /** * Creates or updates an association. * - * @param resourceUri The identifier of the resource. + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @param associationName The name of the association. The name is case insensitive. * @param body The payload. * @param context The context to associate with this operation. @@ -168,7 +168,7 @@ Response createWithResponse /** * Creates or updates an association. * - * @param resourceUri The identifier of the resource. + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @param associationName The name of the association. 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. diff --git a/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/DiagnosticSettingsCategoriesClient.java b/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/DiagnosticSettingsCategoriesClient.java index 81ea04e7c352..b9004cb81832 100644 --- a/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/DiagnosticSettingsCategoriesClient.java +++ b/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/DiagnosticSettingsCategoriesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Deprecated generated code. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.monitor.fluent; @@ -20,7 +20,7 @@ public interface DiagnosticSettingsCategoriesClient { /** * Gets the diagnostic settings category for the specified resource. * - * @param resourceUri The identifier of the resource. + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @param name The name of the diagnostic setting. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -34,7 +34,7 @@ public interface DiagnosticSettingsCategoriesClient { /** * Gets the diagnostic settings category for the specified resource. * - * @param resourceUri The identifier of the resource. + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @param name The name of the diagnostic setting. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -47,7 +47,7 @@ public interface DiagnosticSettingsCategoriesClient { /** * Gets the diagnostic settings category for the specified resource. * - * @param resourceUri The identifier of the resource. + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @param name The name of the diagnostic setting. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -61,7 +61,7 @@ public interface DiagnosticSettingsCategoriesClient { /** * Gets the diagnostic settings category for the specified resource. * - * @param resourceUri The identifier of the resource. + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @param name The name of the diagnostic setting. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -74,7 +74,7 @@ public interface DiagnosticSettingsCategoriesClient { /** * Lists the diagnostic settings categories for the specified resource. * - * @param resourceUri The identifier of the resource. + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @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. @@ -87,7 +87,7 @@ public interface DiagnosticSettingsCategoriesClient { /** * Lists the diagnostic settings categories for the specified resource. * - * @param resourceUri The identifier of the resource. + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @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. @@ -100,7 +100,7 @@ public interface DiagnosticSettingsCategoriesClient { /** * Lists the diagnostic settings categories for the specified resource. * - * @param resourceUri The identifier of the resource. + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @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. diff --git a/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/DiagnosticSettingsOperationsClient.java b/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/DiagnosticSettingsOperationsClient.java index 844ad357e45a..ef313d0da617 100644 --- a/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/DiagnosticSettingsOperationsClient.java +++ b/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/DiagnosticSettingsOperationsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Deprecated generated code. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.monitor.fluent; @@ -21,7 +21,7 @@ public interface DiagnosticSettingsOperationsClient extends InnerSupportsDelete< /** * Gets the active diagnostic settings for the specified resource. * - * @param resourceUri The identifier of the resource. + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @param name The name of the diagnostic setting. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -35,7 +35,7 @@ public interface DiagnosticSettingsOperationsClient extends InnerSupportsDelete< /** * Gets the active diagnostic settings for the specified resource. * - * @param resourceUri The identifier of the resource. + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @param name The name of the diagnostic setting. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -48,7 +48,7 @@ public interface DiagnosticSettingsOperationsClient extends InnerSupportsDelete< /** * Gets the active diagnostic settings for the specified resource. * - * @param resourceUri The identifier of the resource. + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @param name The name of the diagnostic setting. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -62,7 +62,7 @@ public interface DiagnosticSettingsOperationsClient extends InnerSupportsDelete< /** * Gets the active diagnostic settings for the specified resource. * - * @param resourceUri The identifier of the resource. + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @param name The name of the diagnostic setting. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -75,7 +75,7 @@ public interface DiagnosticSettingsOperationsClient extends InnerSupportsDelete< /** * Creates or updates diagnostic settings for the specified resource. * - * @param resourceUri The identifier of the resource. + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @param name The name of the diagnostic setting. * @param parameters Parameters supplied to the operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -90,7 +90,7 @@ Mono> createOrUpdateWithResponseAsync( /** * Creates or updates diagnostic settings for the specified resource. * - * @param resourceUri The identifier of the resource. + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @param name The name of the diagnostic setting. * @param parameters Parameters supplied to the operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -105,7 +105,7 @@ Mono createOrUpdateAsync(String resourceUri, St /** * Creates or updates diagnostic settings for the specified resource. * - * @param resourceUri The identifier of the resource. + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @param name The name of the diagnostic setting. * @param parameters Parameters supplied to the operation. * @param context The context to associate with this operation. @@ -121,7 +121,7 @@ Response createOrUpdateWithResponse(String reso /** * Creates or updates diagnostic settings for the specified resource. * - * @param resourceUri The identifier of the resource. + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @param name The name of the diagnostic setting. * @param parameters Parameters supplied to the operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -136,7 +136,7 @@ DiagnosticSettingsResourceInner createOrUpdate(String resourceUri, String name, /** * Deletes existing diagnostic settings for the specified resource. * - * @param resourceUri The identifier of the resource. + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @param name The name of the diagnostic setting. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -149,7 +149,7 @@ DiagnosticSettingsResourceInner createOrUpdate(String resourceUri, String name, /** * Deletes existing diagnostic settings for the specified resource. * - * @param resourceUri The identifier of the resource. + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @param name The name of the diagnostic setting. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -162,7 +162,7 @@ DiagnosticSettingsResourceInner createOrUpdate(String resourceUri, String name, /** * Deletes existing diagnostic settings for the specified resource. * - * @param resourceUri The identifier of the resource. + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @param name The name of the diagnostic setting. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -176,7 +176,7 @@ DiagnosticSettingsResourceInner createOrUpdate(String resourceUri, String name, /** * Deletes existing diagnostic settings for the specified resource. * - * @param resourceUri The identifier of the resource. + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @param name The name of the diagnostic setting. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -188,7 +188,7 @@ DiagnosticSettingsResourceInner createOrUpdate(String resourceUri, String name, /** * Gets the active diagnostic settings list for the specified resource. * - * @param resourceUri The identifier of the resource. + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @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. @@ -201,7 +201,7 @@ DiagnosticSettingsResourceInner createOrUpdate(String resourceUri, String name, /** * Gets the active diagnostic settings list for the specified resource. * - * @param resourceUri The identifier of the resource. + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @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. @@ -214,7 +214,7 @@ DiagnosticSettingsResourceInner createOrUpdate(String resourceUri, String name, /** * Gets the active diagnostic settings list for the specified resource. * - * @param resourceUri The identifier of the resource. + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @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. diff --git a/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/MonitorClient.java b/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/MonitorClient.java index be1c4d1a86e1..2fc79fcceb87 100644 --- a/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/MonitorClient.java +++ b/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/MonitorClient.java @@ -4,8 +4,20 @@ package com.azure.resourcemanager.monitor.fluent; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.HttpPipeline; +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.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.monitor.fluent.models.TenantActionGroupTestNotificationDetailsResponseInner; +import com.azure.resourcemanager.monitor.models.TenantNotificationRequestBody; +import java.nio.ByteBuffer; import java.time.Duration; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; /** * The interface for MonitorClient class. @@ -220,4 +232,223 @@ public interface MonitorClient { * @return the NspScheduledQueryRulesClient object. */ NspScheduledQueryRulesClient getNspScheduledQueryRules(); + + /** + * Gets the TenantActionGroupsClient object to access its operations. + * + * @return the TenantActionGroupsClient object. + */ + TenantActionGroupsClient getTenantActionGroups(); + + /** + * Gets the VMInsightsClient object to access its operations. + * + * @return the VMInsightsClient object. + */ + VMInsightsClient getVMInsights(); + + /** + * Gets the DiagnosticSettingsOperationsClient object to access its operations. + * + * @return the DiagnosticSettingsOperationsClient object. + */ + DiagnosticSettingsOperationsClient getDiagnosticSettingsOperations(); + + /** + * Gets the DiagnosticSettingsCategoriesClient object to access its operations. + * + * @return the DiagnosticSettingsCategoriesClient object. + */ + DiagnosticSettingsCategoriesClient getDiagnosticSettingsCategories(); + + /** + * Send test notifications to a set of provided receivers. + * + * @param managementGroupId The management group ID. + * @param tenantActionGroupName The name of the action group. + * @param xMsClientTenantId The tenant ID of the client making the request. + * @param notificationRequest The notification request body which includes the contact details. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the details of the test notification results along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono>> createNotificationsAtTenantActionGroupResourceLevelWithResponseAsync( + String managementGroupId, String tenantActionGroupName, String xMsClientTenantId, + TenantNotificationRequestBody notificationRequest); + + /** + * Send test notifications to a set of provided receivers. + * + * @param managementGroupId The management group ID. + * @param tenantActionGroupName The name of the action group. + * @param xMsClientTenantId The tenant ID of the client making the request. + * @param notificationRequest The notification request body which includes the contact details. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of the details of the test notification results. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux, TenantActionGroupTestNotificationDetailsResponseInner> + beginCreateNotificationsAtTenantActionGroupResourceLevelAsync(String managementGroupId, + String tenantActionGroupName, String xMsClientTenantId, TenantNotificationRequestBody notificationRequest); + + /** + * Send test notifications to a set of provided receivers. + * + * @param managementGroupId The management group ID. + * @param tenantActionGroupName The name of the action group. + * @param xMsClientTenantId The tenant ID of the client making the request. + * @param notificationRequest The notification request body which includes the contact details. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the details of the test notification results. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, TenantActionGroupTestNotificationDetailsResponseInner> + beginCreateNotificationsAtTenantActionGroupResourceLevel(String managementGroupId, String tenantActionGroupName, + String xMsClientTenantId, TenantNotificationRequestBody notificationRequest); + + /** + * Send test notifications to a set of provided receivers. + * + * @param managementGroupId The management group ID. + * @param tenantActionGroupName The name of the action group. + * @param xMsClientTenantId The tenant ID of the client making the request. + * @param notificationRequest The notification request body which includes the contact details. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the details of the test notification results. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, TenantActionGroupTestNotificationDetailsResponseInner> + beginCreateNotificationsAtTenantActionGroupResourceLevel(String managementGroupId, String tenantActionGroupName, + String xMsClientTenantId, TenantNotificationRequestBody notificationRequest, Context context); + + /** + * Send test notifications to a set of provided receivers. + * + * @param managementGroupId The management group ID. + * @param tenantActionGroupName The name of the action group. + * @param xMsClientTenantId The tenant ID of the client making the request. + * @param notificationRequest The notification request body which includes the contact details. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the details of the test notification results on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono + createNotificationsAtTenantActionGroupResourceLevelAsync(String managementGroupId, String tenantActionGroupName, + String xMsClientTenantId, TenantNotificationRequestBody notificationRequest); + + /** + * Send test notifications to a set of provided receivers. + * + * @param managementGroupId The management group ID. + * @param tenantActionGroupName The name of the action group. + * @param xMsClientTenantId The tenant ID of the client making the request. + * @param notificationRequest The notification request body which includes the contact details. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the details of the test notification results. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + TenantActionGroupTestNotificationDetailsResponseInner createNotificationsAtTenantActionGroupResourceLevel( + String managementGroupId, String tenantActionGroupName, String xMsClientTenantId, + TenantNotificationRequestBody notificationRequest); + + /** + * Send test notifications to a set of provided receivers. + * + * @param managementGroupId The management group ID. + * @param tenantActionGroupName The name of the action group. + * @param xMsClientTenantId The tenant ID of the client making the request. + * @param notificationRequest The notification request body which includes the contact details. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the details of the test notification results. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + TenantActionGroupTestNotificationDetailsResponseInner createNotificationsAtTenantActionGroupResourceLevel( + String managementGroupId, String tenantActionGroupName, String xMsClientTenantId, + TenantNotificationRequestBody notificationRequest, Context context); + + /** + * Get the test notifications by the notification id. + * + * @param managementGroupId The management group id. + * @param tenantActionGroupName The name of the action group. + * @param notificationId The notification id. + * @param xMsClientTenantId The tenant ID of the client making the 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 the test notifications by the notification id along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> + getTestNotificationsAtTenantActionGroupResourceLevelWithResponseAsync(String managementGroupId, + String tenantActionGroupName, String notificationId, String xMsClientTenantId); + + /** + * Get the test notifications by the notification id. + * + * @param managementGroupId The management group id. + * @param tenantActionGroupName The name of the action group. + * @param notificationId The notification id. + * @param xMsClientTenantId The tenant ID of the client making the 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 the test notifications by the notification id on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono + getTestNotificationsAtTenantActionGroupResourceLevelAsync(String managementGroupId, + String tenantActionGroupName, String notificationId, String xMsClientTenantId); + + /** + * Get the test notifications by the notification id. + * + * @param managementGroupId The management group id. + * @param tenantActionGroupName The name of the action group. + * @param notificationId The notification id. + * @param xMsClientTenantId The tenant ID of the client making the 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 test notifications by the notification id along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response + getTestNotificationsAtTenantActionGroupResourceLevelWithResponse(String managementGroupId, + String tenantActionGroupName, String notificationId, String xMsClientTenantId, Context context); + + /** + * Get the test notifications by the notification id. + * + * @param managementGroupId The management group id. + * @param tenantActionGroupName The name of the action group. + * @param notificationId The notification id. + * @param xMsClientTenantId The tenant ID of the client making the 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 the test notifications by the notification id. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + TenantActionGroupTestNotificationDetailsResponseInner getTestNotificationsAtTenantActionGroupResourceLevel( + String managementGroupId, String tenantActionGroupName, String notificationId, String xMsClientTenantId); } diff --git a/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/TenantActionGroupsClient.java b/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/TenantActionGroupsClient.java new file mode 100644 index 000000000000..56c1f3e489a6 --- /dev/null +++ b/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/TenantActionGroupsClient.java @@ -0,0 +1,315 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.monitor.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.monitor.fluent.models.TenantActionGroupResourceInner; +import com.azure.resourcemanager.monitor.models.TenantActionGroupPatchBody; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in TenantActionGroupsClient. + */ +public interface TenantActionGroupsClient { + /** + * Get a tenant action group. + * + * @param managementGroupId The management group ID. + * @param tenantActionGroupName The name of the action group. + * @param xMsClientTenantId The tenant ID of the client making the 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 tenant action group along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> getWithResponseAsync(String managementGroupId, + String tenantActionGroupName, String xMsClientTenantId); + + /** + * Get a tenant action group. + * + * @param managementGroupId The management group ID. + * @param tenantActionGroupName The name of the action group. + * @param xMsClientTenantId The tenant ID of the client making the 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 tenant action group on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono getAsync(String managementGroupId, String tenantActionGroupName, + String xMsClientTenantId); + + /** + * Get a tenant action group. + * + * @param managementGroupId The management group ID. + * @param tenantActionGroupName The name of the action group. + * @param xMsClientTenantId The tenant ID of the client making the 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 tenant action group along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String managementGroupId, String tenantActionGroupName, + String xMsClientTenantId, Context context); + + /** + * Get a tenant action group. + * + * @param managementGroupId The management group ID. + * @param tenantActionGroupName The name of the action group. + * @param xMsClientTenantId The tenant ID of the client making the 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 tenant action group. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + TenantActionGroupResourceInner get(String managementGroupId, String tenantActionGroupName, + String xMsClientTenantId); + + /** + * Create a new tenant action group or update an existing one. + * + * @param managementGroupId The management group ID. + * @param tenantActionGroupName The name of the action group. + * @param xMsClientTenantId The tenant ID of the client making the request. + * @param actionGroup The tenant action group to create or use for the update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a tenant action group resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> createOrUpdateWithResponseAsync(String managementGroupId, + String tenantActionGroupName, String xMsClientTenantId, TenantActionGroupResourceInner actionGroup); + + /** + * Create a new tenant action group or update an existing one. + * + * @param managementGroupId The management group ID. + * @param tenantActionGroupName The name of the action group. + * @param xMsClientTenantId The tenant ID of the client making the request. + * @param actionGroup The tenant action group to create or use for the update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a tenant action group resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono createOrUpdateAsync(String managementGroupId, String tenantActionGroupName, + String xMsClientTenantId, TenantActionGroupResourceInner actionGroup); + + /** + * Create a new tenant action group or update an existing one. + * + * @param managementGroupId The management group ID. + * @param tenantActionGroupName The name of the action group. + * @param xMsClientTenantId The tenant ID of the client making the request. + * @param actionGroup The tenant action group to create or use for the update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a tenant action group resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response createOrUpdateWithResponse(String managementGroupId, + String tenantActionGroupName, String xMsClientTenantId, TenantActionGroupResourceInner actionGroup, + Context context); + + /** + * Create a new tenant action group or update an existing one. + * + * @param managementGroupId The management group ID. + * @param tenantActionGroupName The name of the action group. + * @param xMsClientTenantId The tenant ID of the client making the request. + * @param actionGroup The tenant action group to create or use for the update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a tenant action group resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + TenantActionGroupResourceInner createOrUpdate(String managementGroupId, String tenantActionGroupName, + String xMsClientTenantId, TenantActionGroupResourceInner actionGroup); + + /** + * Updates an existing tenant action group's tags. To update other fields use the CreateOrUpdate method. + * + * @param managementGroupId The management group ID. + * @param tenantActionGroupName The name of the action group. + * @param xMsClientTenantId The tenant ID of the client making the request. + * @param tenantActionGroupPatch Parameters supplied to the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a tenant action group resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> updateWithResponseAsync(String managementGroupId, + String tenantActionGroupName, String xMsClientTenantId, TenantActionGroupPatchBody tenantActionGroupPatch); + + /** + * Updates an existing tenant action group's tags. To update other fields use the CreateOrUpdate method. + * + * @param managementGroupId The management group ID. + * @param tenantActionGroupName The name of the action group. + * @param xMsClientTenantId The tenant ID of the client making the request. + * @param tenantActionGroupPatch Parameters supplied to the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a tenant action group resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono updateAsync(String managementGroupId, String tenantActionGroupName, + String xMsClientTenantId, TenantActionGroupPatchBody tenantActionGroupPatch); + + /** + * Updates an existing tenant action group's tags. To update other fields use the CreateOrUpdate method. + * + * @param managementGroupId The management group ID. + * @param tenantActionGroupName The name of the action group. + * @param xMsClientTenantId The tenant ID of the client making the request. + * @param tenantActionGroupPatch Parameters supplied to the operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a tenant action group resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateWithResponse(String managementGroupId, String tenantActionGroupName, + String xMsClientTenantId, TenantActionGroupPatchBody tenantActionGroupPatch, Context context); + + /** + * Updates an existing tenant action group's tags. To update other fields use the CreateOrUpdate method. + * + * @param managementGroupId The management group ID. + * @param tenantActionGroupName The name of the action group. + * @param xMsClientTenantId The tenant ID of the client making the request. + * @param tenantActionGroupPatch Parameters supplied to the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a tenant action group resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + TenantActionGroupResourceInner update(String managementGroupId, String tenantActionGroupName, + String xMsClientTenantId, TenantActionGroupPatchBody tenantActionGroupPatch); + + /** + * Delete a tenant action group. + * + * @param managementGroupId The management group ID. + * @param tenantActionGroupName The name of the action group. + * @param xMsClientTenantId The tenant ID of the client making the 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 the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> deleteWithResponseAsync(String managementGroupId, String tenantActionGroupName, + String xMsClientTenantId); + + /** + * Delete a tenant action group. + * + * @param managementGroupId The management group ID. + * @param tenantActionGroupName The name of the action group. + * @param xMsClientTenantId The tenant ID of the client making the 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 {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono deleteAsync(String managementGroupId, String tenantActionGroupName, String xMsClientTenantId); + + /** + * Delete a tenant action group. + * + * @param managementGroupId The management group ID. + * @param tenantActionGroupName The name of the action group. + * @param xMsClientTenantId The tenant ID of the client making the 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 deleteWithResponse(String managementGroupId, String tenantActionGroupName, String xMsClientTenantId, + Context context); + + /** + * Delete a tenant action group. + * + * @param managementGroupId The management group ID. + * @param tenantActionGroupName The name of the action group. + * @param xMsClientTenantId The tenant ID of the client making the 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 delete(String managementGroupId, String tenantActionGroupName, String xMsClientTenantId); + + /** + * Get a list of all tenant action groups in a management group. + * + * @param managementGroupId The management group ID. + * @param xMsClientTenantId The tenant ID of the client making the 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 all tenant action groups in a management group as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByManagementGroupIdAsync(String managementGroupId, + String xMsClientTenantId); + + /** + * Get a list of all tenant action groups in a management group. + * + * @param managementGroupId The management group ID. + * @param xMsClientTenantId The tenant ID of the client making the 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 all tenant action groups in a management group as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByManagementGroupId(String managementGroupId, + String xMsClientTenantId); + + /** + * Get a list of all tenant action groups in a management group. + * + * @param managementGroupId The management group ID. + * @param xMsClientTenantId The tenant ID of the client making the 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 all tenant action groups in a management group as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByManagementGroupId(String managementGroupId, + String xMsClientTenantId, Context context); +} diff --git a/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/VMInsightsClient.java b/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/VMInsightsClient.java new file mode 100644 index 000000000000..1712369e0fd1 --- /dev/null +++ b/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/VMInsightsClient.java @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.monitor.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.monitor.fluent.models.VMInsightsOnboardingStatusInner; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in VMInsightsClient. + */ +public interface VMInsightsClient { + /** + * Retrieves the VM Insights onboarding status for the specified resource or resource scope. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @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 vM Insights onboarding status for a resource along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> getOnboardingStatusWithResponseAsync(String resourceUri); + + /** + * Retrieves the VM Insights onboarding status for the specified resource or resource scope. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @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 vM Insights onboarding status for a resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono getOnboardingStatusAsync(String resourceUri); + + /** + * Retrieves the VM Insights onboarding status for the specified resource or resource scope. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @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 vM Insights onboarding status for a resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getOnboardingStatusWithResponse(String resourceUri, Context context); + + /** + * Retrieves the VM Insights onboarding status for the specified resource or resource scope. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @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 vM Insights onboarding status for a resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + VMInsightsOnboardingStatusInner getOnboardingStatus(String resourceUri); +} diff --git a/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/models/ActionGroupPatch.java b/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/models/ActionGroupPatch.java index b650b7687223..6956179d2970 100644 --- a/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/models/ActionGroupPatch.java +++ b/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/models/ActionGroupPatch.java @@ -12,7 +12,7 @@ import java.io.IOException; /** - * An Azure action group for patch operations. + * Action group settings for patch operations. */ @Fluent public final class ActionGroupPatch implements JsonSerializable { diff --git a/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/models/ActivityLogAlertResourceInner.java b/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/models/ActivityLogAlertResourceInner.java index 1e9ba010a90e..918558904963 100644 --- a/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/models/ActivityLogAlertResourceInner.java +++ b/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/models/ActivityLogAlertResourceInner.java @@ -27,12 +27,13 @@ public final class ActivityLogAlertResourceInner extends Resource { private AlertRuleProperties innerProperties; /* - * Resource tags. + * The tags of the resource. */ private Map tags; /* - * The geo-location where the resource lives + * The location of the resource. Azure Activity Log Alert rules are supported on Global, West Europe and North + * Europe regions. */ private String location; @@ -72,7 +73,7 @@ private AlertRuleProperties innerProperties() { } /** - * Get the tags property: Resource tags. + * Get the tags property: The tags of the resource. * * @return the tags value. */ @@ -81,7 +82,7 @@ public Map tags() { } /** - * Set the tags property: Resource tags. + * Set the tags property: The tags of the resource. * * @param tags the tags value to set. * @return the ActivityLogAlertResourceInner object itself. @@ -92,7 +93,8 @@ public ActivityLogAlertResourceInner withTags(Map tags) { } /** - * Get the location property: The geo-location where the resource lives. + * Get the location property: The location of the resource. Azure Activity Log Alert rules are supported on Global, + * West Europe and North Europe regions. * * @return the location value. */ @@ -101,7 +103,8 @@ public String location() { } /** - * Set the location property: The geo-location where the resource lives. + * Set the location property: The location of the resource. Azure Activity Log Alert rules are supported on Global, + * West Europe and North Europe regions. * * @param location the location value to set. * @return the ActivityLogAlertResourceInner object itself. diff --git a/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/models/DiagnosticSettings.java b/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/models/DiagnosticSettings.java index cec252633552..5c4bed2d1dfd 100644 --- a/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/models/DiagnosticSettings.java +++ b/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/models/DiagnosticSettings.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Deprecated generated code. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.monitor.fluent.models; diff --git a/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/models/DiagnosticSettingsCategory.java b/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/models/DiagnosticSettingsCategory.java index fa6dcf356456..434e80172b94 100644 --- a/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/models/DiagnosticSettingsCategory.java +++ b/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/models/DiagnosticSettingsCategory.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Deprecated generated code. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.monitor.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,7 +16,7 @@ /** * The diagnostic settings Category. */ -@Fluent +@Immutable public final class DiagnosticSettingsCategory implements JsonSerializable { /* * The type of the diagnostic settings category. @@ -31,7 +31,7 @@ public final class DiagnosticSettingsCategory implements JsonSerializable categoryGroups() { return this.categoryGroups; } - /** - * Set the categoryGroups property: the collection of what category groups are supported. - * - * @param categoryGroups the categoryGroups value to set. - * @return the DiagnosticSettingsCategory object itself. - */ - public DiagnosticSettingsCategory withCategoryGroups(List categoryGroups) { - this.categoryGroups = categoryGroups; - return this; - } - /** * Validates the instance. * diff --git a/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/models/DiagnosticSettingsCategoryResourceCollectionInner.java b/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/models/DiagnosticSettingsCategoryResourceCollectionInner.java index eda8058ef521..3c3436b33ce9 100644 --- a/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/models/DiagnosticSettingsCategoryResourceCollectionInner.java +++ b/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/models/DiagnosticSettingsCategoryResourceCollectionInner.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Deprecated generated code. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.monitor.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,7 +15,7 @@ /** * Represents a collection of diagnostic setting category resources. */ -@Fluent +@Immutable public final class DiagnosticSettingsCategoryResourceCollectionInner implements JsonSerializable { /* @@ -23,10 +23,15 @@ public final class DiagnosticSettingsCategoryResourceCollectionInner */ private List value; + /* + * The URL to get the next set of results. + */ + private String nextLink; + /** * Creates an instance of DiagnosticSettingsCategoryResourceCollectionInner class. */ - public DiagnosticSettingsCategoryResourceCollectionInner() { + private DiagnosticSettingsCategoryResourceCollectionInner() { } /** @@ -39,15 +44,12 @@ public List value() { } /** - * Set the value property: The collection of diagnostic settings category resources. + * Get the nextLink property: The URL to get the next set of results. * - * @param value the value value to set. - * @return the DiagnosticSettingsCategoryResourceCollectionInner object itself. + * @return the nextLink value. */ - public DiagnosticSettingsCategoryResourceCollectionInner - withValue(List value) { - this.value = value; - return this; + public String nextLink() { + return this.nextLink; } /** @@ -68,6 +70,7 @@ public void validate() { 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(); } @@ -91,6 +94,8 @@ public static DiagnosticSettingsCategoryResourceCollectionInner fromJson(JsonRea List value = reader.readArray(reader1 -> DiagnosticSettingsCategoryResourceInner.fromJson(reader1)); deserializedDiagnosticSettingsCategoryResourceCollectionInner.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedDiagnosticSettingsCategoryResourceCollectionInner.nextLink = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/models/DiagnosticSettingsCategoryResourceInner.java b/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/models/DiagnosticSettingsCategoryResourceInner.java index 25729d89e811..021dee4251c7 100644 --- a/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/models/DiagnosticSettingsCategoryResourceInner.java +++ b/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/models/DiagnosticSettingsCategoryResourceInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Deprecated generated code. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.monitor.fluent.models; @@ -25,7 +25,7 @@ public final class DiagnosticSettingsCategoryResourceInner extends ProxyResource private DiagnosticSettingsCategory innerProperties; /* - * The system metadata related to this resource. + * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ private SystemData systemData; @@ -47,7 +47,7 @@ public final class DiagnosticSettingsCategoryResourceInner extends ProxyResource /** * Creates an instance of DiagnosticSettingsCategoryResourceInner class. */ - public DiagnosticSettingsCategoryResourceInner() { + private DiagnosticSettingsCategoryResourceInner() { } /** @@ -60,7 +60,7 @@ private DiagnosticSettingsCategory innerProperties() { } /** - * Get the systemData property: The system metadata related to this resource. + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * * @return the systemData value. */ @@ -133,6 +133,7 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); return jsonWriter.writeEndObject(); } diff --git a/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/models/DiagnosticSettingsResourceInner.java b/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/models/DiagnosticSettingsResourceInner.java index 4a5f82a30147..c4440b4a379b 100644 --- a/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/models/DiagnosticSettingsResourceInner.java +++ b/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/models/DiagnosticSettingsResourceInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Deprecated generated code. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.monitor.fluent.models; @@ -26,7 +26,7 @@ public final class DiagnosticSettingsResourceInner extends ProxyResource { private DiagnosticSettings innerProperties; /* - * The system metadata related to this resource. + * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ private SystemData systemData; @@ -61,7 +61,7 @@ private DiagnosticSettings innerProperties() { } /** - * Get the systemData property: The system metadata related to this resource. + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * * @return the systemData value. */ diff --git a/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/models/TenantActionGroup.java b/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/models/TenantActionGroup.java new file mode 100644 index 000000000000..9cea4cd488c8 --- /dev/null +++ b/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/models/TenantActionGroup.java @@ -0,0 +1,307 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.monitor.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.monitor.models.AzureAppPushReceiver; +import com.azure.resourcemanager.monitor.models.EmailReceiver; +import com.azure.resourcemanager.monitor.models.SmsReceiver; +import com.azure.resourcemanager.monitor.models.TenantActionGroupWebhookReceiver; +import com.azure.resourcemanager.monitor.models.VoiceReceiver; +import java.io.IOException; +import java.util.List; + +/** + * A tenant action group. + */ +@Fluent +public final class TenantActionGroup implements JsonSerializable { + /* + * The short name of the action group. This will be used in SMS messages. + */ + private String groupShortName; + + /* + * Indicates whether this tenant action group is enabled. If a tenant action group is not enabled, then none of its + * receivers will receive communications. + */ + private boolean enabled; + + /* + * The list of email receivers that are part of this tenant action group. + */ + private List emailReceivers; + + /* + * The list of SMS receivers that are part of this tenant action group. + */ + private List smsReceivers; + + /* + * The list of webhook receivers that are part of this tenant action group. + */ + private List webhookReceivers; + + /* + * The list of AzureAppPush receivers that are part of this tenant action group. + */ + private List azureAppPushReceivers; + + /* + * The list of voice receivers that are part of this tenant action group. + */ + private List voiceReceivers; + + /** + * Creates an instance of TenantActionGroup class. + */ + public TenantActionGroup() { + } + + /** + * Get the groupShortName property: The short name of the action group. This will be used in SMS messages. + * + * @return the groupShortName value. + */ + public String groupShortName() { + return this.groupShortName; + } + + /** + * Set the groupShortName property: The short name of the action group. This will be used in SMS messages. + * + * @param groupShortName the groupShortName value to set. + * @return the TenantActionGroup object itself. + */ + public TenantActionGroup withGroupShortName(String groupShortName) { + this.groupShortName = groupShortName; + return this; + } + + /** + * Get the enabled property: Indicates whether this tenant action group is enabled. If a tenant action group is not + * enabled, then none of its receivers will receive communications. + * + * @return the enabled value. + */ + public boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Indicates whether this tenant action group is enabled. If a tenant action group is not + * enabled, then none of its receivers will receive communications. + * + * @param enabled the enabled value to set. + * @return the TenantActionGroup object itself. + */ + public TenantActionGroup withEnabled(boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get the emailReceivers property: The list of email receivers that are part of this tenant action group. + * + * @return the emailReceivers value. + */ + public List emailReceivers() { + return this.emailReceivers; + } + + /** + * Set the emailReceivers property: The list of email receivers that are part of this tenant action group. + * + * @param emailReceivers the emailReceivers value to set. + * @return the TenantActionGroup object itself. + */ + public TenantActionGroup withEmailReceivers(List emailReceivers) { + this.emailReceivers = emailReceivers; + return this; + } + + /** + * Get the smsReceivers property: The list of SMS receivers that are part of this tenant action group. + * + * @return the smsReceivers value. + */ + public List smsReceivers() { + return this.smsReceivers; + } + + /** + * Set the smsReceivers property: The list of SMS receivers that are part of this tenant action group. + * + * @param smsReceivers the smsReceivers value to set. + * @return the TenantActionGroup object itself. + */ + public TenantActionGroup withSmsReceivers(List smsReceivers) { + this.smsReceivers = smsReceivers; + return this; + } + + /** + * Get the webhookReceivers property: The list of webhook receivers that are part of this tenant action group. + * + * @return the webhookReceivers value. + */ + public List webhookReceivers() { + return this.webhookReceivers; + } + + /** + * Set the webhookReceivers property: The list of webhook receivers that are part of this tenant action group. + * + * @param webhookReceivers the webhookReceivers value to set. + * @return the TenantActionGroup object itself. + */ + public TenantActionGroup withWebhookReceivers(List webhookReceivers) { + this.webhookReceivers = webhookReceivers; + return this; + } + + /** + * Get the azureAppPushReceivers property: The list of AzureAppPush receivers that are part of this tenant action + * group. + * + * @return the azureAppPushReceivers value. + */ + public List azureAppPushReceivers() { + return this.azureAppPushReceivers; + } + + /** + * Set the azureAppPushReceivers property: The list of AzureAppPush receivers that are part of this tenant action + * group. + * + * @param azureAppPushReceivers the azureAppPushReceivers value to set. + * @return the TenantActionGroup object itself. + */ + public TenantActionGroup withAzureAppPushReceivers(List azureAppPushReceivers) { + this.azureAppPushReceivers = azureAppPushReceivers; + return this; + } + + /** + * Get the voiceReceivers property: The list of voice receivers that are part of this tenant action group. + * + * @return the voiceReceivers value. + */ + public List voiceReceivers() { + return this.voiceReceivers; + } + + /** + * Set the voiceReceivers property: The list of voice receivers that are part of this tenant action group. + * + * @param voiceReceivers the voiceReceivers value to set. + * @return the TenantActionGroup object itself. + */ + public TenantActionGroup withVoiceReceivers(List voiceReceivers) { + this.voiceReceivers = voiceReceivers; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (groupShortName() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property groupShortName in model TenantActionGroup")); + } + if (emailReceivers() != null) { + emailReceivers().forEach(e -> e.validate()); + } + if (smsReceivers() != null) { + smsReceivers().forEach(e -> e.validate()); + } + if (webhookReceivers() != null) { + webhookReceivers().forEach(e -> e.validate()); + } + if (azureAppPushReceivers() != null) { + azureAppPushReceivers().forEach(e -> e.validate()); + } + if (voiceReceivers() != null) { + voiceReceivers().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(TenantActionGroup.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("groupShortName", this.groupShortName); + jsonWriter.writeBooleanField("enabled", this.enabled); + jsonWriter.writeArrayField("emailReceivers", this.emailReceivers, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("smsReceivers", this.smsReceivers, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("webhookReceivers", this.webhookReceivers, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("azureAppPushReceivers", this.azureAppPushReceivers, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("voiceReceivers", this.voiceReceivers, + (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of TenantActionGroup from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of TenantActionGroup 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 TenantActionGroup. + */ + public static TenantActionGroup fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + TenantActionGroup deserializedTenantActionGroup = new TenantActionGroup(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("groupShortName".equals(fieldName)) { + deserializedTenantActionGroup.groupShortName = reader.getString(); + } else if ("enabled".equals(fieldName)) { + deserializedTenantActionGroup.enabled = reader.getBoolean(); + } else if ("emailReceivers".equals(fieldName)) { + List emailReceivers = reader.readArray(reader1 -> EmailReceiver.fromJson(reader1)); + deserializedTenantActionGroup.emailReceivers = emailReceivers; + } else if ("smsReceivers".equals(fieldName)) { + List smsReceivers = reader.readArray(reader1 -> SmsReceiver.fromJson(reader1)); + deserializedTenantActionGroup.smsReceivers = smsReceivers; + } else if ("webhookReceivers".equals(fieldName)) { + List webhookReceivers + = reader.readArray(reader1 -> TenantActionGroupWebhookReceiver.fromJson(reader1)); + deserializedTenantActionGroup.webhookReceivers = webhookReceivers; + } else if ("azureAppPushReceivers".equals(fieldName)) { + List azureAppPushReceivers + = reader.readArray(reader1 -> AzureAppPushReceiver.fromJson(reader1)); + deserializedTenantActionGroup.azureAppPushReceivers = azureAppPushReceivers; + } else if ("voiceReceivers".equals(fieldName)) { + List voiceReceivers = reader.readArray(reader1 -> VoiceReceiver.fromJson(reader1)); + deserializedTenantActionGroup.voiceReceivers = voiceReceivers; + } else { + reader.skipChildren(); + } + } + + return deserializedTenantActionGroup; + }); + } +} diff --git a/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/models/TenantActionGroupResourceInner.java b/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/models/TenantActionGroupResourceInner.java new file mode 100644 index 000000000000..a29b04ee4f2a --- /dev/null +++ b/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/models/TenantActionGroupResourceInner.java @@ -0,0 +1,353 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.monitor.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.monitor.models.AzureAppPushReceiver; +import com.azure.resourcemanager.monitor.models.EmailReceiver; +import com.azure.resourcemanager.monitor.models.SmsReceiver; +import com.azure.resourcemanager.monitor.models.TenantActionGroupWebhookReceiver; +import com.azure.resourcemanager.monitor.models.VoiceReceiver; +import java.io.IOException; +import java.util.List; +import java.util.Map; + +/** + * A tenant action group resource. + */ +@Fluent +public final class TenantActionGroupResourceInner extends Resource { + /* + * The tenant action groups properties of the resource. + */ + private TenantActionGroup innerProperties; + + /* + * 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 TenantActionGroupResourceInner class. + */ + public TenantActionGroupResourceInner() { + } + + /** + * Get the innerProperties property: The tenant action groups properties of the resource. + * + * @return the innerProperties value. + */ + private TenantActionGroup innerProperties() { + return this.innerProperties; + } + + /** + * 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 TenantActionGroupResourceInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public TenantActionGroupResourceInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Get the groupShortName property: The short name of the action group. This will be used in SMS messages. + * + * @return the groupShortName value. + */ + public String groupShortName() { + return this.innerProperties() == null ? null : this.innerProperties().groupShortName(); + } + + /** + * Set the groupShortName property: The short name of the action group. This will be used in SMS messages. + * + * @param groupShortName the groupShortName value to set. + * @return the TenantActionGroupResourceInner object itself. + */ + public TenantActionGroupResourceInner withGroupShortName(String groupShortName) { + if (this.innerProperties() == null) { + this.innerProperties = new TenantActionGroup(); + } + this.innerProperties().withGroupShortName(groupShortName); + return this; + } + + /** + * Get the enabled property: Indicates whether this tenant action group is enabled. If a tenant action group is not + * enabled, then none of its receivers will receive communications. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.innerProperties() == null ? null : this.innerProperties().enabled(); + } + + /** + * Set the enabled property: Indicates whether this tenant action group is enabled. If a tenant action group is not + * enabled, then none of its receivers will receive communications. + * + * @param enabled the enabled value to set. + * @return the TenantActionGroupResourceInner object itself. + */ + public TenantActionGroupResourceInner withEnabled(Boolean enabled) { + if (this.innerProperties() == null) { + this.innerProperties = new TenantActionGroup(); + } + this.innerProperties().withEnabled(enabled); + return this; + } + + /** + * Get the emailReceivers property: The list of email receivers that are part of this tenant action group. + * + * @return the emailReceivers value. + */ + public List emailReceivers() { + return this.innerProperties() == null ? null : this.innerProperties().emailReceivers(); + } + + /** + * Set the emailReceivers property: The list of email receivers that are part of this tenant action group. + * + * @param emailReceivers the emailReceivers value to set. + * @return the TenantActionGroupResourceInner object itself. + */ + public TenantActionGroupResourceInner withEmailReceivers(List emailReceivers) { + if (this.innerProperties() == null) { + this.innerProperties = new TenantActionGroup(); + } + this.innerProperties().withEmailReceivers(emailReceivers); + return this; + } + + /** + * Get the smsReceivers property: The list of SMS receivers that are part of this tenant action group. + * + * @return the smsReceivers value. + */ + public List smsReceivers() { + return this.innerProperties() == null ? null : this.innerProperties().smsReceivers(); + } + + /** + * Set the smsReceivers property: The list of SMS receivers that are part of this tenant action group. + * + * @param smsReceivers the smsReceivers value to set. + * @return the TenantActionGroupResourceInner object itself. + */ + public TenantActionGroupResourceInner withSmsReceivers(List smsReceivers) { + if (this.innerProperties() == null) { + this.innerProperties = new TenantActionGroup(); + } + this.innerProperties().withSmsReceivers(smsReceivers); + return this; + } + + /** + * Get the webhookReceivers property: The list of webhook receivers that are part of this tenant action group. + * + * @return the webhookReceivers value. + */ + public List webhookReceivers() { + return this.innerProperties() == null ? null : this.innerProperties().webhookReceivers(); + } + + /** + * Set the webhookReceivers property: The list of webhook receivers that are part of this tenant action group. + * + * @param webhookReceivers the webhookReceivers value to set. + * @return the TenantActionGroupResourceInner object itself. + */ + public TenantActionGroupResourceInner + withWebhookReceivers(List webhookReceivers) { + if (this.innerProperties() == null) { + this.innerProperties = new TenantActionGroup(); + } + this.innerProperties().withWebhookReceivers(webhookReceivers); + return this; + } + + /** + * Get the azureAppPushReceivers property: The list of AzureAppPush receivers that are part of this tenant action + * group. + * + * @return the azureAppPushReceivers value. + */ + public List azureAppPushReceivers() { + return this.innerProperties() == null ? null : this.innerProperties().azureAppPushReceivers(); + } + + /** + * Set the azureAppPushReceivers property: The list of AzureAppPush receivers that are part of this tenant action + * group. + * + * @param azureAppPushReceivers the azureAppPushReceivers value to set. + * @return the TenantActionGroupResourceInner object itself. + */ + public TenantActionGroupResourceInner withAzureAppPushReceivers(List azureAppPushReceivers) { + if (this.innerProperties() == null) { + this.innerProperties = new TenantActionGroup(); + } + this.innerProperties().withAzureAppPushReceivers(azureAppPushReceivers); + return this; + } + + /** + * Get the voiceReceivers property: The list of voice receivers that are part of this tenant action group. + * + * @return the voiceReceivers value. + */ + public List voiceReceivers() { + return this.innerProperties() == null ? null : this.innerProperties().voiceReceivers(); + } + + /** + * Set the voiceReceivers property: The list of voice receivers that are part of this tenant action group. + * + * @param voiceReceivers the voiceReceivers value to set. + * @return the TenantActionGroupResourceInner object itself. + */ + public TenantActionGroupResourceInner withVoiceReceivers(List voiceReceivers) { + if (this.innerProperties() == null) { + this.innerProperties = new TenantActionGroup(); + } + this.innerProperties().withVoiceReceivers(voiceReceivers); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("location", location()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of TenantActionGroupResourceInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of TenantActionGroupResourceInner 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 TenantActionGroupResourceInner. + */ + public static TenantActionGroupResourceInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + TenantActionGroupResourceInner deserializedTenantActionGroupResourceInner + = new TenantActionGroupResourceInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedTenantActionGroupResourceInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedTenantActionGroupResourceInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedTenantActionGroupResourceInner.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedTenantActionGroupResourceInner.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedTenantActionGroupResourceInner.withTags(tags); + } else if ("properties".equals(fieldName)) { + deserializedTenantActionGroupResourceInner.innerProperties = TenantActionGroup.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedTenantActionGroupResourceInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedTenantActionGroupResourceInner; + }); + } +} diff --git a/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/models/TenantActionGroupTestNotificationDetailsResponseInner.java b/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/models/TenantActionGroupTestNotificationDetailsResponseInner.java new file mode 100644 index 000000000000..f16c9b07d89c --- /dev/null +++ b/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/models/TenantActionGroupTestNotificationDetailsResponseInner.java @@ -0,0 +1,176 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.monitor.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.monitor.models.Context; +import com.azure.resourcemanager.monitor.models.TenantActionGroupActionDetail; +import java.io.IOException; +import java.util.List; + +/** + * The details of the test notification results. + */ +@Immutable +public final class TenantActionGroupTestNotificationDetailsResponseInner + implements JsonSerializable { + /* + * The context info + */ + private Context context; + + /* + * The overall state + */ + private String state; + + /* + * The completed time + */ + private String completedTime; + + /* + * The created time + */ + private String createdTime; + + /* + * The list of action detail + */ + private List actionDetails; + + /** + * Creates an instance of TenantActionGroupTestNotificationDetailsResponseInner class. + */ + private TenantActionGroupTestNotificationDetailsResponseInner() { + } + + /** + * Get the context property: The context info. + * + * @return the context value. + */ + public Context context() { + return this.context; + } + + /** + * Get the state property: The overall state. + * + * @return the state value. + */ + public String state() { + return this.state; + } + + /** + * Get the completedTime property: The completed time. + * + * @return the completedTime value. + */ + public String completedTime() { + return this.completedTime; + } + + /** + * Get the createdTime property: The created time. + * + * @return the createdTime value. + */ + public String createdTime() { + return this.createdTime; + } + + /** + * Get the actionDetails property: The list of action detail. + * + * @return the actionDetails value. + */ + public List actionDetails() { + return this.actionDetails; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (context() != null) { + context().validate(); + } + if (state() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property state in model TenantActionGroupTestNotificationDetailsResponseInner")); + } + if (actionDetails() != null) { + actionDetails().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER + = new ClientLogger(TenantActionGroupTestNotificationDetailsResponseInner.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("state", this.state); + jsonWriter.writeJsonField("context", this.context); + jsonWriter.writeStringField("completedTime", this.completedTime); + jsonWriter.writeStringField("createdTime", this.createdTime); + jsonWriter.writeArrayField("actionDetails", this.actionDetails, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of TenantActionGroupTestNotificationDetailsResponseInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of TenantActionGroupTestNotificationDetailsResponseInner 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 TenantActionGroupTestNotificationDetailsResponseInner. + */ + public static TenantActionGroupTestNotificationDetailsResponseInner fromJson(JsonReader jsonReader) + throws IOException { + return jsonReader.readObject(reader -> { + TenantActionGroupTestNotificationDetailsResponseInner deserializedTenantActionGroupTestNotificationDetailsResponseInner + = new TenantActionGroupTestNotificationDetailsResponseInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("state".equals(fieldName)) { + deserializedTenantActionGroupTestNotificationDetailsResponseInner.state = reader.getString(); + } else if ("context".equals(fieldName)) { + deserializedTenantActionGroupTestNotificationDetailsResponseInner.context + = Context.fromJson(reader); + } else if ("completedTime".equals(fieldName)) { + deserializedTenantActionGroupTestNotificationDetailsResponseInner.completedTime + = reader.getString(); + } else if ("createdTime".equals(fieldName)) { + deserializedTenantActionGroupTestNotificationDetailsResponseInner.createdTime = reader.getString(); + } else if ("actionDetails".equals(fieldName)) { + List actionDetails + = reader.readArray(reader1 -> TenantActionGroupActionDetail.fromJson(reader1)); + deserializedTenantActionGroupTestNotificationDetailsResponseInner.actionDetails = actionDetails; + } else { + reader.skipChildren(); + } + } + + return deserializedTenantActionGroupTestNotificationDetailsResponseInner; + }); + } +} diff --git a/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/models/VMInsightsOnboardingStatusInner.java b/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/models/VMInsightsOnboardingStatusInner.java new file mode 100644 index 000000000000..972edf2ca25d --- /dev/null +++ b/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/models/VMInsightsOnboardingStatusInner.java @@ -0,0 +1,200 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.monitor.fluent.models; + +import com.azure.core.annotation.Immutable; +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.monitor.models.DataContainer; +import com.azure.resourcemanager.monitor.models.DataStatus; +import com.azure.resourcemanager.monitor.models.OnboardingStatus; +import java.io.IOException; +import java.util.List; + +/** + * VM Insights onboarding status for a resource. + */ +@Immutable +public final class VMInsightsOnboardingStatusInner extends ProxyResource { + /* + * Resource properties. + */ + private VMInsightsOnboardingStatusProperties innerProperties; + + /* + * 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 VMInsightsOnboardingStatusInner class. + */ + private VMInsightsOnboardingStatusInner() { + } + + /** + * Get the innerProperties property: Resource properties. + * + * @return the innerProperties value. + */ + private VMInsightsOnboardingStatusProperties innerProperties() { + return this.innerProperties; + } + + /** + * 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; + } + + /** + * Get the resourceId property: Azure Resource Manager identifier of the resource whose onboarding status is being + * represented. + * + * @return the resourceId value. + */ + public String resourceId() { + return this.innerProperties() == null ? null : this.innerProperties().resourceId(); + } + + /** + * Get the onboardingStatus property: The onboarding status for the resource. Note that, a higher level scope, e.g., + * resource group or subscription, is considered onboarded if at least one resource under it is onboarded. + * + * @return the onboardingStatus value. + */ + public OnboardingStatus onboardingStatus() { + return this.innerProperties() == null ? null : this.innerProperties().onboardingStatus(); + } + + /** + * Get the dataStatus property: The status of VM Insights data from the resource. When reported as `present` the + * data array will contain information about the data containers to which data for the specified resource is being + * routed. + * + * @return the dataStatus value. + */ + public DataStatus dataStatus() { + return this.innerProperties() == null ? null : this.innerProperties().dataStatus(); + } + + /** + * Get the data property: Containers that currently store VM Insights data for the specified resource. + * + * @return the data value. + */ + public List data() { + return this.innerProperties() == null ? null : this.innerProperties().data(); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VMInsightsOnboardingStatusInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VMInsightsOnboardingStatusInner 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 VMInsightsOnboardingStatusInner. + */ + public static VMInsightsOnboardingStatusInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VMInsightsOnboardingStatusInner deserializedVMInsightsOnboardingStatusInner + = new VMInsightsOnboardingStatusInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedVMInsightsOnboardingStatusInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedVMInsightsOnboardingStatusInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedVMInsightsOnboardingStatusInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedVMInsightsOnboardingStatusInner.innerProperties + = VMInsightsOnboardingStatusProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedVMInsightsOnboardingStatusInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedVMInsightsOnboardingStatusInner; + }); + } +} diff --git a/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/models/VMInsightsOnboardingStatusProperties.java b/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/models/VMInsightsOnboardingStatusProperties.java new file mode 100644 index 000000000000..069d9af596b5 --- /dev/null +++ b/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/models/VMInsightsOnboardingStatusProperties.java @@ -0,0 +1,171 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.monitor.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.monitor.models.DataContainer; +import com.azure.resourcemanager.monitor.models.DataStatus; +import com.azure.resourcemanager.monitor.models.OnboardingStatus; +import java.io.IOException; +import java.util.List; + +/** + * Resource properties. + */ +@Immutable +public final class VMInsightsOnboardingStatusProperties + implements JsonSerializable { + /* + * Azure Resource Manager identifier of the resource whose onboarding status is being represented. + */ + private String resourceId; + + /* + * The onboarding status for the resource. Note that, a higher level scope, e.g., resource group or subscription, is + * considered onboarded if at least one resource under it is onboarded. + */ + private OnboardingStatus onboardingStatus; + + /* + * The status of VM Insights data from the resource. When reported as `present` the data array will contain + * information about the data containers to which data for the specified resource is being routed. + */ + private DataStatus dataStatus; + + /* + * Containers that currently store VM Insights data for the specified resource. + */ + private List data; + + /** + * Creates an instance of VMInsightsOnboardingStatusProperties class. + */ + private VMInsightsOnboardingStatusProperties() { + } + + /** + * Get the resourceId property: Azure Resource Manager identifier of the resource whose onboarding status is being + * represented. + * + * @return the resourceId value. + */ + public String resourceId() { + return this.resourceId; + } + + /** + * Get the onboardingStatus property: The onboarding status for the resource. Note that, a higher level scope, e.g., + * resource group or subscription, is considered onboarded if at least one resource under it is onboarded. + * + * @return the onboardingStatus value. + */ + public OnboardingStatus onboardingStatus() { + return this.onboardingStatus; + } + + /** + * Get the dataStatus property: The status of VM Insights data from the resource. When reported as `present` the + * data array will contain information about the data containers to which data for the specified resource is being + * routed. + * + * @return the dataStatus value. + */ + public DataStatus dataStatus() { + return this.dataStatus; + } + + /** + * Get the data property: Containers that currently store VM Insights data for the specified resource. + * + * @return the data value. + */ + public List data() { + return this.data; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (resourceId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property resourceId in model VMInsightsOnboardingStatusProperties")); + } + if (onboardingStatus() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property onboardingStatus in model VMInsightsOnboardingStatusProperties")); + } + if (dataStatus() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property dataStatus in model VMInsightsOnboardingStatusProperties")); + } + if (data() != null) { + data().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(VMInsightsOnboardingStatusProperties.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("resourceId", this.resourceId); + jsonWriter.writeStringField("onboardingStatus", + this.onboardingStatus == null ? null : this.onboardingStatus.toString()); + jsonWriter.writeStringField("dataStatus", this.dataStatus == null ? null : this.dataStatus.toString()); + jsonWriter.writeArrayField("data", this.data, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VMInsightsOnboardingStatusProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VMInsightsOnboardingStatusProperties 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 VMInsightsOnboardingStatusProperties. + */ + public static VMInsightsOnboardingStatusProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VMInsightsOnboardingStatusProperties deserializedVMInsightsOnboardingStatusProperties + = new VMInsightsOnboardingStatusProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("resourceId".equals(fieldName)) { + deserializedVMInsightsOnboardingStatusProperties.resourceId = reader.getString(); + } else if ("onboardingStatus".equals(fieldName)) { + deserializedVMInsightsOnboardingStatusProperties.onboardingStatus + = OnboardingStatus.fromString(reader.getString()); + } else if ("dataStatus".equals(fieldName)) { + deserializedVMInsightsOnboardingStatusProperties.dataStatus + = DataStatus.fromString(reader.getString()); + } else if ("data".equals(fieldName)) { + List data = reader.readArray(reader1 -> DataContainer.fromJson(reader1)); + deserializedVMInsightsOnboardingStatusProperties.data = data; + } else { + reader.skipChildren(); + } + } + + return deserializedVMInsightsOnboardingStatusProperties; + }); + } +} diff --git a/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/models/WorkspaceInfoProperties.java b/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/models/WorkspaceInfoProperties.java new file mode 100644 index 000000000000..a4b4a19c8509 --- /dev/null +++ b/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/models/WorkspaceInfoProperties.java @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.monitor.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Resource properties. + */ +@Immutable +public final class WorkspaceInfoProperties implements JsonSerializable { + /* + * Log Analytics workspace identifier. + */ + private String customerId; + + /** + * Creates an instance of WorkspaceInfoProperties class. + */ + private WorkspaceInfoProperties() { + } + + /** + * Get the customerId property: Log Analytics workspace identifier. + * + * @return the customerId value. + */ + public String customerId() { + return this.customerId; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (customerId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property customerId in model WorkspaceInfoProperties")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(WorkspaceInfoProperties.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("customerId", this.customerId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of WorkspaceInfoProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of WorkspaceInfoProperties 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 WorkspaceInfoProperties. + */ + public static WorkspaceInfoProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + WorkspaceInfoProperties deserializedWorkspaceInfoProperties = new WorkspaceInfoProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("customerId".equals(fieldName)) { + deserializedWorkspaceInfoProperties.customerId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedWorkspaceInfoProperties; + }); + } +} diff --git a/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/implementation/ActionGroupsClientImpl.java b/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/implementation/ActionGroupsClientImpl.java index 67e15b27c9af..94c68129e661 100644 --- a/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/implementation/ActionGroupsClientImpl.java +++ b/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/implementation/ActionGroupsClientImpl.java @@ -1001,7 +1001,8 @@ public PagedIterable list(Context context) { * @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} on successful completion of {@link Mono}. + * @return the details of the test notification results along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono>> createNotificationsAtActionGroupResourceLevelWithResponseAsync( @@ -1048,7 +1049,8 @@ public Mono>> createNotificationsAtActionGroupResource * @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} on successful completion of {@link Mono}. + * @return the details of the test notification results along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createNotificationsAtActionGroupResourceLevelWithResponseAsync( @@ -1094,7 +1096,7 @@ private Mono>> createNotificationsAtActionGroupResourc * @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. + * @return the {@link PollerFlux} for polling of the details of the test notification results. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public PollerFlux, TestNotificationDetailsResponseInner> @@ -1117,7 +1119,7 @@ private Mono>> createNotificationsAtActionGroupResourc * @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. + * @return the {@link PollerFlux} for polling of the details of the test notification results. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, TestNotificationDetailsResponseInner> @@ -1140,7 +1142,7 @@ private Mono>> createNotificationsAtActionGroupResourc * @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. + * @return the {@link SyncPoller} for polling of the details of the test notification results. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, TestNotificationDetailsResponseInner> @@ -1162,7 +1164,7 @@ private Mono>> createNotificationsAtActionGroupResourc * @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. + * @return the {@link SyncPoller} for polling of the details of the test notification results. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, TestNotificationDetailsResponseInner> @@ -1183,7 +1185,7 @@ private Mono>> createNotificationsAtActionGroupResourc * @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 on successful completion of {@link Mono}. + * @return the details of the test notification results on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono createNotificationsAtActionGroupResourceLevelAsync( @@ -1202,7 +1204,7 @@ public Mono createNotificationsAtActionGro * @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 on successful completion of {@link Mono}. + * @return the details of the test notification results on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createNotificationsAtActionGroupResourceLevelAsync( @@ -1221,7 +1223,7 @@ private Mono createNotificationsAtActionGr * @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. + * @return the details of the test notification results. */ @ServiceMethod(returns = ReturnType.SINGLE) public TestNotificationDetailsResponseInner createNotificationsAtActionGroupResourceLevel(String resourceGroupName, @@ -1240,7 +1242,7 @@ public TestNotificationDetailsResponseInner createNotificationsAtActionGroupReso * @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. + * @return the details of the test notification results. */ @ServiceMethod(returns = ReturnType.SINGLE) public TestNotificationDetailsResponseInner createNotificationsAtActionGroupResourceLevel(String resourceGroupName, diff --git a/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/implementation/AlertRuleManagementClientImpl.java b/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/implementation/AlertRuleManagementClientImpl.java index 5edf85a45292..0e87447ce1c0 100644 --- a/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/implementation/AlertRuleManagementClientImpl.java +++ b/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/implementation/AlertRuleManagementClientImpl.java @@ -10,8 +10,6 @@ import com.azure.core.util.serializer.SerializerAdapter; import com.azure.resourcemanager.monitor.fluent.AlertRuleManagementClient; import com.azure.resourcemanager.monitor.fluent.AlertRulesClient; -import com.azure.resourcemanager.monitor.fluent.DiagnosticSettingsCategoriesClient; -import com.azure.resourcemanager.monitor.fluent.DiagnosticSettingsOperationsClient; import com.azure.resourcemanager.resources.fluentcore.AzureServiceClient; import java.time.Duration; @@ -104,34 +102,6 @@ public AlertRulesClient getAlertRules() { return this.alertRules; } - /** - * The DiagnosticSettingsOperationsClient object to access its operations. - */ - private final DiagnosticSettingsOperationsClient diagnosticSettingsOperations; - - /** - * Gets the DiagnosticSettingsOperationsClient object to access its operations. - * - * @return the DiagnosticSettingsOperationsClient object. - */ - public DiagnosticSettingsOperationsClient getDiagnosticSettingsOperations() { - return this.diagnosticSettingsOperations; - } - - /** - * The DiagnosticSettingsCategoriesClient object to access its operations. - */ - private final DiagnosticSettingsCategoriesClient diagnosticSettingsCategories; - - /** - * Gets the DiagnosticSettingsCategoriesClient object to access its operations. - * - * @return the DiagnosticSettingsCategoriesClient object. - */ - public DiagnosticSettingsCategoriesClient getDiagnosticSettingsCategories() { - return this.diagnosticSettingsCategories; - } - /** * Initializes an instance of AlertRuleManagementClient client. * @@ -151,7 +121,5 @@ public DiagnosticSettingsCategoriesClient getDiagnosticSettingsCategories() { this.subscriptionId = subscriptionId; this.endpoint = endpoint; this.alertRules = new AlertRulesClientImpl(this); - this.diagnosticSettingsOperations = new DiagnosticSettingsOperationsClientImpl(this); - this.diagnosticSettingsCategories = new DiagnosticSettingsCategoriesClientImpl(this); } } diff --git a/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/implementation/DataCollectionRuleAssociationsClientImpl.java b/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/implementation/DataCollectionRuleAssociationsClientImpl.java index fc822c9739e2..323e30642d50 100644 --- a/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/implementation/DataCollectionRuleAssociationsClientImpl.java +++ b/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/implementation/DataCollectionRuleAssociationsClientImpl.java @@ -427,7 +427,7 @@ public DataCollectionRuleAssociationProxyOnlyResourceInner get(String resourceUr /** * Creates or updates an association. * - * @param resourceUri The identifier of the resource. + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @param associationName The name of the association. The name is case insensitive. * @param body The payload. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -464,7 +464,7 @@ public Mono> creat /** * Creates or updates an association. * - * @param resourceUri The identifier of the resource. + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @param associationName The name of the association. The name is case insensitive. * @param body The payload. * @param context The context to associate with this operation. @@ -502,7 +502,7 @@ private Mono> crea /** * Creates or updates an association. * - * @param resourceUri The identifier of the resource. + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @param associationName The name of the association. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -520,7 +520,7 @@ public Mono createAsync(Str /** * Creates or updates an association. * - * @param resourceUri The identifier of the resource. + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @param associationName The name of the association. The name is case insensitive. * @param body The payload. * @param context The context to associate with this operation. @@ -538,7 +538,7 @@ public Response createWithR /** * Creates or updates an association. * - * @param resourceUri The identifier of the resource. + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @param associationName The name of the association. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. diff --git a/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/implementation/DiagnosticSettingImpl.java b/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/implementation/DiagnosticSettingImpl.java index e045f470f92f..a35f22390a67 100644 --- a/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/implementation/DiagnosticSettingImpl.java +++ b/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/implementation/DiagnosticSettingImpl.java @@ -229,7 +229,7 @@ public Mono createResourceAsync() { .collect(Collectors.toList()))); this.innerModel().withMetrics(new ArrayList<>(metricSet.values())); return this.manager() - .alertRuleClient() + .serviceClient() .getDiagnosticSettingsOperations() .createOrUpdateAsync(ResourceUtils.encodeResourceId(this.resourceId), this.name(), this.innerModel()) .map(innerToFluentMap(this)); @@ -238,7 +238,7 @@ public Mono createResourceAsync() { @Override protected Mono getInnerAsync() { return this.manager() - .alertRuleClient() + .serviceClient() .getDiagnosticSettingsOperations() .getAsync(ResourceUtils.encodeResourceId(this.resourceId), this.name()); } diff --git a/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/implementation/DiagnosticSettingsCategoriesClientImpl.java b/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/implementation/DiagnosticSettingsCategoriesClientImpl.java index 35d11b4acadf..4c5a23a720b1 100644 --- a/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/implementation/DiagnosticSettingsCategoriesClientImpl.java +++ b/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/implementation/DiagnosticSettingsCategoriesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Deprecated generated code. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.monitor.implementation; @@ -42,48 +42,57 @@ public final class DiagnosticSettingsCategoriesClientImpl implements DiagnosticS /** * The service client containing this operation class. */ - private final AlertRuleManagementClientImpl client; + private final MonitorClientImpl client; /** * Initializes an instance of DiagnosticSettingsCategoriesClientImpl. * * @param client the instance of the service client containing this operation class. */ - DiagnosticSettingsCategoriesClientImpl(AlertRuleManagementClientImpl client) { + DiagnosticSettingsCategoriesClientImpl(MonitorClientImpl client) { this.service = RestProxy.create(DiagnosticSettingsCategoriesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AlertRuleManagementClientDiagnosticSettingsCategories to be used by - * the proxy service to perform REST calls. + * The interface defining all the services for MonitorClientDiagnosticSettingsCategories to be used by the proxy + * service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AlertRuleManagementClientDiagnosticSettingsCategories") + @Host("{endpoint}") + @ServiceInterface(name = "MonitorClientDiagnosticSettingsCategories") public interface DiagnosticSettingsCategoriesService { @Headers({ "Content-Type: application/json" }) @Get("/{resourceUri}/providers/Microsoft.Insights/diagnosticSettingsCategories/{name}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam(value = "resourceUri", encoded = true) String resourceUri, - @QueryParam("api-version") String apiVersion, @PathParam("name") String name, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam(value = "resourceUri", encoded = true) String resourceUri, @PathParam("name") String name, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/{resourceUri}/providers/Microsoft.Insights/diagnosticSettingsCategories") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam(value = "resourceUri", encoded = true) String resourceUri, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam(value = "resourceUri", encoded = true) String resourceUri, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Gets the diagnostic settings category for the specified resource. * - * @param resourceUri The identifier of the resource. + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @param name The name of the diagnostic setting. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -108,14 +117,14 @@ public Mono> getWithResponseAs final String accept = "application/json"; return FluxUtil .withContext( - context -> service.get(this.client.getEndpoint(), resourceUri, apiVersion, name, accept, context)) + context -> service.get(this.client.getEndpoint(), apiVersion, resourceUri, name, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets the diagnostic settings category for the specified resource. * - * @param resourceUri The identifier of the resource. + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @param name The name of the diagnostic setting. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -140,13 +149,13 @@ private Mono> getWithResponseA final String apiVersion = "2021-05-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), resourceUri, apiVersion, name, accept, context); + return service.get(this.client.getEndpoint(), apiVersion, resourceUri, name, accept, context); } /** * Gets the diagnostic settings category for the specified resource. * - * @param resourceUri The identifier of the resource. + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @param name The name of the diagnostic setting. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -161,7 +170,7 @@ public Mono getAsync(String resourceUri /** * Gets the diagnostic settings category for the specified resource. * - * @param resourceUri The identifier of the resource. + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @param name The name of the diagnostic setting. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -178,7 +187,7 @@ public Response getWithResponse(String /** * Gets the diagnostic settings category for the specified resource. * - * @param resourceUri The identifier of the resource. + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @param name The name of the diagnostic setting. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -193,7 +202,7 @@ public DiagnosticSettingsCategoryResourceInner get(String resourceUri, String na /** * Lists the diagnostic settings categories for the specified resource. * - * @param resourceUri The identifier of the resource. + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @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. @@ -212,16 +221,17 @@ private Mono> listSingleP final String apiVersion = "2021-05-01-preview"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), resourceUri, apiVersion, accept, context)) - .>map(res -> new PagedResponseBase<>( - res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)) + .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, resourceUri, 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 the diagnostic settings categories for the specified resource. * - * @param resourceUri The identifier of the resource. + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @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. @@ -242,15 +252,15 @@ private Mono> listSingleP final String apiVersion = "2021-05-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.list(this.client.getEndpoint(), resourceUri, apiVersion, accept, context) + return service.list(this.client.getEndpoint(), apiVersion, resourceUri, accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), null, null)); + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Lists the diagnostic settings categories for the specified resource. * - * @param resourceUri The identifier of the resource. + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @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. @@ -259,13 +269,13 @@ private Mono> listSingleP */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux listAsync(String resourceUri) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceUri)); + return new PagedFlux<>(() -> listSinglePageAsync(resourceUri), nextLink -> listNextSinglePageAsync(nextLink)); } /** * Lists the diagnostic settings categories for the specified resource. * - * @param resourceUri The identifier of the resource. + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @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. @@ -275,13 +285,14 @@ public PagedFlux listAsync(String resou */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceUri, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceUri, context)); + return new PagedFlux<>(() -> listSinglePageAsync(resourceUri, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * Lists the diagnostic settings categories for the specified resource. * - * @param resourceUri The identifier of the resource. + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @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. @@ -296,7 +307,7 @@ public PagedIterable list(String resour /** * Lists the diagnostic settings categories for the specified resource. * - * @param resourceUri The identifier of the resource. + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @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. @@ -308,4 +319,59 @@ public PagedIterable list(String resour public PagedIterable list(String resourceUri, Context context) { return new PagedIterable<>(listAsync(resourceUri, 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 represents a collection of diagnostic setting category resources along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The 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 represents a collection of diagnostic setting category resources along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink, + Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } } diff --git a/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/implementation/DiagnosticSettingsImpl.java b/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/implementation/DiagnosticSettingsImpl.java index 034e12f8cb36..5eba4ae74189 100644 --- a/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/implementation/DiagnosticSettingsImpl.java +++ b/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/implementation/DiagnosticSettingsImpl.java @@ -67,14 +67,14 @@ public MonitorManager manager() { } public DiagnosticSettingsOperationsClient inner() { - return this.manager().alertRuleClient().getDiagnosticSettingsOperations(); + return this.manager().serviceClient().getDiagnosticSettingsOperations(); } @Override public List listCategoriesByResource(String resourceId) { List categories = new ArrayList<>(); PagedIterable collection = this.manager() - .alertRuleClient() + .serviceClient() .getDiagnosticSettingsCategories() .list(ResourceUtils.encodeResourceId(resourceId)); if (collection != null) { @@ -87,7 +87,7 @@ public List listCategoriesByResource(String resource @Override public PagedFlux listCategoriesByResourceAsync(String resourceId) { - return PagedConverter.mapPage(this.manager.alertRuleClient() + return PagedConverter.mapPage(this.manager.serviceClient() .getDiagnosticSettingsCategories() .listAsync(ResourceUtils.encodeResourceId(resourceId)), DiagnosticSettingsCategoryImpl::new); } @@ -95,7 +95,7 @@ public PagedFlux listCategoriesByResourceAsync(Strin @Override public DiagnosticSettingsCategory getCategory(String resourceId, String name) { return new DiagnosticSettingsCategoryImpl(this.manager() - .alertRuleClient() + .serviceClient() .getDiagnosticSettingsCategories() .get(ResourceUtils.encodeResourceId(resourceId), name)); } @@ -103,7 +103,7 @@ public DiagnosticSettingsCategory getCategory(String resourceId, String name) { @Override public Mono getCategoryAsync(String resourceId, String name) { return this.manager() - .alertRuleClient() + .serviceClient() .getDiagnosticSettingsCategories() .getAsync(ResourceUtils.encodeResourceId(resourceId), name) .map(DiagnosticSettingsCategoryImpl::new); @@ -118,7 +118,7 @@ public PagedIterable listByResource(String resourceId) { public PagedFlux listByResourceAsync(String resourceId) { return PagedConverter.mapPage( this.manager() - .alertRuleClient() + .serviceClient() .getDiagnosticSettingsOperations() .listAsync(ResourceUtils.encodeResourceId(resourceId)), inner -> new DiagnosticSettingImpl(inner.name(), inner, manager)); @@ -127,7 +127,7 @@ public PagedFlux listByResourceAsync(String resourceId) { @Override public void delete(String resourceId, String name) { this.manager() - .alertRuleClient() + .serviceClient() .getDiagnosticSettingsOperations() .delete(ResourceUtils.encodeResourceId(resourceId), name); } @@ -135,7 +135,7 @@ public void delete(String resourceId, String name) { @Override public Mono deleteAsync(String resourceId, String name) { return this.manager() - .alertRuleClient() + .serviceClient() .getDiagnosticSettingsOperations() .deleteAsync(ResourceUtils.encodeResourceId(resourceId), name); } @@ -143,7 +143,7 @@ public Mono deleteAsync(String resourceId, String name) { @Override public DiagnosticSetting get(String resourceId, String name) { return wrapModel(this.manager() - .alertRuleClient() + .serviceClient() .getDiagnosticSettingsOperations() .get(ResourceUtils.encodeResourceId(resourceId), name)); } @@ -151,7 +151,7 @@ public DiagnosticSetting get(String resourceId, String name) { @Override public Mono getAsync(String resourceId, String name) { return this.manager() - .alertRuleClient() + .serviceClient() .getDiagnosticSettingsOperations() .getAsync(ResourceUtils.encodeResourceId(resourceId), name) .map(this::wrapModel); @@ -160,7 +160,7 @@ public Mono getAsync(String resourceId, String name) { @Override public Mono deleteByIdAsync(String id) { return this.manager() - .alertRuleClient() + .serviceClient() .getDiagnosticSettingsOperations() .deleteAsync(getResourceIdFromSettingsId(id), getNameFromSettingsId(id)); } diff --git a/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/implementation/DiagnosticSettingsOperationsClientImpl.java b/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/implementation/DiagnosticSettingsOperationsClientImpl.java index f7445bd62bd4..74c8ca2111ee 100644 --- a/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/implementation/DiagnosticSettingsOperationsClientImpl.java +++ b/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/implementation/DiagnosticSettingsOperationsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Deprecated generated code. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.monitor.implementation; @@ -30,7 +30,7 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.monitor.fluent.DiagnosticSettingsOperationsClient; import com.azure.resourcemanager.monitor.fluent.models.DiagnosticSettingsResourceInner; -import com.azure.resourcemanager.monitor.models.DiagnosticSettingsResourceCollection; +import com.azure.resourcemanager.monitor.implementation.models.DiagnosticSettingsResourceCollection; import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsDelete; import reactor.core.publisher.Mono; @@ -47,67 +47,75 @@ public final class DiagnosticSettingsOperationsClientImpl /** * The service client containing this operation class. */ - private final AlertRuleManagementClientImpl client; + private final MonitorClientImpl client; /** * Initializes an instance of DiagnosticSettingsOperationsClientImpl. * * @param client the instance of the service client containing this operation class. */ - DiagnosticSettingsOperationsClientImpl(AlertRuleManagementClientImpl client) { + DiagnosticSettingsOperationsClientImpl(MonitorClientImpl client) { this.service = RestProxy.create(DiagnosticSettingsOperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AlertRuleManagementClientDiagnosticSettingsOperations to be used by - * the proxy service to perform REST calls. + * The interface defining all the services for MonitorClientDiagnosticSettingsOperations to be used by the proxy + * service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AlertRuleManagementClientDiagnosticSettingsOperations") + @Host("{endpoint}") + @ServiceInterface(name = "MonitorClientDiagnosticSettingsOperations") public interface DiagnosticSettingsOperationsService { @Headers({ "Content-Type: application/json" }) @Get("/{resourceUri}/providers/Microsoft.Insights/diagnosticSettings/{name}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam(value = "resourceUri", encoded = true) String resourceUri, - @QueryParam("api-version") String apiVersion, @PathParam("name") String name, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam(value = "resourceUri", encoded = true) String resourceUri, @PathParam("name") String name, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/{resourceUri}/providers/Microsoft.Insights/diagnosticSettings/{name}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam(value = "resourceUri", encoded = true) String resourceUri, - @QueryParam("api-version") String apiVersion, @PathParam("name") String name, - @BodyParam("application/json") DiagnosticSettingsResourceInner parameters, - @HeaderParam("Accept") String accept, Context context); + Mono> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam(value = "resourceUri", encoded = true) String resourceUri, @PathParam("name") String name, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") DiagnosticSettingsResourceInner parameters, Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/{resourceUri}/providers/Microsoft.Insights/diagnosticSettings/{name}") @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete(@HostParam("$host") String endpoint, - @PathParam(value = "resourceUri", encoded = true) String resourceUri, - @QueryParam("api-version") String apiVersion, @PathParam("name") String name, - @HeaderParam("Accept") String accept, Context context); + Mono> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam(value = "resourceUri", encoded = true) String resourceUri, @PathParam("name") String name, + Context context); @Headers({ "Content-Type: application/json" }) @Get("/{resourceUri}/providers/Microsoft.Insights/diagnosticSettings") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam(value = "resourceUri", encoded = true) String resourceUri, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam(value = "resourceUri", encoded = true) String resourceUri, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Gets the active diagnostic settings for the specified resource. * - * @param resourceUri The identifier of the resource. + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @param name The name of the diagnostic setting. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -131,14 +139,14 @@ public Mono> getWithResponseAsync(Stri final String accept = "application/json"; return FluxUtil .withContext( - context -> service.get(this.client.getEndpoint(), resourceUri, apiVersion, name, accept, context)) + context -> service.get(this.client.getEndpoint(), apiVersion, resourceUri, name, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets the active diagnostic settings for the specified resource. * - * @param resourceUri The identifier of the resource. + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @param name The name of the diagnostic setting. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -163,13 +171,13 @@ private Mono> getWithResponseAsync(Str final String apiVersion = "2021-05-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), resourceUri, apiVersion, name, accept, context); + return service.get(this.client.getEndpoint(), apiVersion, resourceUri, name, accept, context); } /** * Gets the active diagnostic settings for the specified resource. * - * @param resourceUri The identifier of the resource. + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @param name The name of the diagnostic setting. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -184,7 +192,7 @@ public Mono getAsync(String resourceUri, String /** * Gets the active diagnostic settings for the specified resource. * - * @param resourceUri The identifier of the resource. + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @param name The name of the diagnostic setting. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -200,7 +208,7 @@ public Response getWithResponse(String resource /** * Gets the active diagnostic settings for the specified resource. * - * @param resourceUri The identifier of the resource. + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @param name The name of the diagnostic setting. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -215,7 +223,7 @@ public DiagnosticSettingsResourceInner get(String resourceUri, String name) { /** * Creates or updates diagnostic settings for the specified resource. * - * @param resourceUri The identifier of the resource. + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @param name The name of the diagnostic setting. * @param parameters Parameters supplied to the operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -242,17 +250,18 @@ public Mono> createOrUpdateWithRespons parameters.validate(); } final String apiVersion = "2021-05-01-preview"; + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceUri, apiVersion, name, - parameters, accept, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), apiVersion, resourceUri, name, + contentType, accept, parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates or updates diagnostic settings for the specified resource. * - * @param resourceUri The identifier of the resource. + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @param name The name of the diagnostic setting. * @param parameters Parameters supplied to the operation. * @param context The context to associate with this operation. @@ -280,16 +289,17 @@ private Mono> createOrUpdateWithRespon parameters.validate(); } final String apiVersion = "2021-05-01-preview"; + final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), resourceUri, apiVersion, name, parameters, accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), apiVersion, resourceUri, name, contentType, accept, + parameters, context); } /** * Creates or updates diagnostic settings for the specified resource. * - * @param resourceUri The identifier of the resource. + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @param name The name of the diagnostic setting. * @param parameters Parameters supplied to the operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -307,7 +317,7 @@ public Mono createOrUpdateAsync(String resource /** * Creates or updates diagnostic settings for the specified resource. * - * @param resourceUri The identifier of the resource. + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @param name The name of the diagnostic setting. * @param parameters Parameters supplied to the operation. * @param context The context to associate with this operation. @@ -325,7 +335,7 @@ public Response createOrUpdateWithResponse(Stri /** * Creates or updates diagnostic settings for the specified resource. * - * @param resourceUri The identifier of the resource. + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @param name The name of the diagnostic setting. * @param parameters Parameters supplied to the operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -342,7 +352,7 @@ public DiagnosticSettingsResourceInner createOrUpdate(String resourceUri, String /** * Deletes existing diagnostic settings for the specified resource. * - * @param resourceUri The identifier of the resource. + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @param name The name of the diagnostic setting. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -362,17 +372,15 @@ public Mono> deleteWithResponseAsync(String resourceUri, String n return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); } final String apiVersion = "2021-05-01-preview"; - final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.delete(this.client.getEndpoint(), resourceUri, apiVersion, name, accept, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), apiVersion, resourceUri, name, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes existing diagnostic settings for the specified resource. * - * @param resourceUri The identifier of the resource. + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @param name The name of the diagnostic setting. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -393,15 +401,14 @@ private Mono> deleteWithResponseAsync(String resourceUri, String return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); } final String apiVersion = "2021-05-01-preview"; - final String accept = "application/json"; context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), resourceUri, apiVersion, name, accept, context); + return service.delete(this.client.getEndpoint(), apiVersion, resourceUri, name, context); } /** * Deletes existing diagnostic settings for the specified resource. * - * @param resourceUri The identifier of the resource. + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @param name The name of the diagnostic setting. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -416,7 +423,7 @@ public Mono deleteAsync(String resourceUri, String name) { /** * Deletes existing diagnostic settings for the specified resource. * - * @param resourceUri The identifier of the resource. + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @param name The name of the diagnostic setting. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -432,7 +439,7 @@ public Response deleteWithResponse(String resourceUri, String name, Contex /** * Deletes existing diagnostic settings for the specified resource. * - * @param resourceUri The identifier of the resource. + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @param name The name of the diagnostic setting. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -446,7 +453,7 @@ public void delete(String resourceUri, String name) { /** * Gets the active diagnostic settings list for the specified resource. * - * @param resourceUri The identifier of the resource. + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @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. @@ -465,16 +472,16 @@ private Mono> listSinglePageAsync final String apiVersion = "2021-05-01-preview"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), resourceUri, apiVersion, accept, context)) + .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, resourceUri, accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)) + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets the active diagnostic settings list for the specified resource. * - * @param resourceUri The identifier of the resource. + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @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. @@ -495,15 +502,15 @@ private Mono> listSinglePageAsync final String apiVersion = "2021-05-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.list(this.client.getEndpoint(), resourceUri, apiVersion, accept, context) + return service.list(this.client.getEndpoint(), apiVersion, resourceUri, accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), null, null)); + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Gets the active diagnostic settings list for the specified resource. * - * @param resourceUri The identifier of the resource. + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @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. @@ -512,13 +519,13 @@ private Mono> listSinglePageAsync */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux listAsync(String resourceUri) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceUri)); + return new PagedFlux<>(() -> listSinglePageAsync(resourceUri), nextLink -> listNextSinglePageAsync(nextLink)); } /** * Gets the active diagnostic settings list for the specified resource. * - * @param resourceUri The identifier of the resource. + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @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. @@ -528,13 +535,14 @@ public PagedFlux listAsync(String resourceUri) */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceUri, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceUri, context)); + return new PagedFlux<>(() -> listSinglePageAsync(resourceUri, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * Gets the active diagnostic settings list for the specified resource. * - * @param resourceUri The identifier of the resource. + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @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. @@ -549,7 +557,7 @@ public PagedIterable list(String resourceUri) { /** * Gets the active diagnostic settings list for the specified resource. * - * @param resourceUri The identifier of the resource. + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @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. @@ -561,4 +569,58 @@ public PagedIterable list(String resourceUri) { public PagedIterable list(String resourceUri, Context context) { return new PagedIterable<>(listAsync(resourceUri, 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 active diagnostic settings list for the specified resource along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The 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 active diagnostic settings list for the specified resource along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink, + Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } } diff --git a/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/implementation/MetricAlertsClientImpl.java b/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/implementation/MetricAlertsClientImpl.java index 891dad8daa19..adb680ba0d03 100644 --- a/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/implementation/MetricAlertsClientImpl.java +++ b/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/implementation/MetricAlertsClientImpl.java @@ -169,7 +169,7 @@ public Mono> getByResourceGroupWithResponseAs if (ruleName == null) { return Mono.error(new IllegalArgumentException("Parameter ruleName is required and cannot be null.")); } - final String apiVersion = "2024-03-01-preview"; + final String apiVersion = "2026-01-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), apiVersion, @@ -206,7 +206,7 @@ private Mono> getByResourceGroupWithResponseA if (ruleName == null) { return Mono.error(new IllegalArgumentException("Parameter ruleName is required and cannot be null.")); } - final String apiVersion = "2024-03-01-preview"; + final String apiVersion = "2026-01-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.getByResourceGroup(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -295,7 +295,7 @@ public Mono> createOrUpdateWithResponseAsync( } else { parameters.validate(); } - final String apiVersion = "2024-03-01-preview"; + final String apiVersion = "2026-01-01"; final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil @@ -339,7 +339,7 @@ private Mono> createOrUpdateWithResponseAsync } else { parameters.validate(); } - final String apiVersion = "2024-03-01-preview"; + final String apiVersion = "2026-01-01"; final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); @@ -434,7 +434,7 @@ public Mono> updateWithResponseAsync(String r } else { parameters.validate(); } - final String apiVersion = "2024-03-01-preview"; + final String apiVersion = "2026-01-01"; final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil @@ -478,7 +478,7 @@ private Mono> updateWithResponseAsync(String } else { parameters.validate(); } - final String apiVersion = "2024-03-01-preview"; + final String apiVersion = "2026-01-01"; final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); @@ -566,7 +566,7 @@ public Mono> deleteWithResponseAsync(String resourceGroupName, St if (ruleName == null) { return Mono.error(new IllegalArgumentException("Parameter ruleName is required and cannot be null.")); } - final String apiVersion = "2024-03-01-preview"; + final String apiVersion = "2026-01-01"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, ruleName, context)) @@ -601,7 +601,7 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S if (ruleName == null) { return Mono.error(new IllegalArgumentException("Parameter ruleName is required and cannot be null.")); } - final String apiVersion = "2024-03-01-preview"; + final String apiVersion = "2026-01-01"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, ruleName, context); @@ -676,7 +676,7 @@ private Mono> listByResourceGroupSingleP return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } - final String apiVersion = "2024-03-01-preview"; + final String apiVersion = "2026-01-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), apiVersion, @@ -712,7 +712,7 @@ private Mono> listByResourceGroupSingleP return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } - final String apiVersion = "2024-03-01-preview"; + final String apiVersion = "2026-01-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -800,7 +800,7 @@ private Mono> listSinglePageAsync() { return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2024-03-01-preview"; + final String apiVersion = "2026-01-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -830,7 +830,7 @@ private Mono> listSinglePageAsync(Contex return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2024-03-01-preview"; + final String apiVersion = "2026-01-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context) diff --git a/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/implementation/MetricAlertsStatusClientImpl.java b/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/implementation/MetricAlertsStatusClientImpl.java index a8c422bf6f38..d237aa392e12 100644 --- a/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/implementation/MetricAlertsStatusClientImpl.java +++ b/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/implementation/MetricAlertsStatusClientImpl.java @@ -109,7 +109,7 @@ private Mono> listSinglePageAsync(String r if (ruleName == null) { return Mono.error(new IllegalArgumentException("Parameter ruleName is required and cannot be null.")); } - final String apiVersion = "2024-03-01-preview"; + final String apiVersion = "2026-01-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -149,7 +149,7 @@ private Mono> listSinglePageAsync(String r if (ruleName == null) { return Mono.error(new IllegalArgumentException("Parameter ruleName is required and cannot be null.")); } - final String apiVersion = "2024-03-01-preview"; + final String apiVersion = "2026-01-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -254,7 +254,7 @@ private Mono> listByNameSinglePageAsync(St if (statusName == null) { return Mono.error(new IllegalArgumentException("Parameter statusName is required and cannot be null.")); } - final String apiVersion = "2024-03-01-preview"; + final String apiVersion = "2026-01-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByName(this.client.getEndpoint(), apiVersion, @@ -298,7 +298,7 @@ private Mono> listByNameSinglePageAsync(St if (statusName == null) { return Mono.error(new IllegalArgumentException("Parameter statusName is required and cannot be null.")); } - final String apiVersion = "2024-03-01-preview"; + final String apiVersion = "2026-01-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/implementation/MonitorClientImpl.java b/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/implementation/MonitorClientImpl.java index eccce6979503..fedbb4909282 100644 --- a/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/implementation/MonitorClientImpl.java +++ b/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/implementation/MonitorClientImpl.java @@ -4,9 +4,31 @@ package com.azure.resourcemanager.monitor.implementation; +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; import com.azure.core.http.HttpPipeline; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; import com.azure.core.util.serializer.SerializerAdapter; import com.azure.resourcemanager.monitor.fluent.ActionGroupsClient; import com.azure.resourcemanager.monitor.fluent.ActivityLogAlertsClient; @@ -17,6 +39,8 @@ import com.azure.resourcemanager.monitor.fluent.DataCollectionEndpointsClient; import com.azure.resourcemanager.monitor.fluent.DataCollectionRuleAssociationsClient; import com.azure.resourcemanager.monitor.fluent.DataCollectionRulesClient; +import com.azure.resourcemanager.monitor.fluent.DiagnosticSettingsCategoriesClient; +import com.azure.resourcemanager.monitor.fluent.DiagnosticSettingsOperationsClient; import com.azure.resourcemanager.monitor.fluent.EventCategoriesClient; import com.azure.resourcemanager.monitor.fluent.LogProfilesClient; import com.azure.resourcemanager.monitor.fluent.MetricAlertsClient; @@ -34,15 +58,27 @@ import com.azure.resourcemanager.monitor.fluent.PrivateLinkScopesClient; import com.azure.resourcemanager.monitor.fluent.ScheduledQueryRulesClient; import com.azure.resourcemanager.monitor.fluent.ServiceDiagnosticSettingsOperationsClient; +import com.azure.resourcemanager.monitor.fluent.TenantActionGroupsClient; import com.azure.resourcemanager.monitor.fluent.TenantActivityLogsClient; +import com.azure.resourcemanager.monitor.fluent.VMInsightsClient; +import com.azure.resourcemanager.monitor.fluent.models.TenantActionGroupTestNotificationDetailsResponseInner; +import com.azure.resourcemanager.monitor.models.TenantNotificationRequestBody; import com.azure.resourcemanager.resources.fluentcore.AzureServiceClient; +import java.nio.ByteBuffer; import java.time.Duration; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; /** * Initializes a new instance of the MonitorClientImpl type. */ @ServiceClient(builder = MonitorClientBuilder.class) public final class MonitorClientImpl extends AzureServiceClient implements MonitorClient { + /** + * The proxy service used to perform REST calls. + */ + private final MonitorClientService service; + /** * Service host. */ @@ -477,6 +513,62 @@ public NspScheduledQueryRulesClient getNspScheduledQueryRules() { return this.nspScheduledQueryRules; } + /** + * The TenantActionGroupsClient object to access its operations. + */ + private final TenantActionGroupsClient tenantActionGroups; + + /** + * Gets the TenantActionGroupsClient object to access its operations. + * + * @return the TenantActionGroupsClient object. + */ + public TenantActionGroupsClient getTenantActionGroups() { + return this.tenantActionGroups; + } + + /** + * The VMInsightsClient object to access its operations. + */ + private final VMInsightsClient vMInsights; + + /** + * Gets the VMInsightsClient object to access its operations. + * + * @return the VMInsightsClient object. + */ + public VMInsightsClient getVMInsights() { + return this.vMInsights; + } + + /** + * The DiagnosticSettingsOperationsClient object to access its operations. + */ + private final DiagnosticSettingsOperationsClient diagnosticSettingsOperations; + + /** + * Gets the DiagnosticSettingsOperationsClient object to access its operations. + * + * @return the DiagnosticSettingsOperationsClient object. + */ + public DiagnosticSettingsOperationsClient getDiagnosticSettingsOperations() { + return this.diagnosticSettingsOperations; + } + + /** + * The DiagnosticSettingsCategoriesClient object to access its operations. + */ + private final DiagnosticSettingsCategoriesClient diagnosticSettingsCategories; + + /** + * Gets the DiagnosticSettingsCategoriesClient object to access its operations. + * + * @return the DiagnosticSettingsCategoriesClient object. + */ + public DiagnosticSettingsCategoriesClient getDiagnosticSettingsCategories() { + return this.diagnosticSettingsCategories; + } + /** * Initializes an instance of MonitorClient client. * @@ -521,5 +613,469 @@ public NspScheduledQueryRulesClient getNspScheduledQueryRules() { this.baselines = new BaselinesClientImpl(this); this.actionGroups = new ActionGroupsClientImpl(this); this.nspScheduledQueryRules = new NspScheduledQueryRulesClientImpl(this); + this.tenantActionGroups = new TenantActionGroupsClientImpl(this); + this.vMInsights = new VMInsightsClientImpl(this); + this.diagnosticSettingsOperations = new DiagnosticSettingsOperationsClientImpl(this); + this.diagnosticSettingsCategories = new DiagnosticSettingsCategoriesClientImpl(this); + this.service = RestProxy.create(MonitorClientService.class, this.httpPipeline, this.getSerializerAdapter()); + } + + /** + * The interface defining all the services for MonitorClient to be used by the proxy service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "MonitorClient") + public interface MonitorClientService { + @Post("/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Insights/tenantActionGroups/{tenantActionGroupName}/createNotifications") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createNotificationsAtTenantActionGroupResourceLevel( + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("managementGroupId") String managementGroupId, + @PathParam("tenantActionGroupName") String tenantActionGroupName, + @HeaderParam("x-ms-client-tenant-id") String xMsClientTenantId, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") TenantNotificationRequestBody notificationRequest, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/providers/microsoft.Management/managementGroups/{managementGroupId}/providers/microsoft.Insights/tenantActionGroups/{tenantActionGroupName}/notificationStatus/{notificationId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> + getTestNotificationsAtTenantActionGroupResourceLevel(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("managementGroupId") String managementGroupId, + @PathParam("tenantActionGroupName") String tenantActionGroupName, + @PathParam("notificationId") String notificationId, + @HeaderParam("x-ms-client-tenant-id") String xMsClientTenantId, @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Send test notifications to a set of provided receivers. + * + * @param managementGroupId The management group ID. + * @param tenantActionGroupName The name of the action group. + * @param xMsClientTenantId The tenant ID of the client making the request. + * @param notificationRequest The notification request body which includes the contact details. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the details of the test notification results along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> createNotificationsAtTenantActionGroupResourceLevelWithResponseAsync( + String managementGroupId, String tenantActionGroupName, String xMsClientTenantId, + TenantNotificationRequestBody notificationRequest) { + if (this.getEndpoint() == null) { + return Mono + .error(new IllegalArgumentException("Parameter this.getEndpoint() is required and cannot be null.")); + } + if (managementGroupId == null) { + return Mono + .error(new IllegalArgumentException("Parameter managementGroupId is required and cannot be null.")); + } + if (tenantActionGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter tenantActionGroupName is required and cannot be null.")); + } + if (xMsClientTenantId == null) { + return Mono + .error(new IllegalArgumentException("Parameter xMsClientTenantId is required and cannot be null.")); + } + if (notificationRequest == null) { + return Mono + .error(new IllegalArgumentException("Parameter notificationRequest is required and cannot be null.")); + } else { + notificationRequest.validate(); + } + final String apiVersion = "2023-05-01-preview"; + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createNotificationsAtTenantActionGroupResourceLevel(this.getEndpoint(), + apiVersion, managementGroupId, tenantActionGroupName, xMsClientTenantId, contentType, accept, + notificationRequest, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.getContext()).readOnly())); + } + + /** + * Send test notifications to a set of provided receivers. + * + * @param managementGroupId The management group ID. + * @param tenantActionGroupName The name of the action group. + * @param xMsClientTenantId The tenant ID of the client making the request. + * @param notificationRequest The notification request body which includes the contact details. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the details of the test notification results along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createNotificationsAtTenantActionGroupResourceLevelWithResponseAsync( + String managementGroupId, String tenantActionGroupName, String xMsClientTenantId, + TenantNotificationRequestBody notificationRequest, Context context) { + if (this.getEndpoint() == null) { + return Mono + .error(new IllegalArgumentException("Parameter this.getEndpoint() is required and cannot be null.")); + } + if (managementGroupId == null) { + return Mono + .error(new IllegalArgumentException("Parameter managementGroupId is required and cannot be null.")); + } + if (tenantActionGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter tenantActionGroupName is required and cannot be null.")); + } + if (xMsClientTenantId == null) { + return Mono + .error(new IllegalArgumentException("Parameter xMsClientTenantId is required and cannot be null.")); + } + if (notificationRequest == null) { + return Mono + .error(new IllegalArgumentException("Parameter notificationRequest is required and cannot be null.")); + } else { + notificationRequest.validate(); + } + final String apiVersion = "2023-05-01-preview"; + final String contentType = "application/json"; + final String accept = "application/json"; + context = this.mergeContext(context); + return service.createNotificationsAtTenantActionGroupResourceLevel(this.getEndpoint(), apiVersion, + managementGroupId, tenantActionGroupName, xMsClientTenantId, contentType, accept, notificationRequest, + context); + } + + /** + * Send test notifications to a set of provided receivers. + * + * @param managementGroupId The management group ID. + * @param tenantActionGroupName The name of the action group. + * @param xMsClientTenantId The tenant ID of the client making the request. + * @param notificationRequest The notification request body which includes the contact details. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of the details of the test notification results. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public + PollerFlux, TenantActionGroupTestNotificationDetailsResponseInner> + beginCreateNotificationsAtTenantActionGroupResourceLevelAsync(String managementGroupId, + String tenantActionGroupName, String xMsClientTenantId, TenantNotificationRequestBody notificationRequest) { + Mono>> mono = createNotificationsAtTenantActionGroupResourceLevelWithResponseAsync( + managementGroupId, tenantActionGroupName, xMsClientTenantId, notificationRequest); + return this + .getLroResult( + mono, this.getHttpPipeline(), TenantActionGroupTestNotificationDetailsResponseInner.class, + TenantActionGroupTestNotificationDetailsResponseInner.class, this.getContext()); + } + + /** + * Send test notifications to a set of provided receivers. + * + * @param managementGroupId The management group ID. + * @param tenantActionGroupName The name of the action group. + * @param xMsClientTenantId The tenant ID of the client making the request. + * @param notificationRequest The notification request body which includes the contact details. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of the details of the test notification results. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private + PollerFlux, TenantActionGroupTestNotificationDetailsResponseInner> + beginCreateNotificationsAtTenantActionGroupResourceLevelAsync(String managementGroupId, + String tenantActionGroupName, String xMsClientTenantId, TenantNotificationRequestBody notificationRequest, + Context context) { + context = this.mergeContext(context); + Mono>> mono = createNotificationsAtTenantActionGroupResourceLevelWithResponseAsync( + managementGroupId, tenantActionGroupName, xMsClientTenantId, notificationRequest, context); + return this + .getLroResult( + mono, this.getHttpPipeline(), TenantActionGroupTestNotificationDetailsResponseInner.class, + TenantActionGroupTestNotificationDetailsResponseInner.class, context); + } + + /** + * Send test notifications to a set of provided receivers. + * + * @param managementGroupId The management group ID. + * @param tenantActionGroupName The name of the action group. + * @param xMsClientTenantId The tenant ID of the client making the request. + * @param notificationRequest The notification request body which includes the contact details. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the details of the test notification results. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public + SyncPoller, TenantActionGroupTestNotificationDetailsResponseInner> + beginCreateNotificationsAtTenantActionGroupResourceLevel(String managementGroupId, String tenantActionGroupName, + String xMsClientTenantId, TenantNotificationRequestBody notificationRequest) { + return this + .beginCreateNotificationsAtTenantActionGroupResourceLevelAsync(managementGroupId, tenantActionGroupName, + xMsClientTenantId, notificationRequest) + .getSyncPoller(); + } + + /** + * Send test notifications to a set of provided receivers. + * + * @param managementGroupId The management group ID. + * @param tenantActionGroupName The name of the action group. + * @param xMsClientTenantId The tenant ID of the client making the request. + * @param notificationRequest The notification request body which includes the contact details. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the details of the test notification results. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public + SyncPoller, TenantActionGroupTestNotificationDetailsResponseInner> + beginCreateNotificationsAtTenantActionGroupResourceLevel(String managementGroupId, String tenantActionGroupName, + String xMsClientTenantId, TenantNotificationRequestBody notificationRequest, Context context) { + return this + .beginCreateNotificationsAtTenantActionGroupResourceLevelAsync(managementGroupId, tenantActionGroupName, + xMsClientTenantId, notificationRequest, context) + .getSyncPoller(); + } + + /** + * Send test notifications to a set of provided receivers. + * + * @param managementGroupId The management group ID. + * @param tenantActionGroupName The name of the action group. + * @param xMsClientTenantId The tenant ID of the client making the request. + * @param notificationRequest The notification request body which includes the contact details. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the details of the test notification results on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono + createNotificationsAtTenantActionGroupResourceLevelAsync(String managementGroupId, String tenantActionGroupName, + String xMsClientTenantId, TenantNotificationRequestBody notificationRequest) { + return beginCreateNotificationsAtTenantActionGroupResourceLevelAsync(managementGroupId, tenantActionGroupName, + xMsClientTenantId, notificationRequest).last().flatMap(this::getLroFinalResultOrError); + } + + /** + * Send test notifications to a set of provided receivers. + * + * @param managementGroupId The management group ID. + * @param tenantActionGroupName The name of the action group. + * @param xMsClientTenantId The tenant ID of the client making the request. + * @param notificationRequest The notification request body which includes the contact details. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the details of the test notification results on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono + createNotificationsAtTenantActionGroupResourceLevelAsync(String managementGroupId, String tenantActionGroupName, + String xMsClientTenantId, TenantNotificationRequestBody notificationRequest, Context context) { + return beginCreateNotificationsAtTenantActionGroupResourceLevelAsync(managementGroupId, tenantActionGroupName, + xMsClientTenantId, notificationRequest, context).last().flatMap(this::getLroFinalResultOrError); + } + + /** + * Send test notifications to a set of provided receivers. + * + * @param managementGroupId The management group ID. + * @param tenantActionGroupName The name of the action group. + * @param xMsClientTenantId The tenant ID of the client making the request. + * @param notificationRequest The notification request body which includes the contact details. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the details of the test notification results. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public TenantActionGroupTestNotificationDetailsResponseInner createNotificationsAtTenantActionGroupResourceLevel( + String managementGroupId, String tenantActionGroupName, String xMsClientTenantId, + TenantNotificationRequestBody notificationRequest) { + return createNotificationsAtTenantActionGroupResourceLevelAsync(managementGroupId, tenantActionGroupName, + xMsClientTenantId, notificationRequest).block(); + } + + /** + * Send test notifications to a set of provided receivers. + * + * @param managementGroupId The management group ID. + * @param tenantActionGroupName The name of the action group. + * @param xMsClientTenantId The tenant ID of the client making the request. + * @param notificationRequest The notification request body which includes the contact details. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the details of the test notification results. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public TenantActionGroupTestNotificationDetailsResponseInner createNotificationsAtTenantActionGroupResourceLevel( + String managementGroupId, String tenantActionGroupName, String xMsClientTenantId, + TenantNotificationRequestBody notificationRequest, Context context) { + return createNotificationsAtTenantActionGroupResourceLevelAsync(managementGroupId, tenantActionGroupName, + xMsClientTenantId, notificationRequest, context).block(); + } + + /** + * Get the test notifications by the notification id. + * + * @param managementGroupId The management group id. + * @param tenantActionGroupName The name of the action group. + * @param notificationId The notification id. + * @param xMsClientTenantId The tenant ID of the client making the 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 test notifications by the notification id along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> + getTestNotificationsAtTenantActionGroupResourceLevelWithResponseAsync(String managementGroupId, + String tenantActionGroupName, String notificationId, String xMsClientTenantId) { + if (this.getEndpoint() == null) { + return Mono + .error(new IllegalArgumentException("Parameter this.getEndpoint() is required and cannot be null.")); + } + if (managementGroupId == null) { + return Mono + .error(new IllegalArgumentException("Parameter managementGroupId is required and cannot be null.")); + } + if (tenantActionGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter tenantActionGroupName is required and cannot be null.")); + } + if (notificationId == null) { + return Mono.error(new IllegalArgumentException("Parameter notificationId is required and cannot be null.")); + } + if (xMsClientTenantId == null) { + return Mono + .error(new IllegalArgumentException("Parameter xMsClientTenantId is required and cannot be null.")); + } + final String apiVersion = "2023-05-01-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.getTestNotificationsAtTenantActionGroupResourceLevel(this.getEndpoint(), apiVersion, + managementGroupId, tenantActionGroupName, notificationId, xMsClientTenantId, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.getContext()).readOnly())); + } + + /** + * Get the test notifications by the notification id. + * + * @param managementGroupId The management group id. + * @param tenantActionGroupName The name of the action group. + * @param notificationId The notification id. + * @param xMsClientTenantId The tenant ID of the client making the 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 test notifications by the notification id along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + getTestNotificationsAtTenantActionGroupResourceLevelWithResponseAsync(String managementGroupId, + String tenantActionGroupName, String notificationId, String xMsClientTenantId, Context context) { + if (this.getEndpoint() == null) { + return Mono + .error(new IllegalArgumentException("Parameter this.getEndpoint() is required and cannot be null.")); + } + if (managementGroupId == null) { + return Mono + .error(new IllegalArgumentException("Parameter managementGroupId is required and cannot be null.")); + } + if (tenantActionGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter tenantActionGroupName is required and cannot be null.")); + } + if (notificationId == null) { + return Mono.error(new IllegalArgumentException("Parameter notificationId is required and cannot be null.")); + } + if (xMsClientTenantId == null) { + return Mono + .error(new IllegalArgumentException("Parameter xMsClientTenantId is required and cannot be null.")); + } + final String apiVersion = "2023-05-01-preview"; + final String accept = "application/json"; + context = this.mergeContext(context); + return service.getTestNotificationsAtTenantActionGroupResourceLevel(this.getEndpoint(), apiVersion, + managementGroupId, tenantActionGroupName, notificationId, xMsClientTenantId, accept, context); + } + + /** + * Get the test notifications by the notification id. + * + * @param managementGroupId The management group id. + * @param tenantActionGroupName The name of the action group. + * @param notificationId The notification id. + * @param xMsClientTenantId The tenant ID of the client making the 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 test notifications by the notification id on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono + getTestNotificationsAtTenantActionGroupResourceLevelAsync(String managementGroupId, + String tenantActionGroupName, String notificationId, String xMsClientTenantId) { + return getTestNotificationsAtTenantActionGroupResourceLevelWithResponseAsync(managementGroupId, + tenantActionGroupName, notificationId, xMsClientTenantId).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get the test notifications by the notification id. + * + * @param managementGroupId The management group id. + * @param tenantActionGroupName The name of the action group. + * @param notificationId The notification id. + * @param xMsClientTenantId The tenant ID of the client making the 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 test notifications by the notification id along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response + getTestNotificationsAtTenantActionGroupResourceLevelWithResponse(String managementGroupId, + String tenantActionGroupName, String notificationId, String xMsClientTenantId, Context context) { + return getTestNotificationsAtTenantActionGroupResourceLevelWithResponseAsync(managementGroupId, + tenantActionGroupName, notificationId, xMsClientTenantId, context).block(); + } + + /** + * Get the test notifications by the notification id. + * + * @param managementGroupId The management group id. + * @param tenantActionGroupName The name of the action group. + * @param notificationId The notification id. + * @param xMsClientTenantId The tenant ID of the client making the 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 test notifications by the notification id. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public TenantActionGroupTestNotificationDetailsResponseInner getTestNotificationsAtTenantActionGroupResourceLevel( + String managementGroupId, String tenantActionGroupName, String notificationId, String xMsClientTenantId) { + return getTestNotificationsAtTenantActionGroupResourceLevelWithResponse(managementGroupId, + tenantActionGroupName, notificationId, xMsClientTenantId, Context.NONE).getValue(); } } diff --git a/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/implementation/TenantActionGroupsClientImpl.java b/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/implementation/TenantActionGroupsClientImpl.java new file mode 100644 index 000000000000..d73c58347692 --- /dev/null +++ b/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/implementation/TenantActionGroupsClientImpl.java @@ -0,0 +1,894 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.monitor.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.monitor.fluent.TenantActionGroupsClient; +import com.azure.resourcemanager.monitor.fluent.models.TenantActionGroupResourceInner; +import com.azure.resourcemanager.monitor.implementation.models.TenantActionGroupList; +import com.azure.resourcemanager.monitor.models.TenantActionGroupPatchBody; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in TenantActionGroupsClient. + */ +public final class TenantActionGroupsClientImpl implements TenantActionGroupsClient { + /** + * The proxy service used to perform REST calls. + */ + private final TenantActionGroupsService service; + + /** + * The service client containing this operation class. + */ + private final MonitorClientImpl client; + + /** + * Initializes an instance of TenantActionGroupsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + TenantActionGroupsClientImpl(MonitorClientImpl client) { + this.service = RestProxy.create(TenantActionGroupsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for MonitorClientTenantActionGroups to be used by the proxy service to + * perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "MonitorClientTenantActionGroups") + public interface TenantActionGroupsService { + @Headers({ "Content-Type: application/json" }) + @Get("/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Insights/tenantActionGroups/{tenantActionGroupName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("managementGroupId") String managementGroupId, + @PathParam("tenantActionGroupName") String tenantActionGroupName, + @HeaderParam("x-ms-client-tenant-id") String xMsClientTenantId, @HeaderParam("Accept") String accept, + Context context); + + @Put("/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Insights/tenantActionGroups/{tenantActionGroupName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("managementGroupId") String managementGroupId, + @PathParam("tenantActionGroupName") String tenantActionGroupName, + @HeaderParam("x-ms-client-tenant-id") String xMsClientTenantId, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") TenantActionGroupResourceInner actionGroup, Context context); + + @Patch("/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Insights/tenantActionGroups/{tenantActionGroupName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("managementGroupId") String managementGroupId, + @PathParam("tenantActionGroupName") String tenantActionGroupName, + @HeaderParam("x-ms-client-tenant-id") String xMsClientTenantId, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") TenantActionGroupPatchBody tenantActionGroupPatch, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Insights/tenantActionGroups/{tenantActionGroupName}") + @ExpectedResponses({ 200, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("managementGroupId") String managementGroupId, + @PathParam("tenantActionGroupName") String tenantActionGroupName, + @HeaderParam("x-ms-client-tenant-id") String xMsClientTenantId, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Insights/tenantActionGroups") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByManagementGroupId(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("managementGroupId") String managementGroupId, + @HeaderParam("x-ms-client-tenant-id") String xMsClientTenantId, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByManagementGroupIdNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("x-ms-client-tenant-id") String xMsClientTenantId, @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Get a tenant action group. + * + * @param managementGroupId The management group ID. + * @param tenantActionGroupName The name of the action group. + * @param xMsClientTenantId The tenant ID of the client making the 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 tenant action group along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getWithResponseAsync(String managementGroupId, + String tenantActionGroupName, String xMsClientTenantId) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (managementGroupId == null) { + return Mono + .error(new IllegalArgumentException("Parameter managementGroupId is required and cannot be null.")); + } + if (tenantActionGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter tenantActionGroupName is required and cannot be null.")); + } + if (xMsClientTenantId == null) { + return Mono + .error(new IllegalArgumentException("Parameter xMsClientTenantId is required and cannot be null.")); + } + final String apiVersion = "2023-05-01-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), apiVersion, managementGroupId, + tenantActionGroupName, xMsClientTenantId, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a tenant action group. + * + * @param managementGroupId The management group ID. + * @param tenantActionGroupName The name of the action group. + * @param xMsClientTenantId The tenant ID of the client making the 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 tenant action group along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String managementGroupId, + String tenantActionGroupName, String xMsClientTenantId, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (managementGroupId == null) { + return Mono + .error(new IllegalArgumentException("Parameter managementGroupId is required and cannot be null.")); + } + if (tenantActionGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter tenantActionGroupName is required and cannot be null.")); + } + if (xMsClientTenantId == null) { + return Mono + .error(new IllegalArgumentException("Parameter xMsClientTenantId is required and cannot be null.")); + } + final String apiVersion = "2023-05-01-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), apiVersion, managementGroupId, tenantActionGroupName, + xMsClientTenantId, accept, context); + } + + /** + * Get a tenant action group. + * + * @param managementGroupId The management group ID. + * @param tenantActionGroupName The name of the action group. + * @param xMsClientTenantId The tenant ID of the client making the 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 tenant action group on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAsync(String managementGroupId, String tenantActionGroupName, + String xMsClientTenantId) { + return getWithResponseAsync(managementGroupId, tenantActionGroupName, xMsClientTenantId) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a tenant action group. + * + * @param managementGroupId The management group ID. + * @param tenantActionGroupName The name of the action group. + * @param xMsClientTenantId The tenant ID of the client making the 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 tenant action group along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String managementGroupId, + String tenantActionGroupName, String xMsClientTenantId, Context context) { + return getWithResponseAsync(managementGroupId, tenantActionGroupName, xMsClientTenantId, context).block(); + } + + /** + * Get a tenant action group. + * + * @param managementGroupId The management group ID. + * @param tenantActionGroupName The name of the action group. + * @param xMsClientTenantId The tenant ID of the client making the 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 tenant action group. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public TenantActionGroupResourceInner get(String managementGroupId, String tenantActionGroupName, + String xMsClientTenantId) { + return getWithResponse(managementGroupId, tenantActionGroupName, xMsClientTenantId, Context.NONE).getValue(); + } + + /** + * Create a new tenant action group or update an existing one. + * + * @param managementGroupId The management group ID. + * @param tenantActionGroupName The name of the action group. + * @param xMsClientTenantId The tenant ID of the client making the request. + * @param actionGroup The tenant action group to create or use for the update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a tenant action group resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> createOrUpdateWithResponseAsync(String managementGroupId, + String tenantActionGroupName, String xMsClientTenantId, TenantActionGroupResourceInner actionGroup) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (managementGroupId == null) { + return Mono + .error(new IllegalArgumentException("Parameter managementGroupId is required and cannot be null.")); + } + if (tenantActionGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter tenantActionGroupName is required and cannot be null.")); + } + if (xMsClientTenantId == null) { + return Mono + .error(new IllegalArgumentException("Parameter xMsClientTenantId is required and cannot be null.")); + } + if (actionGroup == null) { + return Mono.error(new IllegalArgumentException("Parameter actionGroup is required and cannot be null.")); + } else { + actionGroup.validate(); + } + final String apiVersion = "2023-05-01-preview"; + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), apiVersion, managementGroupId, + tenantActionGroupName, xMsClientTenantId, contentType, accept, actionGroup, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create a new tenant action group or update an existing one. + * + * @param managementGroupId The management group ID. + * @param tenantActionGroupName The name of the action group. + * @param xMsClientTenantId The tenant ID of the client making the request. + * @param actionGroup The tenant action group to create or use for the update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a tenant action group resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateWithResponseAsync(String managementGroupId, + String tenantActionGroupName, String xMsClientTenantId, TenantActionGroupResourceInner actionGroup, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (managementGroupId == null) { + return Mono + .error(new IllegalArgumentException("Parameter managementGroupId is required and cannot be null.")); + } + if (tenantActionGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter tenantActionGroupName is required and cannot be null.")); + } + if (xMsClientTenantId == null) { + return Mono + .error(new IllegalArgumentException("Parameter xMsClientTenantId is required and cannot be null.")); + } + if (actionGroup == null) { + return Mono.error(new IllegalArgumentException("Parameter actionGroup is required and cannot be null.")); + } else { + actionGroup.validate(); + } + final String apiVersion = "2023-05-01-preview"; + final String contentType = "application/json"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.createOrUpdate(this.client.getEndpoint(), apiVersion, managementGroupId, tenantActionGroupName, + xMsClientTenantId, contentType, accept, actionGroup, context); + } + + /** + * Create a new tenant action group or update an existing one. + * + * @param managementGroupId The management group ID. + * @param tenantActionGroupName The name of the action group. + * @param xMsClientTenantId The tenant ID of the client making the request. + * @param actionGroup The tenant action group to create or use for the update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a tenant action group resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createOrUpdateAsync(String managementGroupId, + String tenantActionGroupName, String xMsClientTenantId, TenantActionGroupResourceInner actionGroup) { + return createOrUpdateWithResponseAsync(managementGroupId, tenantActionGroupName, xMsClientTenantId, actionGroup) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Create a new tenant action group or update an existing one. + * + * @param managementGroupId The management group ID. + * @param tenantActionGroupName The name of the action group. + * @param xMsClientTenantId The tenant ID of the client making the request. + * @param actionGroup The tenant action group to create or use for the update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a tenant action group resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrUpdateWithResponse(String managementGroupId, + String tenantActionGroupName, String xMsClientTenantId, TenantActionGroupResourceInner actionGroup, + Context context) { + return createOrUpdateWithResponseAsync(managementGroupId, tenantActionGroupName, xMsClientTenantId, actionGroup, + context).block(); + } + + /** + * Create a new tenant action group or update an existing one. + * + * @param managementGroupId The management group ID. + * @param tenantActionGroupName The name of the action group. + * @param xMsClientTenantId The tenant ID of the client making the request. + * @param actionGroup The tenant action group to create or use for the update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a tenant action group resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public TenantActionGroupResourceInner createOrUpdate(String managementGroupId, String tenantActionGroupName, + String xMsClientTenantId, TenantActionGroupResourceInner actionGroup) { + return createOrUpdateWithResponse(managementGroupId, tenantActionGroupName, xMsClientTenantId, actionGroup, + Context.NONE).getValue(); + } + + /** + * Updates an existing tenant action group's tags. To update other fields use the CreateOrUpdate method. + * + * @param managementGroupId The management group ID. + * @param tenantActionGroupName The name of the action group. + * @param xMsClientTenantId The tenant ID of the client making the request. + * @param tenantActionGroupPatch Parameters supplied to the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a tenant action group resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> updateWithResponseAsync(String managementGroupId, + String tenantActionGroupName, String xMsClientTenantId, TenantActionGroupPatchBody tenantActionGroupPatch) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (managementGroupId == null) { + return Mono + .error(new IllegalArgumentException("Parameter managementGroupId is required and cannot be null.")); + } + if (tenantActionGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter tenantActionGroupName is required and cannot be null.")); + } + if (xMsClientTenantId == null) { + return Mono + .error(new IllegalArgumentException("Parameter xMsClientTenantId is required and cannot be null.")); + } + if (tenantActionGroupPatch == null) { + return Mono.error( + new IllegalArgumentException("Parameter tenantActionGroupPatch is required and cannot be null.")); + } else { + tenantActionGroupPatch.validate(); + } + final String apiVersion = "2023-05-01-preview"; + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.update(this.client.getEndpoint(), apiVersion, managementGroupId, + tenantActionGroupName, xMsClientTenantId, contentType, accept, tenantActionGroupPatch, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Updates an existing tenant action group's tags. To update other fields use the CreateOrUpdate method. + * + * @param managementGroupId The management group ID. + * @param tenantActionGroupName The name of the action group. + * @param xMsClientTenantId The tenant ID of the client making the request. + * @param tenantActionGroupPatch Parameters supplied to the operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a tenant action group resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateWithResponseAsync(String managementGroupId, + String tenantActionGroupName, String xMsClientTenantId, TenantActionGroupPatchBody tenantActionGroupPatch, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (managementGroupId == null) { + return Mono + .error(new IllegalArgumentException("Parameter managementGroupId is required and cannot be null.")); + } + if (tenantActionGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter tenantActionGroupName is required and cannot be null.")); + } + if (xMsClientTenantId == null) { + return Mono + .error(new IllegalArgumentException("Parameter xMsClientTenantId is required and cannot be null.")); + } + if (tenantActionGroupPatch == null) { + return Mono.error( + new IllegalArgumentException("Parameter tenantActionGroupPatch is required and cannot be null.")); + } else { + tenantActionGroupPatch.validate(); + } + final String apiVersion = "2023-05-01-preview"; + final String contentType = "application/json"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.update(this.client.getEndpoint(), apiVersion, managementGroupId, tenantActionGroupName, + xMsClientTenantId, contentType, accept, tenantActionGroupPatch, context); + } + + /** + * Updates an existing tenant action group's tags. To update other fields use the CreateOrUpdate method. + * + * @param managementGroupId The management group ID. + * @param tenantActionGroupName The name of the action group. + * @param xMsClientTenantId The tenant ID of the client making the request. + * @param tenantActionGroupPatch Parameters supplied to the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a tenant action group resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono updateAsync(String managementGroupId, String tenantActionGroupName, + String xMsClientTenantId, TenantActionGroupPatchBody tenantActionGroupPatch) { + return updateWithResponseAsync(managementGroupId, tenantActionGroupName, xMsClientTenantId, + tenantActionGroupPatch).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Updates an existing tenant action group's tags. To update other fields use the CreateOrUpdate method. + * + * @param managementGroupId The management group ID. + * @param tenantActionGroupName The name of the action group. + * @param xMsClientTenantId The tenant ID of the client making the request. + * @param tenantActionGroupPatch Parameters supplied to the operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a tenant action group resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateWithResponse(String managementGroupId, + String tenantActionGroupName, String xMsClientTenantId, TenantActionGroupPatchBody tenantActionGroupPatch, + Context context) { + return updateWithResponseAsync(managementGroupId, tenantActionGroupName, xMsClientTenantId, + tenantActionGroupPatch, context).block(); + } + + /** + * Updates an existing tenant action group's tags. To update other fields use the CreateOrUpdate method. + * + * @param managementGroupId The management group ID. + * @param tenantActionGroupName The name of the action group. + * @param xMsClientTenantId The tenant ID of the client making the request. + * @param tenantActionGroupPatch Parameters supplied to the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a tenant action group resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public TenantActionGroupResourceInner update(String managementGroupId, String tenantActionGroupName, + String xMsClientTenantId, TenantActionGroupPatchBody tenantActionGroupPatch) { + return updateWithResponse(managementGroupId, tenantActionGroupName, xMsClientTenantId, tenantActionGroupPatch, + Context.NONE).getValue(); + } + + /** + * Delete a tenant action group. + * + * @param managementGroupId The management group ID. + * @param tenantActionGroupName The name of the action group. + * @param xMsClientTenantId The tenant ID of the client making the 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) + public Mono> deleteWithResponseAsync(String managementGroupId, String tenantActionGroupName, + String xMsClientTenantId) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (managementGroupId == null) { + return Mono + .error(new IllegalArgumentException("Parameter managementGroupId is required and cannot be null.")); + } + if (tenantActionGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter tenantActionGroupName is required and cannot be null.")); + } + if (xMsClientTenantId == null) { + return Mono + .error(new IllegalArgumentException("Parameter xMsClientTenantId is required and cannot be null.")); + } + final String apiVersion = "2023-05-01-preview"; + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), apiVersion, managementGroupId, + tenantActionGroupName, xMsClientTenantId, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete a tenant action group. + * + * @param managementGroupId The management group ID. + * @param tenantActionGroupName The name of the action group. + * @param xMsClientTenantId The tenant ID of the client making the 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} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteWithResponseAsync(String managementGroupId, String tenantActionGroupName, + String xMsClientTenantId, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (managementGroupId == null) { + return Mono + .error(new IllegalArgumentException("Parameter managementGroupId is required and cannot be null.")); + } + if (tenantActionGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter tenantActionGroupName is required and cannot be null.")); + } + if (xMsClientTenantId == null) { + return Mono + .error(new IllegalArgumentException("Parameter xMsClientTenantId is required and cannot be null.")); + } + final String apiVersion = "2023-05-01-preview"; + context = this.client.mergeContext(context); + return service.delete(this.client.getEndpoint(), apiVersion, managementGroupId, tenantActionGroupName, + xMsClientTenantId, context); + } + + /** + * Delete a tenant action group. + * + * @param managementGroupId The management group ID. + * @param tenantActionGroupName The name of the action group. + * @param xMsClientTenantId The tenant ID of the client making the 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) + public Mono deleteAsync(String managementGroupId, String tenantActionGroupName, String xMsClientTenantId) { + return deleteWithResponseAsync(managementGroupId, tenantActionGroupName, xMsClientTenantId) + .flatMap(ignored -> Mono.empty()); + } + + /** + * Delete a tenant action group. + * + * @param managementGroupId The management group ID. + * @param tenantActionGroupName The name of the action group. + * @param xMsClientTenantId The tenant ID of the client making the 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 deleteWithResponse(String managementGroupId, String tenantActionGroupName, + String xMsClientTenantId, Context context) { + return deleteWithResponseAsync(managementGroupId, tenantActionGroupName, xMsClientTenantId, context).block(); + } + + /** + * Delete a tenant action group. + * + * @param managementGroupId The management group ID. + * @param tenantActionGroupName The name of the action group. + * @param xMsClientTenantId The tenant ID of the client making the 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 delete(String managementGroupId, String tenantActionGroupName, String xMsClientTenantId) { + deleteWithResponse(managementGroupId, tenantActionGroupName, xMsClientTenantId, Context.NONE); + } + + /** + * Get a list of all tenant action groups in a management group. + * + * @param managementGroupId The management group ID. + * @param xMsClientTenantId The tenant ID of the client making the 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 all tenant action groups in a management group along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByManagementGroupIdSinglePageAsync(String managementGroupId, String xMsClientTenantId) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (managementGroupId == null) { + return Mono + .error(new IllegalArgumentException("Parameter managementGroupId is required and cannot be null.")); + } + if (xMsClientTenantId == null) { + return Mono + .error(new IllegalArgumentException("Parameter xMsClientTenantId is required and cannot be null.")); + } + final String apiVersion = "2023-05-01-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByManagementGroupId(this.client.getEndpoint(), apiVersion, + managementGroupId, xMsClientTenantId, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a list of all tenant action groups in a management group. + * + * @param managementGroupId The management group ID. + * @param xMsClientTenantId The tenant ID of the client making the 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 all tenant action groups in a management group along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByManagementGroupIdSinglePageAsync(String managementGroupId, String xMsClientTenantId, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (managementGroupId == null) { + return Mono + .error(new IllegalArgumentException("Parameter managementGroupId is required and cannot be null.")); + } + if (xMsClientTenantId == null) { + return Mono + .error(new IllegalArgumentException("Parameter xMsClientTenantId is required and cannot be null.")); + } + final String apiVersion = "2023-05-01-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByManagementGroupId(this.client.getEndpoint(), apiVersion, managementGroupId, xMsClientTenantId, + accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Get a list of all tenant action groups in a management group. + * + * @param managementGroupId The management group ID. + * @param xMsClientTenantId The tenant ID of the client making the 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 all tenant action groups in a management group as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByManagementGroupIdAsync(String managementGroupId, + String xMsClientTenantId) { + return new PagedFlux<>(() -> listByManagementGroupIdSinglePageAsync(managementGroupId, xMsClientTenantId), + nextLink -> listByManagementGroupIdNextSinglePageAsync(nextLink, xMsClientTenantId)); + } + + /** + * Get a list of all tenant action groups in a management group. + * + * @param managementGroupId The management group ID. + * @param xMsClientTenantId The tenant ID of the client making the 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 all tenant action groups in a management group as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByManagementGroupIdAsync(String managementGroupId, + String xMsClientTenantId, Context context) { + return new PagedFlux<>( + () -> listByManagementGroupIdSinglePageAsync(managementGroupId, xMsClientTenantId, context), + nextLink -> listByManagementGroupIdNextSinglePageAsync(nextLink, xMsClientTenantId, context)); + } + + /** + * Get a list of all tenant action groups in a management group. + * + * @param managementGroupId The management group ID. + * @param xMsClientTenantId The tenant ID of the client making the 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 all tenant action groups in a management group as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByManagementGroupId(String managementGroupId, + String xMsClientTenantId) { + return new PagedIterable<>(listByManagementGroupIdAsync(managementGroupId, xMsClientTenantId)); + } + + /** + * Get a list of all tenant action groups in a management group. + * + * @param managementGroupId The management group ID. + * @param xMsClientTenantId The tenant ID of the client making the 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 all tenant action groups in a management group as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByManagementGroupId(String managementGroupId, + String xMsClientTenantId, Context context) { + return new PagedIterable<>(listByManagementGroupIdAsync(managementGroupId, xMsClientTenantId, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param xMsClientTenantId The tenant ID of the client making the 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 all tenant action groups in a management group along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByManagementGroupIdNextSinglePageAsync(String nextLink, String xMsClientTenantId) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (xMsClientTenantId == null) { + return Mono + .error(new IllegalArgumentException("Parameter xMsClientTenantId is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByManagementGroupIdNext(nextLink, this.client.getEndpoint(), + xMsClientTenantId, 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. + * @param xMsClientTenantId The tenant ID of the client making the 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 all tenant action groups in a management group along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByManagementGroupIdNextSinglePageAsync(String nextLink, String xMsClientTenantId, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (xMsClientTenantId == null) { + return Mono + .error(new IllegalArgumentException("Parameter xMsClientTenantId is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByManagementGroupIdNext(nextLink, this.client.getEndpoint(), xMsClientTenantId, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } +} diff --git a/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/implementation/VMInsightsClientImpl.java b/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/implementation/VMInsightsClientImpl.java new file mode 100644 index 000000000000..72becd894a90 --- /dev/null +++ b/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/implementation/VMInsightsClientImpl.java @@ -0,0 +1,166 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.monitor.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.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.monitor.fluent.VMInsightsClient; +import com.azure.resourcemanager.monitor.fluent.models.VMInsightsOnboardingStatusInner; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in VMInsightsClient. + */ +public final class VMInsightsClientImpl implements VMInsightsClient { + /** + * The proxy service used to perform REST calls. + */ + private final VMInsightsService service; + + /** + * The service client containing this operation class. + */ + private final MonitorClientImpl client; + + /** + * Initializes an instance of VMInsightsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + VMInsightsClientImpl(MonitorClientImpl client) { + this.service + = RestProxy.create(VMInsightsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for MonitorClientVMInsights to be used by the proxy service to perform + * REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "MonitorClientVMInsights") + public interface VMInsightsService { + @Headers({ "Content-Type: application/json" }) + @Get("/{resourceUri}/providers/Microsoft.Insights/vmInsightsOnboardingStatuses/default") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getOnboardingStatus(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam(value = "resourceUri", encoded = true) String resourceUri, @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Retrieves the VM Insights onboarding status for the specified resource or resource scope. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @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 vM Insights onboarding status for a resource along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getOnboardingStatusWithResponseAsync(String resourceUri) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceUri == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null.")); + } + final String apiVersion = "2018-11-27-preview"; + final String accept = "application/json"; + return FluxUtil.withContext( + context -> service.getOnboardingStatus(this.client.getEndpoint(), apiVersion, resourceUri, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Retrieves the VM Insights onboarding status for the specified resource or resource scope. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @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 vM Insights onboarding status for a resource along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getOnboardingStatusWithResponseAsync(String resourceUri, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceUri == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null.")); + } + final String apiVersion = "2018-11-27-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.getOnboardingStatus(this.client.getEndpoint(), apiVersion, resourceUri, accept, context); + } + + /** + * Retrieves the VM Insights onboarding status for the specified resource or resource scope. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @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 vM Insights onboarding status for a resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getOnboardingStatusAsync(String resourceUri) { + return getOnboardingStatusWithResponseAsync(resourceUri).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Retrieves the VM Insights onboarding status for the specified resource or resource scope. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @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 vM Insights onboarding status for a resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getOnboardingStatusWithResponse(String resourceUri, + Context context) { + return getOnboardingStatusWithResponseAsync(resourceUri, context).block(); + } + + /** + * Retrieves the VM Insights onboarding status for the specified resource or resource scope. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @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 vM Insights onboarding status for a resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public VMInsightsOnboardingStatusInner getOnboardingStatus(String resourceUri) { + return getOnboardingStatusWithResponse(resourceUri, Context.NONE).getValue(); + } +} diff --git a/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/implementation/models/DiagnosticSettingsResourceCollection.java b/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/implementation/models/DiagnosticSettingsResourceCollection.java new file mode 100644 index 000000000000..d3cc598b6abc --- /dev/null +++ b/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/implementation/models/DiagnosticSettingsResourceCollection.java @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.monitor.implementation.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.monitor.fluent.models.DiagnosticSettingsResourceInner; +import java.io.IOException; +import java.util.List; + +/** + * Represents a collection of alert rule resources. + */ +@Immutable +public final class DiagnosticSettingsResourceCollection + implements JsonSerializable { + /* + * The collection of diagnostic settings resources;. + */ + private List value; + + /* + * The URL to get the next set of results. + */ + private String nextLink; + + /** + * Creates an instance of DiagnosticSettingsResourceCollection class. + */ + private DiagnosticSettingsResourceCollection() { + } + + /** + * Get the value property: The collection of diagnostic settings resources;. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The URL to get the next set of results. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } + + /** + * {@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 DiagnosticSettingsResourceCollection from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DiagnosticSettingsResourceCollection 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 DiagnosticSettingsResourceCollection. + */ + public static DiagnosticSettingsResourceCollection fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DiagnosticSettingsResourceCollection deserializedDiagnosticSettingsResourceCollection + = new DiagnosticSettingsResourceCollection(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> DiagnosticSettingsResourceInner.fromJson(reader1)); + deserializedDiagnosticSettingsResourceCollection.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedDiagnosticSettingsResourceCollection.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedDiagnosticSettingsResourceCollection; + }); + } +} diff --git a/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/implementation/models/TenantActionGroupList.java b/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/implementation/models/TenantActionGroupList.java new file mode 100644 index 000000000000..cde2df4b329c --- /dev/null +++ b/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/implementation/models/TenantActionGroupList.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.monitor.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.monitor.fluent.models.TenantActionGroupResourceInner; +import java.io.IOException; +import java.util.List; + +/** + * A list of tenant action groups. + */ +@Immutable +public final class TenantActionGroupList implements JsonSerializable { + /* + * The TenantActionGroupResource items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of TenantActionGroupList class. + */ + private TenantActionGroupList() { + } + + /** + * Get the value property: The TenantActionGroupResource 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; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model TenantActionGroupList")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(TenantActionGroupList.class); + + /** + * {@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 TenantActionGroupList from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of TenantActionGroupList 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 TenantActionGroupList. + */ + public static TenantActionGroupList fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + TenantActionGroupList deserializedTenantActionGroupList = new TenantActionGroupList(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> TenantActionGroupResourceInner.fromJson(reader1)); + deserializedTenantActionGroupList.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedTenantActionGroupList.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedTenantActionGroupList; + }); + } +} diff --git a/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/models/CategoryType.java b/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/models/CategoryType.java index 1480513c3898..e0fd4677c11b 100644 --- a/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/models/CategoryType.java +++ b/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/models/CategoryType.java @@ -1,56 +1,51 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Deprecated generated code. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.monitor.models; +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + /** * The type of the diagnostic settings category. */ -public enum CategoryType { +public final class CategoryType extends ExpandableStringEnum { /** - * Enum value Metrics. + * Metrics. */ - METRICS("Metrics"), + public static final CategoryType METRICS = fromString("Metrics"); /** - * Enum value Logs. + * Logs. */ - LOGS("Logs"); + public static final CategoryType LOGS = fromString("Logs"); /** - * The actual serialized value for a CategoryType instance. + * Creates a new instance of CategoryType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. */ - private final String value; - - CategoryType(String value) { - this.value = value; + @Deprecated + public CategoryType() { } /** - * Parses a serialized value to a CategoryType instance. + * Creates or finds a CategoryType from its string representation. * - * @param value the serialized value to parse. - * @return the parsed CategoryType object, or null if unable to parse. + * @param name a name to look for. + * @return the corresponding CategoryType. */ - public static CategoryType fromString(String value) { - if (value == null) { - return null; - } - CategoryType[] items = CategoryType.values(); - for (CategoryType item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; + public static CategoryType fromString(String name) { + return fromString(name, CategoryType.class); } /** - * {@inheritDoc} + * Gets known CategoryType values. + * + * @return known CategoryType values. */ - @Override - public String toString() { - return this.value; + public static Collection values() { + return values(CategoryType.class); } } diff --git a/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/models/DataContainer.java b/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/models/DataContainer.java new file mode 100644 index 000000000000..de5fb90bf287 --- /dev/null +++ b/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/models/DataContainer.java @@ -0,0 +1,92 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.monitor.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Information about a container with data for a given resource. + */ +@Immutable +public final class DataContainer implements JsonSerializable { + /* + * Log Analytics workspace information. + */ + private WorkspaceInfo workspace; + + /** + * Creates an instance of DataContainer class. + */ + private DataContainer() { + } + + /** + * Get the workspace property: Log Analytics workspace information. + * + * @return the workspace value. + */ + public WorkspaceInfo workspace() { + return this.workspace; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (workspace() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property workspace in model DataContainer")); + } else { + workspace().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(DataContainer.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("workspace", this.workspace); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DataContainer from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DataContainer 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 DataContainer. + */ + public static DataContainer fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DataContainer deserializedDataContainer = new DataContainer(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("workspace".equals(fieldName)) { + deserializedDataContainer.workspace = WorkspaceInfo.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedDataContainer; + }); + } +} diff --git a/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/models/DataStatus.java b/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/models/DataStatus.java new file mode 100644 index 000000000000..af2b789e246d --- /dev/null +++ b/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/models/DataStatus.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.monitor.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The status of VM Insights data from the resource. When reported as `present` the data array will contain information + * about the data containers to which data for the specified resource is being routed. + */ +public final class DataStatus extends ExpandableStringEnum { + /** + * present. + */ + public static final DataStatus PRESENT = fromString("present"); + + /** + * notPresent. + */ + public static final DataStatus NOT_PRESENT = fromString("notPresent"); + + /** + * Creates a new instance of DataStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DataStatus() { + } + + /** + * Creates or finds a DataStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding DataStatus. + */ + public static DataStatus fromString(String name) { + return fromString(name, DataStatus.class); + } + + /** + * Gets known DataStatus values. + * + * @return known DataStatus values. + */ + public static Collection values() { + return values(DataStatus.class); + } +} diff --git a/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/models/OnboardingStatus.java b/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/models/OnboardingStatus.java new file mode 100644 index 000000000000..eab6b7e8eb7f --- /dev/null +++ b/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/models/OnboardingStatus.java @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.monitor.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The onboarding status for the resource. Note that, a higher level scope, e.g., resource group or subscription, is + * considered onboarded if at least one resource under it is onboarded. + */ +public final class OnboardingStatus extends ExpandableStringEnum { + /** + * onboarded. + */ + public static final OnboardingStatus ONBOARDED = fromString("onboarded"); + + /** + * notOnboarded. + */ + public static final OnboardingStatus NOT_ONBOARDED = fromString("notOnboarded"); + + /** + * unknown. + */ + public static final OnboardingStatus UNKNOWN = fromString("unknown"); + + /** + * Creates a new instance of OnboardingStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public OnboardingStatus() { + } + + /** + * Creates or finds a OnboardingStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding OnboardingStatus. + */ + public static OnboardingStatus fromString(String name) { + return fromString(name, OnboardingStatus.class); + } + + /** + * Gets known OnboardingStatus values. + * + * @return known OnboardingStatus values. + */ + public static Collection values() { + return values(OnboardingStatus.class); + } +} diff --git a/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/models/TenantActionGroupActionDetail.java b/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/models/TenantActionGroupActionDetail.java new file mode 100644 index 000000000000..495e94fc3f51 --- /dev/null +++ b/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/models/TenantActionGroupActionDetail.java @@ -0,0 +1,168 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.monitor.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 java.io.IOException; + +/** + * The action detail. + */ +@Immutable +public final class TenantActionGroupActionDetail implements JsonSerializable { + /* + * The mechanism type + */ + private String mechanismType; + + /* + * The name of the action + */ + private String name; + + /* + * The status of the action + */ + private String status; + + /* + * The substatus of the action + */ + private String subState; + + /* + * The send time + */ + private String sendTime; + + /* + * The detail of the friendly error message + */ + private String message; + + /** + * Creates an instance of TenantActionGroupActionDetail class. + */ + private TenantActionGroupActionDetail() { + } + + /** + * Get the mechanismType property: The mechanism type. + * + * @return the mechanismType value. + */ + public String mechanismType() { + return this.mechanismType; + } + + /** + * Get the name property: The name of the action. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the status property: The status of the action. + * + * @return the status value. + */ + public String status() { + return this.status; + } + + /** + * Get the subState property: The substatus of the action. + * + * @return the subState value. + */ + public String subState() { + return this.subState; + } + + /** + * Get the sendTime property: The send time. + * + * @return the sendTime value. + */ + public String sendTime() { + return this.sendTime; + } + + /** + * Get the message property: The detail of the friendly error message. + * + * @return the message value. + */ + public String message() { + return this.message; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("mechanismType", this.mechanismType); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeStringField("status", this.status); + jsonWriter.writeStringField("subState", this.subState); + jsonWriter.writeStringField("sendTime", this.sendTime); + jsonWriter.writeStringField("message", this.message); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of TenantActionGroupActionDetail from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of TenantActionGroupActionDetail 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 TenantActionGroupActionDetail. + */ + public static TenantActionGroupActionDetail fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + TenantActionGroupActionDetail deserializedTenantActionGroupActionDetail + = new TenantActionGroupActionDetail(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("mechanismType".equals(fieldName)) { + deserializedTenantActionGroupActionDetail.mechanismType = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedTenantActionGroupActionDetail.name = reader.getString(); + } else if ("status".equals(fieldName)) { + deserializedTenantActionGroupActionDetail.status = reader.getString(); + } else if ("subState".equals(fieldName)) { + deserializedTenantActionGroupActionDetail.subState = reader.getString(); + } else if ("sendTime".equals(fieldName)) { + deserializedTenantActionGroupActionDetail.sendTime = reader.getString(); + } else if ("message".equals(fieldName)) { + deserializedTenantActionGroupActionDetail.message = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedTenantActionGroupActionDetail; + }); + } +} diff --git a/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/models/TenantActionGroupPatchBody.java b/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/models/TenantActionGroupPatchBody.java new file mode 100644 index 000000000000..72172719873f --- /dev/null +++ b/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/models/TenantActionGroupPatchBody.java @@ -0,0 +1,141 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.monitor.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.monitor.fluent.models.ActionGroupPatch; +import java.io.IOException; +import java.util.Map; + +/** + * A tenant action group object for the body of patch operations. + */ +@Fluent +public final class TenantActionGroupPatchBody implements JsonSerializable { + /* + * Resource tags + */ + private Map tags; + + /* + * The action group settings for an update operation. + */ + private ActionGroupPatch innerProperties; + + /** + * Creates an instance of TenantActionGroupPatchBody class. + */ + public TenantActionGroupPatchBody() { + } + + /** + * Get the tags property: Resource tags. + * + * @return the tags value. + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags property: Resource tags. + * + * @param tags the tags value to set. + * @return the TenantActionGroupPatchBody object itself. + */ + public TenantActionGroupPatchBody withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Get the innerProperties property: The action group settings for an update operation. + * + * @return the innerProperties value. + */ + private ActionGroupPatch innerProperties() { + return this.innerProperties; + } + + /** + * Get the enabled property: Indicates whether this action group is enabled. If an action group is not enabled, then + * none of its actions will be activated. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.innerProperties() == null ? null : this.innerProperties().enabled(); + } + + /** + * Set the enabled property: Indicates whether this action group is enabled. If an action group is not enabled, then + * none of its actions will be activated. + * + * @param enabled the enabled value to set. + * @return the TenantActionGroupPatchBody object itself. + */ + public TenantActionGroupPatchBody withEnabled(Boolean enabled) { + if (this.innerProperties() == null) { + this.innerProperties = new ActionGroupPatch(); + } + this.innerProperties().withEnabled(enabled); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of TenantActionGroupPatchBody from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of TenantActionGroupPatchBody 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 TenantActionGroupPatchBody. + */ + public static TenantActionGroupPatchBody fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + TenantActionGroupPatchBody deserializedTenantActionGroupPatchBody = new TenantActionGroupPatchBody(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedTenantActionGroupPatchBody.tags = tags; + } else if ("properties".equals(fieldName)) { + deserializedTenantActionGroupPatchBody.innerProperties = ActionGroupPatch.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedTenantActionGroupPatchBody; + }); + } +} diff --git a/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/models/TenantActionGroupWebhookReceiver.java b/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/models/TenantActionGroupWebhookReceiver.java new file mode 100644 index 000000000000..57f42c7fed62 --- /dev/null +++ b/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/models/TenantActionGroupWebhookReceiver.java @@ -0,0 +1,280 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.monitor.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * A webhook receiver. + */ +@Fluent +public final class TenantActionGroupWebhookReceiver implements JsonSerializable { + /* + * The name of the webhook receiver. Names must be unique across all receivers within a tenant action group. + */ + private String name; + + /* + * The URI where webhooks should be sent. + */ + private String serviceUri; + + /* + * Indicates whether to use common alert schema. + */ + private Boolean useCommonAlertSchema; + + /* + * Indicates whether or not use AAD authentication. + */ + private Boolean useAadAuth; + + /* + * Indicates the webhook app object Id for aad auth. + */ + private String objectId; + + /* + * Indicates the identifier uri for aad auth. + */ + private String identifierUri; + + /* + * Indicates the tenant id for aad auth. + */ + private String tenantId; + + /** + * Creates an instance of TenantActionGroupWebhookReceiver class. + */ + public TenantActionGroupWebhookReceiver() { + } + + /** + * Get the name property: The name of the webhook receiver. Names must be unique across all receivers within a + * tenant action group. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: The name of the webhook receiver. Names must be unique across all receivers within a + * tenant action group. + * + * @param name the name value to set. + * @return the TenantActionGroupWebhookReceiver object itself. + */ + public TenantActionGroupWebhookReceiver withName(String name) { + this.name = name; + return this; + } + + /** + * Get the serviceUri property: The URI where webhooks should be sent. + * + * @return the serviceUri value. + */ + public String serviceUri() { + return this.serviceUri; + } + + /** + * Set the serviceUri property: The URI where webhooks should be sent. + * + * @param serviceUri the serviceUri value to set. + * @return the TenantActionGroupWebhookReceiver object itself. + */ + public TenantActionGroupWebhookReceiver withServiceUri(String serviceUri) { + this.serviceUri = serviceUri; + return this; + } + + /** + * Get the useCommonAlertSchema property: Indicates whether to use common alert schema. + * + * @return the useCommonAlertSchema value. + */ + public Boolean useCommonAlertSchema() { + return this.useCommonAlertSchema; + } + + /** + * Set the useCommonAlertSchema property: Indicates whether to use common alert schema. + * + * @param useCommonAlertSchema the useCommonAlertSchema value to set. + * @return the TenantActionGroupWebhookReceiver object itself. + */ + public TenantActionGroupWebhookReceiver withUseCommonAlertSchema(Boolean useCommonAlertSchema) { + this.useCommonAlertSchema = useCommonAlertSchema; + return this; + } + + /** + * Get the useAadAuth property: Indicates whether or not use AAD authentication. + * + * @return the useAadAuth value. + */ + public Boolean useAadAuth() { + return this.useAadAuth; + } + + /** + * Set the useAadAuth property: Indicates whether or not use AAD authentication. + * + * @param useAadAuth the useAadAuth value to set. + * @return the TenantActionGroupWebhookReceiver object itself. + */ + public TenantActionGroupWebhookReceiver withUseAadAuth(Boolean useAadAuth) { + this.useAadAuth = useAadAuth; + return this; + } + + /** + * Get the objectId property: Indicates the webhook app object Id for aad auth. + * + * @return the objectId value. + */ + public String objectId() { + return this.objectId; + } + + /** + * Set the objectId property: Indicates the webhook app object Id for aad auth. + * + * @param objectId the objectId value to set. + * @return the TenantActionGroupWebhookReceiver object itself. + */ + public TenantActionGroupWebhookReceiver withObjectId(String objectId) { + this.objectId = objectId; + return this; + } + + /** + * Get the identifierUri property: Indicates the identifier uri for aad auth. + * + * @return the identifierUri value. + */ + public String identifierUri() { + return this.identifierUri; + } + + /** + * Set the identifierUri property: Indicates the identifier uri for aad auth. + * + * @param identifierUri the identifierUri value to set. + * @return the TenantActionGroupWebhookReceiver object itself. + */ + public TenantActionGroupWebhookReceiver withIdentifierUri(String identifierUri) { + this.identifierUri = identifierUri; + return this; + } + + /** + * Get the tenantId property: Indicates the tenant id for aad auth. + * + * @return the tenantId value. + */ + public String tenantId() { + return this.tenantId; + } + + /** + * Set the tenantId property: Indicates the tenant id for aad auth. + * + * @param tenantId the tenantId value to set. + * @return the TenantActionGroupWebhookReceiver object itself. + */ + public TenantActionGroupWebhookReceiver withTenantId(String tenantId) { + this.tenantId = tenantId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (name() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property name in model TenantActionGroupWebhookReceiver")); + } + if (serviceUri() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property serviceUri in model TenantActionGroupWebhookReceiver")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(TenantActionGroupWebhookReceiver.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeStringField("serviceUri", this.serviceUri); + jsonWriter.writeBooleanField("useCommonAlertSchema", this.useCommonAlertSchema); + jsonWriter.writeBooleanField("useAadAuth", this.useAadAuth); + jsonWriter.writeStringField("objectId", this.objectId); + jsonWriter.writeStringField("identifierUri", this.identifierUri); + jsonWriter.writeStringField("tenantId", this.tenantId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of TenantActionGroupWebhookReceiver from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of TenantActionGroupWebhookReceiver 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 TenantActionGroupWebhookReceiver. + */ + public static TenantActionGroupWebhookReceiver fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + TenantActionGroupWebhookReceiver deserializedTenantActionGroupWebhookReceiver + = new TenantActionGroupWebhookReceiver(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedTenantActionGroupWebhookReceiver.name = reader.getString(); + } else if ("serviceUri".equals(fieldName)) { + deserializedTenantActionGroupWebhookReceiver.serviceUri = reader.getString(); + } else if ("useCommonAlertSchema".equals(fieldName)) { + deserializedTenantActionGroupWebhookReceiver.useCommonAlertSchema + = reader.getNullable(JsonReader::getBoolean); + } else if ("useAadAuth".equals(fieldName)) { + deserializedTenantActionGroupWebhookReceiver.useAadAuth + = reader.getNullable(JsonReader::getBoolean); + } else if ("objectId".equals(fieldName)) { + deserializedTenantActionGroupWebhookReceiver.objectId = reader.getString(); + } else if ("identifierUri".equals(fieldName)) { + deserializedTenantActionGroupWebhookReceiver.identifierUri = reader.getString(); + } else if ("tenantId".equals(fieldName)) { + deserializedTenantActionGroupWebhookReceiver.tenantId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedTenantActionGroupWebhookReceiver; + }); + } +} diff --git a/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/models/TenantNotificationRequestBody.java b/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/models/TenantNotificationRequestBody.java new file mode 100644 index 000000000000..2810be3fe8bf --- /dev/null +++ b/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/models/TenantNotificationRequestBody.java @@ -0,0 +1,270 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.monitor.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * The request body which contain contact detail metadata. + */ +@Fluent +public final class TenantNotificationRequestBody implements JsonSerializable { + /* + * The value of the supported alert type. Supported alert type value is: servicehealth + */ + private String alertType; + + /* + * The list of email receivers that are part of this action group. + */ + private List emailReceivers; + + /* + * The list of SMS receivers that are part of this action group. + */ + private List smsReceivers; + + /* + * The list of webhook receivers that are part of this action group. + */ + private List webhookReceivers; + + /* + * The list of AzureAppPush receivers that are part of this action group. + */ + private List azureAppPushReceivers; + + /* + * The list of voice receivers that are part of this action group. + */ + private List voiceReceivers; + + /** + * Creates an instance of TenantNotificationRequestBody class. + */ + public TenantNotificationRequestBody() { + } + + /** + * Get the alertType property: The value of the supported alert type. Supported alert type value is: servicehealth. + * + * @return the alertType value. + */ + public String alertType() { + return this.alertType; + } + + /** + * Set the alertType property: The value of the supported alert type. Supported alert type value is: servicehealth. + * + * @param alertType the alertType value to set. + * @return the TenantNotificationRequestBody object itself. + */ + public TenantNotificationRequestBody withAlertType(String alertType) { + this.alertType = alertType; + return this; + } + + /** + * Get the emailReceivers property: The list of email receivers that are part of this action group. + * + * @return the emailReceivers value. + */ + public List emailReceivers() { + return this.emailReceivers; + } + + /** + * Set the emailReceivers property: The list of email receivers that are part of this action group. + * + * @param emailReceivers the emailReceivers value to set. + * @return the TenantNotificationRequestBody object itself. + */ + public TenantNotificationRequestBody withEmailReceivers(List emailReceivers) { + this.emailReceivers = emailReceivers; + return this; + } + + /** + * Get the smsReceivers property: The list of SMS receivers that are part of this action group. + * + * @return the smsReceivers value. + */ + public List smsReceivers() { + return this.smsReceivers; + } + + /** + * Set the smsReceivers property: The list of SMS receivers that are part of this action group. + * + * @param smsReceivers the smsReceivers value to set. + * @return the TenantNotificationRequestBody object itself. + */ + public TenantNotificationRequestBody withSmsReceivers(List smsReceivers) { + this.smsReceivers = smsReceivers; + return this; + } + + /** + * Get the webhookReceivers property: The list of webhook receivers that are part of this action group. + * + * @return the webhookReceivers value. + */ + public List webhookReceivers() { + return this.webhookReceivers; + } + + /** + * Set the webhookReceivers property: The list of webhook receivers that are part of this action group. + * + * @param webhookReceivers the webhookReceivers value to set. + * @return the TenantNotificationRequestBody object itself. + */ + public TenantNotificationRequestBody withWebhookReceivers(List webhookReceivers) { + this.webhookReceivers = webhookReceivers; + return this; + } + + /** + * Get the azureAppPushReceivers property: The list of AzureAppPush receivers that are part of this action group. + * + * @return the azureAppPushReceivers value. + */ + public List azureAppPushReceivers() { + return this.azureAppPushReceivers; + } + + /** + * Set the azureAppPushReceivers property: The list of AzureAppPush receivers that are part of this action group. + * + * @param azureAppPushReceivers the azureAppPushReceivers value to set. + * @return the TenantNotificationRequestBody object itself. + */ + public TenantNotificationRequestBody withAzureAppPushReceivers(List azureAppPushReceivers) { + this.azureAppPushReceivers = azureAppPushReceivers; + return this; + } + + /** + * Get the voiceReceivers property: The list of voice receivers that are part of this action group. + * + * @return the voiceReceivers value. + */ + public List voiceReceivers() { + return this.voiceReceivers; + } + + /** + * Set the voiceReceivers property: The list of voice receivers that are part of this action group. + * + * @param voiceReceivers the voiceReceivers value to set. + * @return the TenantNotificationRequestBody object itself. + */ + public TenantNotificationRequestBody withVoiceReceivers(List voiceReceivers) { + this.voiceReceivers = voiceReceivers; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (alertType() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property alertType in model TenantNotificationRequestBody")); + } + if (emailReceivers() != null) { + emailReceivers().forEach(e -> e.validate()); + } + if (smsReceivers() != null) { + smsReceivers().forEach(e -> e.validate()); + } + if (webhookReceivers() != null) { + webhookReceivers().forEach(e -> e.validate()); + } + if (azureAppPushReceivers() != null) { + azureAppPushReceivers().forEach(e -> e.validate()); + } + if (voiceReceivers() != null) { + voiceReceivers().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(TenantNotificationRequestBody.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("alertType", this.alertType); + jsonWriter.writeArrayField("emailReceivers", this.emailReceivers, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("smsReceivers", this.smsReceivers, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("webhookReceivers", this.webhookReceivers, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("azureAppPushReceivers", this.azureAppPushReceivers, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("voiceReceivers", this.voiceReceivers, + (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of TenantNotificationRequestBody from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of TenantNotificationRequestBody 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 TenantNotificationRequestBody. + */ + public static TenantNotificationRequestBody fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + TenantNotificationRequestBody deserializedTenantNotificationRequestBody + = new TenantNotificationRequestBody(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("alertType".equals(fieldName)) { + deserializedTenantNotificationRequestBody.alertType = reader.getString(); + } else if ("emailReceivers".equals(fieldName)) { + List emailReceivers = reader.readArray(reader1 -> EmailReceiver.fromJson(reader1)); + deserializedTenantNotificationRequestBody.emailReceivers = emailReceivers; + } else if ("smsReceivers".equals(fieldName)) { + List smsReceivers = reader.readArray(reader1 -> SmsReceiver.fromJson(reader1)); + deserializedTenantNotificationRequestBody.smsReceivers = smsReceivers; + } else if ("webhookReceivers".equals(fieldName)) { + List webhookReceivers + = reader.readArray(reader1 -> TenantActionGroupWebhookReceiver.fromJson(reader1)); + deserializedTenantNotificationRequestBody.webhookReceivers = webhookReceivers; + } else if ("azureAppPushReceivers".equals(fieldName)) { + List azureAppPushReceivers + = reader.readArray(reader1 -> AzureAppPushReceiver.fromJson(reader1)); + deserializedTenantNotificationRequestBody.azureAppPushReceivers = azureAppPushReceivers; + } else if ("voiceReceivers".equals(fieldName)) { + List voiceReceivers = reader.readArray(reader1 -> VoiceReceiver.fromJson(reader1)); + deserializedTenantNotificationRequestBody.voiceReceivers = voiceReceivers; + } else { + reader.skipChildren(); + } + } + + return deserializedTenantNotificationRequestBody; + }); + } +} diff --git a/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/models/WorkspaceInfo.java b/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/models/WorkspaceInfo.java new file mode 100644 index 000000000000..ec417ace57c5 --- /dev/null +++ b/sdk/monitor/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/models/WorkspaceInfo.java @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.monitor.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.monitor.fluent.models.WorkspaceInfoProperties; +import java.io.IOException; + +/** + * Information about a Log Analytics Workspace. + */ +@Immutable +public final class WorkspaceInfo implements JsonSerializable { + /* + * Azure Resource Manager identifier of the Log Analytics Workspace. + */ + private String id; + + /* + * Location of the Log Analytics workspace. + */ + private String location; + + /* + * Resource properties. + */ + private WorkspaceInfoProperties innerProperties; + + /** + * Creates an instance of WorkspaceInfo class. + */ + private WorkspaceInfo() { + } + + /** + * Get the id property: Azure Resource Manager identifier of the Log Analytics Workspace. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Get the location property: Location of the Log Analytics workspace. + * + * @return the location value. + */ + public String location() { + return this.location; + } + + /** + * Get the innerProperties property: Resource properties. + * + * @return the innerProperties value. + */ + private WorkspaceInfoProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the customerId property: Log Analytics workspace identifier. + * + * @return the customerId value. + */ + public String customerId() { + return this.innerProperties() == null ? null : this.innerProperties().customerId(); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (id() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property id in model WorkspaceInfo")); + } + if (location() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property location in model WorkspaceInfo")); + } + if (innerProperties() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property innerProperties in model WorkspaceInfo")); + } else { + innerProperties().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(WorkspaceInfo.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("id", this.id); + jsonWriter.writeStringField("location", this.location); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of WorkspaceInfo from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of WorkspaceInfo 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 WorkspaceInfo. + */ + public static WorkspaceInfo fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + WorkspaceInfo deserializedWorkspaceInfo = new WorkspaceInfo(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedWorkspaceInfo.id = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedWorkspaceInfo.location = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedWorkspaceInfo.innerProperties = WorkspaceInfoProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedWorkspaceInfo; + }); + } +} diff --git a/sdk/monitor/azure-resourcemanager-monitor/src/main/resources/META-INF/azure-resourcemanager-monitor_metadata.json b/sdk/monitor/azure-resourcemanager-monitor/src/main/resources/META-INF/azure-resourcemanager-monitor_metadata.json index e60067909d0d..bcb471246ec4 100644 --- a/sdk/monitor/azure-resourcemanager-monitor/src/main/resources/META-INF/azure-resourcemanager-monitor_metadata.json +++ b/sdk/monitor/azure-resourcemanager-monitor/src/main/resources/META-INF/azure-resourcemanager-monitor_metadata.json @@ -1 +1 @@ -{"flavor":"azure","apiVersions":{"Microsoft.DataCollection":"2024-03-11","Microsoft.PrivateLinkScopes":"2023-06-01-preview","Microsoft.AutoScale":"2022-10-01","Microsoft.ActivityLogs":"2015-04-01","Microsoft.Metrics":"2024-02-01","Microsoft.ServiceDiagnosticsSettings":"2016-09-01","Microsoft.AlertRulesIncidents":"2016-03-01","Microsoft.LogProfiles":"2016-03-01","Microsoft.ActivityLogAlerts":"2023-01-01-preview","Microsoft.MetricAlert":"2024-03-01-preview","Microsoft.ScheduledQueryRule":"2025-01-01-preview","Microsoft.MetricBaselines":"2019-03-01","Microsoft.ActionGroups":"2024-10-01-preview","Microsoft.NetworkSecurityPerimeter":"2021-10-01"},"generatedFiles":["src/main/java/com/azure/resourcemanager/monitor/fluent/ActionGroupsClient.java","src/main/java/com/azure/resourcemanager/monitor/fluent/ActivityLogAlertsClient.java","src/main/java/com/azure/resourcemanager/monitor/fluent/ActivityLogsClient.java","src/main/java/com/azure/resourcemanager/monitor/fluent/AlertRuleIncidentsClient.java","src/main/java/com/azure/resourcemanager/monitor/fluent/AutoscaleSettingsClient.java","src/main/java/com/azure/resourcemanager/monitor/fluent/BaselinesClient.java","src/main/java/com/azure/resourcemanager/monitor/fluent/DataCollectionEndpointsClient.java","src/main/java/com/azure/resourcemanager/monitor/fluent/DataCollectionRuleAssociationsClient.java","src/main/java/com/azure/resourcemanager/monitor/fluent/DataCollectionRulesClient.java","src/main/java/com/azure/resourcemanager/monitor/fluent/EventCategoriesClient.java","src/main/java/com/azure/resourcemanager/monitor/fluent/LogProfilesClient.java","src/main/java/com/azure/resourcemanager/monitor/fluent/MetricAlertsClient.java","src/main/java/com/azure/resourcemanager/monitor/fluent/MetricAlertsStatusClient.java","src/main/java/com/azure/resourcemanager/monitor/fluent/MetricDefinitionsClient.java","src/main/java/com/azure/resourcemanager/monitor/fluent/MetricNamespacesClient.java","src/main/java/com/azure/resourcemanager/monitor/fluent/MetricsClient.java","src/main/java/com/azure/resourcemanager/monitor/fluent/MonitorClient.java","src/main/java/com/azure/resourcemanager/monitor/fluent/NspScheduledQueryRulesClient.java","src/main/java/com/azure/resourcemanager/monitor/fluent/PredictiveMetricsClient.java","src/main/java/com/azure/resourcemanager/monitor/fluent/PrivateEndpointConnectionsClient.java","src/main/java/com/azure/resourcemanager/monitor/fluent/PrivateLinkResourcesClient.java","src/main/java/com/azure/resourcemanager/monitor/fluent/PrivateLinkScopeOperationStatusClient.java","src/main/java/com/azure/resourcemanager/monitor/fluent/PrivateLinkScopedResourcesClient.java","src/main/java/com/azure/resourcemanager/monitor/fluent/PrivateLinkScopesClient.java","src/main/java/com/azure/resourcemanager/monitor/fluent/ScheduledQueryRulesClient.java","src/main/java/com/azure/resourcemanager/monitor/fluent/ServiceDiagnosticSettingsOperationsClient.java","src/main/java/com/azure/resourcemanager/monitor/fluent/TenantActivityLogsClient.java","src/main/java/com/azure/resourcemanager/monitor/fluent/models/ActionGroup.java","src/main/java/com/azure/resourcemanager/monitor/fluent/models/ActionGroupPatch.java","src/main/java/com/azure/resourcemanager/monitor/fluent/models/ActionGroupResourceInner.java","src/main/java/com/azure/resourcemanager/monitor/fluent/models/ActivityLogAlertResourceInner.java","src/main/java/com/azure/resourcemanager/monitor/fluent/models/AlertRulePatchProperties.java","src/main/java/com/azure/resourcemanager/monitor/fluent/models/AlertRuleProperties.java","src/main/java/com/azure/resourcemanager/monitor/fluent/models/AutoscaleProfileInner.java","src/main/java/com/azure/resourcemanager/monitor/fluent/models/AutoscaleSetting.java","src/main/java/com/azure/resourcemanager/monitor/fluent/models/AutoscaleSettingResourceInner.java","src/main/java/com/azure/resourcemanager/monitor/fluent/models/AzureMonitorPrivateLinkScopeInner.java","src/main/java/com/azure/resourcemanager/monitor/fluent/models/AzureMonitorPrivateLinkScopeProperties.java","src/main/java/com/azure/resourcemanager/monitor/fluent/models/DataCollectionEndpointResourceInner.java","src/main/java/com/azure/resourcemanager/monitor/fluent/models/DataCollectionEndpointResourceProperties.java","src/main/java/com/azure/resourcemanager/monitor/fluent/models/DataCollectionRuleAssociationProxyOnlyResourceInner.java","src/main/java/com/azure/resourcemanager/monitor/fluent/models/DataCollectionRuleAssociationProxyOnlyResourceProperties.java","src/main/java/com/azure/resourcemanager/monitor/fluent/models/DataCollectionRuleResourceInner.java","src/main/java/com/azure/resourcemanager/monitor/fluent/models/DataCollectionRuleResourceProperties.java","src/main/java/com/azure/resourcemanager/monitor/fluent/models/EventDataInner.java","src/main/java/com/azure/resourcemanager/monitor/fluent/models/IncidentInner.java","src/main/java/com/azure/resourcemanager/monitor/fluent/models/LocalizableStringInner.java","src/main/java/com/azure/resourcemanager/monitor/fluent/models/LogProfileProperties.java","src/main/java/com/azure/resourcemanager/monitor/fluent/models/LogProfileResourceInner.java","src/main/java/com/azure/resourcemanager/monitor/fluent/models/MetadataValueInner.java","src/main/java/com/azure/resourcemanager/monitor/fluent/models/MetricAlertProperties.java","src/main/java/com/azure/resourcemanager/monitor/fluent/models/MetricAlertPropertiesPatch.java","src/main/java/com/azure/resourcemanager/monitor/fluent/models/MetricAlertResourceInner.java","src/main/java/com/azure/resourcemanager/monitor/fluent/models/MetricAlertStatusInner.java","src/main/java/com/azure/resourcemanager/monitor/fluent/models/MetricBaselinesProperties.java","src/main/java/com/azure/resourcemanager/monitor/fluent/models/MetricDefinitionInner.java","src/main/java/com/azure/resourcemanager/monitor/fluent/models/MetricInner.java","src/main/java/com/azure/resourcemanager/monitor/fluent/models/MetricNamespaceInner.java","src/main/java/com/azure/resourcemanager/monitor/fluent/models/NetworkSecurityPerimeterConfigurationInner.java","src/main/java/com/azure/resourcemanager/monitor/fluent/models/OperationStatusInner.java","src/main/java/com/azure/resourcemanager/monitor/fluent/models/PredictiveResponseInner.java","src/main/java/com/azure/resourcemanager/monitor/fluent/models/PrivateEndpointConnectionInner.java","src/main/java/com/azure/resourcemanager/monitor/fluent/models/PrivateEndpointConnectionProperties.java","src/main/java/com/azure/resourcemanager/monitor/fluent/models/PrivateLinkResourceInner.java","src/main/java/com/azure/resourcemanager/monitor/fluent/models/PrivateLinkResourceListResultInner.java","src/main/java/com/azure/resourcemanager/monitor/fluent/models/ResponseInner.java","src/main/java/com/azure/resourcemanager/monitor/fluent/models/ScaleRuleInner.java","src/main/java/com/azure/resourcemanager/monitor/fluent/models/ScheduledQueryRuleProperties.java","src/main/java/com/azure/resourcemanager/monitor/fluent/models/ScheduledQueryRuleResourceInner.java","src/main/java/com/azure/resourcemanager/monitor/fluent/models/ScopedResourceInner.java","src/main/java/com/azure/resourcemanager/monitor/fluent/models/ScopedResourceProperties.java","src/main/java/com/azure/resourcemanager/monitor/fluent/models/ServiceDiagnosticSettings.java","src/main/java/com/azure/resourcemanager/monitor/fluent/models/ServiceDiagnosticSettingsResourceInner.java","src/main/java/com/azure/resourcemanager/monitor/fluent/models/SingleMetricBaselineInner.java","src/main/java/com/azure/resourcemanager/monitor/fluent/models/SubscriptionScopeMetricDefinitionInner.java","src/main/java/com/azure/resourcemanager/monitor/fluent/models/TestNotificationDetailsResponseInner.java","src/main/java/com/azure/resourcemanager/monitor/fluent/models/package-info.java","src/main/java/com/azure/resourcemanager/monitor/fluent/package-info.java","src/main/java/com/azure/resourcemanager/monitor/implementation/ActionGroupsClientImpl.java","src/main/java/com/azure/resourcemanager/monitor/implementation/ActivityLogAlertsClientImpl.java","src/main/java/com/azure/resourcemanager/monitor/implementation/ActivityLogsClientImpl.java","src/main/java/com/azure/resourcemanager/monitor/implementation/AlertRuleIncidentsClientImpl.java","src/main/java/com/azure/resourcemanager/monitor/implementation/AutoscaleSettingsClientImpl.java","src/main/java/com/azure/resourcemanager/monitor/implementation/BaselinesClientImpl.java","src/main/java/com/azure/resourcemanager/monitor/implementation/DataCollectionEndpointsClientImpl.java","src/main/java/com/azure/resourcemanager/monitor/implementation/DataCollectionRuleAssociationsClientImpl.java","src/main/java/com/azure/resourcemanager/monitor/implementation/DataCollectionRulesClientImpl.java","src/main/java/com/azure/resourcemanager/monitor/implementation/EventCategoriesClientImpl.java","src/main/java/com/azure/resourcemanager/monitor/implementation/LogProfilesClientImpl.java","src/main/java/com/azure/resourcemanager/monitor/implementation/MetricAlertsClientImpl.java","src/main/java/com/azure/resourcemanager/monitor/implementation/MetricAlertsStatusClientImpl.java","src/main/java/com/azure/resourcemanager/monitor/implementation/MetricDefinitionsClientImpl.java","src/main/java/com/azure/resourcemanager/monitor/implementation/MetricNamespacesClientImpl.java","src/main/java/com/azure/resourcemanager/monitor/implementation/MetricsClientImpl.java","src/main/java/com/azure/resourcemanager/monitor/implementation/MonitorClientBuilder.java","src/main/java/com/azure/resourcemanager/monitor/implementation/MonitorClientImpl.java","src/main/java/com/azure/resourcemanager/monitor/implementation/NspScheduledQueryRulesClientImpl.java","src/main/java/com/azure/resourcemanager/monitor/implementation/PredictiveMetricsClientImpl.java","src/main/java/com/azure/resourcemanager/monitor/implementation/PrivateEndpointConnectionsClientImpl.java","src/main/java/com/azure/resourcemanager/monitor/implementation/PrivateLinkResourcesClientImpl.java","src/main/java/com/azure/resourcemanager/monitor/implementation/PrivateLinkScopeOperationStatusClientImpl.java","src/main/java/com/azure/resourcemanager/monitor/implementation/PrivateLinkScopedResourcesClientImpl.java","src/main/java/com/azure/resourcemanager/monitor/implementation/PrivateLinkScopesClientImpl.java","src/main/java/com/azure/resourcemanager/monitor/implementation/ScheduledQueryRulesClientImpl.java","src/main/java/com/azure/resourcemanager/monitor/implementation/ServiceDiagnosticSettingsOperationsClientImpl.java","src/main/java/com/azure/resourcemanager/monitor/implementation/TenantActivityLogsClientImpl.java","src/main/java/com/azure/resourcemanager/monitor/implementation/models/ActionGroupList.java","src/main/java/com/azure/resourcemanager/monitor/implementation/models/AlertRuleList.java","src/main/java/com/azure/resourcemanager/monitor/implementation/models/AutoscaleSettingResourceCollection.java","src/main/java/com/azure/resourcemanager/monitor/implementation/models/AzureMonitorPrivateLinkScopeListResult.java","src/main/java/com/azure/resourcemanager/monitor/implementation/models/DataCollectionEndpointResourceListResult.java","src/main/java/com/azure/resourcemanager/monitor/implementation/models/DataCollectionRuleAssociationProxyOnlyResourceListResult.java","src/main/java/com/azure/resourcemanager/monitor/implementation/models/DataCollectionRuleResourceListResult.java","src/main/java/com/azure/resourcemanager/monitor/implementation/models/EventCategoryCollection.java","src/main/java/com/azure/resourcemanager/monitor/implementation/models/EventDataCollection.java","src/main/java/com/azure/resourcemanager/monitor/implementation/models/IncidentListResult.java","src/main/java/com/azure/resourcemanager/monitor/implementation/models/LogProfileCollection.java","src/main/java/com/azure/resourcemanager/monitor/implementation/models/MetricAlertResourceCollection.java","src/main/java/com/azure/resourcemanager/monitor/implementation/models/MetricAlertStatusCollection.java","src/main/java/com/azure/resourcemanager/monitor/implementation/models/MetricBaselinesResponse.java","src/main/java/com/azure/resourcemanager/monitor/implementation/models/MetricDefinitionCollection.java","src/main/java/com/azure/resourcemanager/monitor/implementation/models/MetricNamespaceCollection.java","src/main/java/com/azure/resourcemanager/monitor/implementation/models/NetworkSecurityPerimeterConfigurationListResult.java","src/main/java/com/azure/resourcemanager/monitor/implementation/models/PrivateEndpointConnectionListResult.java","src/main/java/com/azure/resourcemanager/monitor/implementation/models/ScheduledQueryRuleResourceCollection.java","src/main/java/com/azure/resourcemanager/monitor/implementation/models/ScopedResourceListResult.java","src/main/java/com/azure/resourcemanager/monitor/implementation/models/SubscriptionScopeMetricDefinitionCollection.java","src/main/java/com/azure/resourcemanager/monitor/models/AccessMode.java","src/main/java/com/azure/resourcemanager/monitor/models/AccessModeSettings.java","src/main/java/com/azure/resourcemanager/monitor/models/AccessModeSettingsExclusion.java","src/main/java/com/azure/resourcemanager/monitor/models/AccessRule.java","src/main/java/com/azure/resourcemanager/monitor/models/AccessRuleDirection.java","src/main/java/com/azure/resourcemanager/monitor/models/AccessRuleProperties.java","src/main/java/com/azure/resourcemanager/monitor/models/AccessRulePropertiesSubscription.java","src/main/java/com/azure/resourcemanager/monitor/models/ActionDetail.java","src/main/java/com/azure/resourcemanager/monitor/models/ActionGroupPatchBody.java","src/main/java/com/azure/resourcemanager/monitor/models/ActionList.java","src/main/java/com/azure/resourcemanager/monitor/models/Actions.java","src/main/java/com/azure/resourcemanager/monitor/models/ActivityLogAlertActionGroup.java","src/main/java/com/azure/resourcemanager/monitor/models/ActivityLogAlertAllOfCondition.java","src/main/java/com/azure/resourcemanager/monitor/models/ActivityLogAlertLeafCondition.java","src/main/java/com/azure/resourcemanager/monitor/models/AdxDestination.java","src/main/java/com/azure/resourcemanager/monitor/models/AgentSetting.java","src/main/java/com/azure/resourcemanager/monitor/models/AgentSettingsSpec.java","src/main/java/com/azure/resourcemanager/monitor/models/AggregationType.java","src/main/java/com/azure/resourcemanager/monitor/models/AggregationTypeEnum.java","src/main/java/com/azure/resourcemanager/monitor/models/AlertRuleLeafCondition.java","src/main/java/com/azure/resourcemanager/monitor/models/AlertRulePatchObject.java","src/main/java/com/azure/resourcemanager/monitor/models/AlertSeverity.java","src/main/java/com/azure/resourcemanager/monitor/models/ApplicationInsights.java","src/main/java/com/azure/resourcemanager/monitor/models/ArmRoleReceiver.java","src/main/java/com/azure/resourcemanager/monitor/models/AutomationRunbookReceiver.java","src/main/java/com/azure/resourcemanager/monitor/models/AutoscaleNotification.java","src/main/java/com/azure/resourcemanager/monitor/models/AutoscaleSettingResourcePatch.java","src/main/java/com/azure/resourcemanager/monitor/models/AzureAppPushReceiver.java","src/main/java/com/azure/resourcemanager/monitor/models/AzureFunctionReceiver.java","src/main/java/com/azure/resourcemanager/monitor/models/AzureMonitorMetricsDestination.java","src/main/java/com/azure/resourcemanager/monitor/models/BaselineMetadata.java","src/main/java/com/azure/resourcemanager/monitor/models/BaselineSensitivity.java","src/main/java/com/azure/resourcemanager/monitor/models/ColumnDefinition.java","src/main/java/com/azure/resourcemanager/monitor/models/ComparisonOperationType.java","src/main/java/com/azure/resourcemanager/monitor/models/Condition.java","src/main/java/com/azure/resourcemanager/monitor/models/ConditionFailingPeriods.java","src/main/java/com/azure/resourcemanager/monitor/models/ConditionOperator.java","src/main/java/com/azure/resourcemanager/monitor/models/ConfigurationAccessEndpointSpec.java","src/main/java/com/azure/resourcemanager/monitor/models/Context.java","src/main/java/com/azure/resourcemanager/monitor/models/CriterionType.java","src/main/java/com/azure/resourcemanager/monitor/models/DataCollectionEndpoint.java","src/main/java/com/azure/resourcemanager/monitor/models/DataCollectionEndpointConfigurationAccess.java","src/main/java/com/azure/resourcemanager/monitor/models/DataCollectionEndpointFailoverConfiguration.java","src/main/java/com/azure/resourcemanager/monitor/models/DataCollectionEndpointLogsIngestion.java","src/main/java/com/azure/resourcemanager/monitor/models/DataCollectionEndpointMetadata.java","src/main/java/com/azure/resourcemanager/monitor/models/DataCollectionEndpointMetricsIngestion.java","src/main/java/com/azure/resourcemanager/monitor/models/DataCollectionEndpointNetworkAcls.java","src/main/java/com/azure/resourcemanager/monitor/models/DataCollectionEndpointResourceIdentity.java","src/main/java/com/azure/resourcemanager/monitor/models/DataCollectionEndpointResourceSku.java","src/main/java/com/azure/resourcemanager/monitor/models/DataCollectionRule.java","src/main/java/com/azure/resourcemanager/monitor/models/DataCollectionRuleAgentSettings.java","src/main/java/com/azure/resourcemanager/monitor/models/DataCollectionRuleAssociation.java","src/main/java/com/azure/resourcemanager/monitor/models/DataCollectionRuleAssociationMetadata.java","src/main/java/com/azure/resourcemanager/monitor/models/DataCollectionRuleDataSources.java","src/main/java/com/azure/resourcemanager/monitor/models/DataCollectionRuleDestinations.java","src/main/java/com/azure/resourcemanager/monitor/models/DataCollectionRuleDirectDataSources.java","src/main/java/com/azure/resourcemanager/monitor/models/DataCollectionRuleEndpoints.java","src/main/java/com/azure/resourcemanager/monitor/models/DataCollectionRuleIngestionQuotas.java","src/main/java/com/azure/resourcemanager/monitor/models/DataCollectionRuleMetadata.java","src/main/java/com/azure/resourcemanager/monitor/models/DataCollectionRuleReferences.java","src/main/java/com/azure/resourcemanager/monitor/models/DataCollectionRuleResourceIdentity.java","src/main/java/com/azure/resourcemanager/monitor/models/DataCollectionRuleResourceSku.java","src/main/java/com/azure/resourcemanager/monitor/models/DataFlow.java","src/main/java/com/azure/resourcemanager/monitor/models/DataImportSources.java","src/main/java/com/azure/resourcemanager/monitor/models/DataImportSourcesEventHub.java","src/main/java/com/azure/resourcemanager/monitor/models/DataSourcesSpec.java","src/main/java/com/azure/resourcemanager/monitor/models/DataSourcesSpecDataImports.java","src/main/java/com/azure/resourcemanager/monitor/models/DestinationsSpec.java","src/main/java/com/azure/resourcemanager/monitor/models/DestinationsSpecAzureMonitorMetrics.java","src/main/java/com/azure/resourcemanager/monitor/models/Dimension.java","src/main/java/com/azure/resourcemanager/monitor/models/DimensionOperator.java","src/main/java/com/azure/resourcemanager/monitor/models/DirectDataSourcesSpec.java","src/main/java/com/azure/resourcemanager/monitor/models/DynamicMetricCriteria.java","src/main/java/com/azure/resourcemanager/monitor/models/DynamicPromQLCriteria.java","src/main/java/com/azure/resourcemanager/monitor/models/DynamicThresholdFailingPeriods.java","src/main/java/com/azure/resourcemanager/monitor/models/DynamicThresholdOperator.java","src/main/java/com/azure/resourcemanager/monitor/models/DynamicThresholdSensitivity.java","src/main/java/com/azure/resourcemanager/monitor/models/EmailNotification.java","src/main/java/com/azure/resourcemanager/monitor/models/EmailReceiver.java","src/main/java/com/azure/resourcemanager/monitor/models/EnableRequest.java","src/main/java/com/azure/resourcemanager/monitor/models/EndpointsSpec.java","src/main/java/com/azure/resourcemanager/monitor/models/EnrichmentData.java","src/main/java/com/azure/resourcemanager/monitor/models/EtwProviderDataSource.java","src/main/java/com/azure/resourcemanager/monitor/models/EventHubDataSource.java","src/main/java/com/azure/resourcemanager/monitor/models/EventHubDestination.java","src/main/java/com/azure/resourcemanager/monitor/models/EventHubDirectDestination.java","src/main/java/com/azure/resourcemanager/monitor/models/EventHubReceiver.java","src/main/java/com/azure/resourcemanager/monitor/models/EventLevel.java","src/main/java/com/azure/resourcemanager/monitor/models/ExtensionDataSource.java","src/main/java/com/azure/resourcemanager/monitor/models/FailoverConfigurationSpec.java","src/main/java/com/azure/resourcemanager/monitor/models/HttpRequestInfo.java","src/main/java/com/azure/resourcemanager/monitor/models/Identity.java","src/main/java/com/azure/resourcemanager/monitor/models/IdentityType.java","src/main/java/com/azure/resourcemanager/monitor/models/IisLogsDataSource.java","src/main/java/com/azure/resourcemanager/monitor/models/IncidentManagementService.java","src/main/java/com/azure/resourcemanager/monitor/models/IncidentReceiver.java","src/main/java/com/azure/resourcemanager/monitor/models/IncidentServiceConnection.java","src/main/java/com/azure/resourcemanager/monitor/models/IngestionQuotas.java","src/main/java/com/azure/resourcemanager/monitor/models/IngestionQuotasLogs.java","src/main/java/com/azure/resourcemanager/monitor/models/IssueType.java","src/main/java/com/azure/resourcemanager/monitor/models/ItsmReceiver.java","src/main/java/com/azure/resourcemanager/monitor/models/Kind.java","src/main/java/com/azure/resourcemanager/monitor/models/KnownAgentSettingName.java","src/main/java/com/azure/resourcemanager/monitor/models/KnownColumnDefinitionType.java","src/main/java/com/azure/resourcemanager/monitor/models/KnownDataCollectionEndpointProvisioningState.java","src/main/java/com/azure/resourcemanager/monitor/models/KnownDataCollectionEndpointResourceKind.java","src/main/java/com/azure/resourcemanager/monitor/models/KnownDataCollectionRuleAssociationProvisioningState.java","src/main/java/com/azure/resourcemanager/monitor/models/KnownDataCollectionRuleProvisioningState.java","src/main/java/com/azure/resourcemanager/monitor/models/KnownDataCollectionRuleResourceKind.java","src/main/java/com/azure/resourcemanager/monitor/models/KnownDataFlowStreams.java","src/main/java/com/azure/resourcemanager/monitor/models/KnownEtwProviderDataSourceLogLevel.java","src/main/java/com/azure/resourcemanager/monitor/models/KnownEtwProviderType.java","src/main/java/com/azure/resourcemanager/monitor/models/KnownExtensionDataSourceStreams.java","src/main/java/com/azure/resourcemanager/monitor/models/KnownLocationSpecProvisioningStatus.java","src/main/java/com/azure/resourcemanager/monitor/models/KnownLogFileTextSettingsRecordStartTimestampFormat.java","src/main/java/com/azure/resourcemanager/monitor/models/KnownLogFilesDataSourceFormat.java","src/main/java/com/azure/resourcemanager/monitor/models/KnownOtelLogsDataSourceStreams.java","src/main/java/com/azure/resourcemanager/monitor/models/KnownOtelLogsDirectDataSourceStreams.java","src/main/java/com/azure/resourcemanager/monitor/models/KnownOtelTracesDataSourceStreams.java","src/main/java/com/azure/resourcemanager/monitor/models/KnownOtelTracesDirectDataSourceStreams.java","src/main/java/com/azure/resourcemanager/monitor/models/KnownPerfCounterDataSourceStreams.java","src/main/java/com/azure/resourcemanager/monitor/models/KnownPerformanceCountersOTelDataSourceStreams.java","src/main/java/com/azure/resourcemanager/monitor/models/KnownPrometheusForwarderDataSourceStreams.java","src/main/java/com/azure/resourcemanager/monitor/models/KnownPublicNetworkAccessOptions.java","src/main/java/com/azure/resourcemanager/monitor/models/KnownStorageBlobLookupType.java","src/main/java/com/azure/resourcemanager/monitor/models/KnownSyslogDataSourceFacilityNames.java","src/main/java/com/azure/resourcemanager/monitor/models/KnownSyslogDataSourceLogLevels.java","src/main/java/com/azure/resourcemanager/monitor/models/KnownSyslogDataSourceStreams.java","src/main/java/com/azure/resourcemanager/monitor/models/KnownWindowsEventLogDataSourceStreams.java","src/main/java/com/azure/resourcemanager/monitor/models/KnownWindowsFirewallLogsDataSourceProfileFilter.java","src/main/java/com/azure/resourcemanager/monitor/models/LocationSpec.java","src/main/java/com/azure/resourcemanager/monitor/models/LogAnalyticsDestination.java","src/main/java/com/azure/resourcemanager/monitor/models/LogFileSettings.java","src/main/java/com/azure/resourcemanager/monitor/models/LogFileSettingsText.java","src/main/java/com/azure/resourcemanager/monitor/models/LogFileTextSettings.java","src/main/java/com/azure/resourcemanager/monitor/models/LogFilesDataSource.java","src/main/java/com/azure/resourcemanager/monitor/models/LogFilesDataSourceSettings.java","src/main/java/com/azure/resourcemanager/monitor/models/LogProfileResourcePatch.java","src/main/java/com/azure/resourcemanager/monitor/models/LogSettings.java","src/main/java/com/azure/resourcemanager/monitor/models/LogicAppReceiver.java","src/main/java/com/azure/resourcemanager/monitor/models/LogsIngestionEndpointSpec.java","src/main/java/com/azure/resourcemanager/monitor/models/LogsQuotaSpec.java","src/main/java/com/azure/resourcemanager/monitor/models/ManagedServiceIdentity.java","src/main/java/com/azure/resourcemanager/monitor/models/ManagedServiceIdentityType.java","src/main/java/com/azure/resourcemanager/monitor/models/Metadata.java","src/main/java/com/azure/resourcemanager/monitor/models/MetricAggregationType.java","src/main/java/com/azure/resourcemanager/monitor/models/MetricAlertAction.java","src/main/java/com/azure/resourcemanager/monitor/models/MetricAlertCriteria.java","src/main/java/com/azure/resourcemanager/monitor/models/MetricAlertMultipleResourceMultipleMetricCriteria.java","src/main/java/com/azure/resourcemanager/monitor/models/MetricAlertResourcePatch.java","src/main/java/com/azure/resourcemanager/monitor/models/MetricAlertSingleResourceMultipleMetricCriteria.java","src/main/java/com/azure/resourcemanager/monitor/models/MetricAlertStatusProperties.java","src/main/java/com/azure/resourcemanager/monitor/models/MetricAvailability.java","src/main/java/com/azure/resourcemanager/monitor/models/MetricClass.java","src/main/java/com/azure/resourcemanager/monitor/models/MetricCriteria.java","src/main/java/com/azure/resourcemanager/monitor/models/MetricDimension.java","src/main/java/com/azure/resourcemanager/monitor/models/MetricNamespaceName.java","src/main/java/com/azure/resourcemanager/monitor/models/MetricResultType.java","src/main/java/com/azure/resourcemanager/monitor/models/MetricSettings.java","src/main/java/com/azure/resourcemanager/monitor/models/MetricSingleDimension.java","src/main/java/com/azure/resourcemanager/monitor/models/MetricStatisticType.java","src/main/java/com/azure/resourcemanager/monitor/models/MetricTrigger.java","src/main/java/com/azure/resourcemanager/monitor/models/MetricValue.java","src/main/java/com/azure/resourcemanager/monitor/models/MetricsIngestionEndpointSpec.java","src/main/java/com/azure/resourcemanager/monitor/models/MicrosoftFabricDestination.java","src/main/java/com/azure/resourcemanager/monitor/models/MonitoringAccountDestination.java","src/main/java/com/azure/resourcemanager/monitor/models/MultiMetricCriteria.java","src/main/java/com/azure/resourcemanager/monitor/models/MultiPromQLCriteria.java","src/main/java/com/azure/resourcemanager/monitor/models/NamespaceClassification.java","src/main/java/com/azure/resourcemanager/monitor/models/NetworkRuleSet.java","src/main/java/com/azure/resourcemanager/monitor/models/NetworkSecurityPerimeter.java","src/main/java/com/azure/resourcemanager/monitor/models/NetworkSecurityPerimeterConfigurationProperties.java","src/main/java/com/azure/resourcemanager/monitor/models/NetworkSecurityPerimeterConfigurationProvisioningState.java","src/main/java/com/azure/resourcemanager/monitor/models/NetworkSecurityProfile.java","src/main/java/com/azure/resourcemanager/monitor/models/NotificationRequestBody.java","src/main/java/com/azure/resourcemanager/monitor/models/Odatatype.java","src/main/java/com/azure/resourcemanager/monitor/models/Operator.java","src/main/java/com/azure/resourcemanager/monitor/models/OtelDataSourceResourceAttributeRouting.java","src/main/java/com/azure/resourcemanager/monitor/models/OtelLogsDataSource.java","src/main/java/com/azure/resourcemanager/monitor/models/OtelLogsDataSourceResourceAttributeRouting.java","src/main/java/com/azure/resourcemanager/monitor/models/OtelLogsDirectDataSource.java","src/main/java/com/azure/resourcemanager/monitor/models/OtelMetricsDataSource.java","src/main/java/com/azure/resourcemanager/monitor/models/OtelMetricsDataSourceResourceAttributeRouting.java","src/main/java/com/azure/resourcemanager/monitor/models/OtelMetricsDirectDataSource.java","src/main/java/com/azure/resourcemanager/monitor/models/OtelTracesDataSource.java","src/main/java/com/azure/resourcemanager/monitor/models/OtelTracesDataSourceResourceAttributeRouting.java","src/main/java/com/azure/resourcemanager/monitor/models/OtelTracesDirectDataSource.java","src/main/java/com/azure/resourcemanager/monitor/models/PerfCounterDataSource.java","src/main/java/com/azure/resourcemanager/monitor/models/PerformanceCountersOTelDataSource.java","src/main/java/com/azure/resourcemanager/monitor/models/PlatformTelemetryDataSource.java","src/main/java/com/azure/resourcemanager/monitor/models/PredictiveAutoscalePolicy.java","src/main/java/com/azure/resourcemanager/monitor/models/PredictiveAutoscalePolicyScaleMode.java","src/main/java/com/azure/resourcemanager/monitor/models/PredictiveValue.java","src/main/java/com/azure/resourcemanager/monitor/models/PrivateEndpoint.java","src/main/java/com/azure/resourcemanager/monitor/models/PrivateEndpointConnectionProvisioningState.java","src/main/java/com/azure/resourcemanager/monitor/models/PrivateEndpointServiceConnectionStatus.java","src/main/java/com/azure/resourcemanager/monitor/models/PrivateLinkResourceProperties.java","src/main/java/com/azure/resourcemanager/monitor/models/PrivateLinkScopeProvisioningState.java","src/main/java/com/azure/resourcemanager/monitor/models/PrivateLinkScopedResource.java","src/main/java/com/azure/resourcemanager/monitor/models/PrivateLinkServiceConnectionState.java","src/main/java/com/azure/resourcemanager/monitor/models/PromQLCriteria.java","src/main/java/com/azure/resourcemanager/monitor/models/PrometheusForwarderDataSource.java","src/main/java/com/azure/resourcemanager/monitor/models/ProvisioningIssue.java","src/main/java/com/azure/resourcemanager/monitor/models/ProvisioningIssueProperties.java","src/main/java/com/azure/resourcemanager/monitor/models/QueryFailingPeriods.java","src/main/java/com/azure/resourcemanager/monitor/models/ReceiverStatus.java","src/main/java/com/azure/resourcemanager/monitor/models/Recurrence.java","src/main/java/com/azure/resourcemanager/monitor/models/RecurrenceFrequency.java","src/main/java/com/azure/resourcemanager/monitor/models/RecurrentSchedule.java","src/main/java/com/azure/resourcemanager/monitor/models/ReferencesSpec.java","src/main/java/com/azure/resourcemanager/monitor/models/ReferencesSpecEnrichmentData.java","src/main/java/com/azure/resourcemanager/monitor/models/ResolveConfiguration.java","src/main/java/com/azure/resourcemanager/monitor/models/ResourceAssociation.java","src/main/java/com/azure/resourcemanager/monitor/models/ResourceAssociationAccessMode.java","src/main/java/com/azure/resourcemanager/monitor/models/ResourceForUpdate.java","src/main/java/com/azure/resourcemanager/monitor/models/ResourceForUpdateIdentity.java","src/main/java/com/azure/resourcemanager/monitor/models/ResultType.java","src/main/java/com/azure/resourcemanager/monitor/models/RetentionPolicy.java","src/main/java/com/azure/resourcemanager/monitor/models/RuleResolveConfiguration.java","src/main/java/com/azure/resourcemanager/monitor/models/ScaleAction.java","src/main/java/com/azure/resourcemanager/monitor/models/ScaleCapacity.java","src/main/java/com/azure/resourcemanager/monitor/models/ScaleDirection.java","src/main/java/com/azure/resourcemanager/monitor/models/ScaleRuleMetricDimension.java","src/main/java/com/azure/resourcemanager/monitor/models/ScaleRuleMetricDimensionOperationType.java","src/main/java/com/azure/resourcemanager/monitor/models/ScaleType.java","src/main/java/com/azure/resourcemanager/monitor/models/ScheduledQueryRuleCriteria.java","src/main/java/com/azure/resourcemanager/monitor/models/ScheduledQueryRuleResourcePatch.java","src/main/java/com/azure/resourcemanager/monitor/models/ScopedResourceKind.java","src/main/java/com/azure/resourcemanager/monitor/models/ScopedResourceProvisioningState.java","src/main/java/com/azure/resourcemanager/monitor/models/SenderAuthorization.java","src/main/java/com/azure/resourcemanager/monitor/models/ServiceDiagnosticSettingsResourcePatch.java","src/main/java/com/azure/resourcemanager/monitor/models/Severity.java","src/main/java/com/azure/resourcemanager/monitor/models/SingleBaseline.java","src/main/java/com/azure/resourcemanager/monitor/models/Sku.java","src/main/java/com/azure/resourcemanager/monitor/models/SkuTier.java","src/main/java/com/azure/resourcemanager/monitor/models/SmsReceiver.java","src/main/java/com/azure/resourcemanager/monitor/models/StaticPromQLCriteria.java","src/main/java/com/azure/resourcemanager/monitor/models/StorageBlob.java","src/main/java/com/azure/resourcemanager/monitor/models/StorageBlobDestination.java","src/main/java/com/azure/resourcemanager/monitor/models/StorageTableDestination.java","src/main/java/com/azure/resourcemanager/monitor/models/StreamDeclaration.java","src/main/java/com/azure/resourcemanager/monitor/models/SubscriptionScopeMetricsRequestBodyParameters.java","src/main/java/com/azure/resourcemanager/monitor/models/SyslogDataSource.java","src/main/java/com/azure/resourcemanager/monitor/models/TagsResource.java","src/main/java/com/azure/resourcemanager/monitor/models/TimeAggregation.java","src/main/java/com/azure/resourcemanager/monitor/models/TimeAggregationType.java","src/main/java/com/azure/resourcemanager/monitor/models/TimeSeriesBaseline.java","src/main/java/com/azure/resourcemanager/monitor/models/TimeSeriesElement.java","src/main/java/com/azure/resourcemanager/monitor/models/TimeWindow.java","src/main/java/com/azure/resourcemanager/monitor/models/Unit.java","src/main/java/com/azure/resourcemanager/monitor/models/UserAssignedIdentity.java","src/main/java/com/azure/resourcemanager/monitor/models/UserIdentityProperties.java","src/main/java/com/azure/resourcemanager/monitor/models/VoiceReceiver.java","src/main/java/com/azure/resourcemanager/monitor/models/WebhookNotification.java","src/main/java/com/azure/resourcemanager/monitor/models/WebhookReceiver.java","src/main/java/com/azure/resourcemanager/monitor/models/WebtestLocationAvailabilityCriteria.java","src/main/java/com/azure/resourcemanager/monitor/models/WindowsEventLogDataSource.java","src/main/java/com/azure/resourcemanager/monitor/models/WindowsFirewallLogsDataSource.java","src/main/java/com/azure/resourcemanager/monitor/models/package-info.java","src/main/java/com/azure/resourcemanager/monitor/package-info.java"]} \ No newline at end of file +{"flavor":"azure","apiVersions":{"DataCollectionApi":"2024-03-11","PrivateLinkScopesApi":"2023-06-01-preview","AutoScaleApi":"2022-10-01","ActivityLogsApi":"2015-04-01","MetricsApi":"2024-02-01","ServiceDiagnosticsSettingsApi":"2016-09-01","AlertRulesIncidentsApi":"2016-03-01","LogProfilesApi":"2016-03-01","ActivityLogAlertsApi":"2023-01-01-preview","MetricAlertApi":"2026-01-01","ScheduledQueryRuleApi":"2025-01-01-preview","MetricBaselinesApi":"2019-03-01","ActionGroupsApi":"2024-10-01-preview","NetworkSecurityPerimeterApi":"2021-10-01","TenantActionGroups":"2023-05-01-preview","VmInsightsOnboarding":"2018-11-27-preview","DiagnosticsSettings":"2021-05-01-preview"},"crossLanguagePackageId":"DataCollectionApi","crossLanguageVersion":"13e01b30b224","generatedFiles":["src/main/java/com/azure/resourcemanager/monitor/fluent/ActionGroupsClient.java","src/main/java/com/azure/resourcemanager/monitor/fluent/ActivityLogAlertsClient.java","src/main/java/com/azure/resourcemanager/monitor/fluent/ActivityLogsClient.java","src/main/java/com/azure/resourcemanager/monitor/fluent/AlertRuleIncidentsClient.java","src/main/java/com/azure/resourcemanager/monitor/fluent/AutoscaleSettingsClient.java","src/main/java/com/azure/resourcemanager/monitor/fluent/BaselinesClient.java","src/main/java/com/azure/resourcemanager/monitor/fluent/DataCollectionEndpointsClient.java","src/main/java/com/azure/resourcemanager/monitor/fluent/DataCollectionRuleAssociationsClient.java","src/main/java/com/azure/resourcemanager/monitor/fluent/DataCollectionRulesClient.java","src/main/java/com/azure/resourcemanager/monitor/fluent/DiagnosticSettingsCategoriesClient.java","src/main/java/com/azure/resourcemanager/monitor/fluent/DiagnosticSettingsOperationsClient.java","src/main/java/com/azure/resourcemanager/monitor/fluent/EventCategoriesClient.java","src/main/java/com/azure/resourcemanager/monitor/fluent/LogProfilesClient.java","src/main/java/com/azure/resourcemanager/monitor/fluent/MetricAlertsClient.java","src/main/java/com/azure/resourcemanager/monitor/fluent/MetricAlertsStatusClient.java","src/main/java/com/azure/resourcemanager/monitor/fluent/MetricDefinitionsClient.java","src/main/java/com/azure/resourcemanager/monitor/fluent/MetricNamespacesClient.java","src/main/java/com/azure/resourcemanager/monitor/fluent/MetricsClient.java","src/main/java/com/azure/resourcemanager/monitor/fluent/MonitorClient.java","src/main/java/com/azure/resourcemanager/monitor/fluent/NspScheduledQueryRulesClient.java","src/main/java/com/azure/resourcemanager/monitor/fluent/PredictiveMetricsClient.java","src/main/java/com/azure/resourcemanager/monitor/fluent/PrivateEndpointConnectionsClient.java","src/main/java/com/azure/resourcemanager/monitor/fluent/PrivateLinkResourcesClient.java","src/main/java/com/azure/resourcemanager/monitor/fluent/PrivateLinkScopeOperationStatusClient.java","src/main/java/com/azure/resourcemanager/monitor/fluent/PrivateLinkScopedResourcesClient.java","src/main/java/com/azure/resourcemanager/monitor/fluent/PrivateLinkScopesClient.java","src/main/java/com/azure/resourcemanager/monitor/fluent/ScheduledQueryRulesClient.java","src/main/java/com/azure/resourcemanager/monitor/fluent/ServiceDiagnosticSettingsOperationsClient.java","src/main/java/com/azure/resourcemanager/monitor/fluent/TenantActionGroupsClient.java","src/main/java/com/azure/resourcemanager/monitor/fluent/TenantActivityLogsClient.java","src/main/java/com/azure/resourcemanager/monitor/fluent/VMInsightsClient.java","src/main/java/com/azure/resourcemanager/monitor/fluent/models/ActionGroup.java","src/main/java/com/azure/resourcemanager/monitor/fluent/models/ActionGroupPatch.java","src/main/java/com/azure/resourcemanager/monitor/fluent/models/ActionGroupResourceInner.java","src/main/java/com/azure/resourcemanager/monitor/fluent/models/ActivityLogAlertResourceInner.java","src/main/java/com/azure/resourcemanager/monitor/fluent/models/AlertRulePatchProperties.java","src/main/java/com/azure/resourcemanager/monitor/fluent/models/AlertRuleProperties.java","src/main/java/com/azure/resourcemanager/monitor/fluent/models/AutoscaleProfileInner.java","src/main/java/com/azure/resourcemanager/monitor/fluent/models/AutoscaleSetting.java","src/main/java/com/azure/resourcemanager/monitor/fluent/models/AutoscaleSettingResourceInner.java","src/main/java/com/azure/resourcemanager/monitor/fluent/models/AzureMonitorPrivateLinkScopeInner.java","src/main/java/com/azure/resourcemanager/monitor/fluent/models/AzureMonitorPrivateLinkScopeProperties.java","src/main/java/com/azure/resourcemanager/monitor/fluent/models/DataCollectionEndpointResourceInner.java","src/main/java/com/azure/resourcemanager/monitor/fluent/models/DataCollectionEndpointResourceProperties.java","src/main/java/com/azure/resourcemanager/monitor/fluent/models/DataCollectionRuleAssociationProxyOnlyResourceInner.java","src/main/java/com/azure/resourcemanager/monitor/fluent/models/DataCollectionRuleAssociationProxyOnlyResourceProperties.java","src/main/java/com/azure/resourcemanager/monitor/fluent/models/DataCollectionRuleResourceInner.java","src/main/java/com/azure/resourcemanager/monitor/fluent/models/DataCollectionRuleResourceProperties.java","src/main/java/com/azure/resourcemanager/monitor/fluent/models/DiagnosticSettings.java","src/main/java/com/azure/resourcemanager/monitor/fluent/models/DiagnosticSettingsCategory.java","src/main/java/com/azure/resourcemanager/monitor/fluent/models/DiagnosticSettingsCategoryResourceCollectionInner.java","src/main/java/com/azure/resourcemanager/monitor/fluent/models/DiagnosticSettingsCategoryResourceInner.java","src/main/java/com/azure/resourcemanager/monitor/fluent/models/DiagnosticSettingsResourceInner.java","src/main/java/com/azure/resourcemanager/monitor/fluent/models/EventDataInner.java","src/main/java/com/azure/resourcemanager/monitor/fluent/models/IncidentInner.java","src/main/java/com/azure/resourcemanager/monitor/fluent/models/LocalizableStringInner.java","src/main/java/com/azure/resourcemanager/monitor/fluent/models/LogProfileProperties.java","src/main/java/com/azure/resourcemanager/monitor/fluent/models/LogProfileResourceInner.java","src/main/java/com/azure/resourcemanager/monitor/fluent/models/MetadataValueInner.java","src/main/java/com/azure/resourcemanager/monitor/fluent/models/MetricAlertProperties.java","src/main/java/com/azure/resourcemanager/monitor/fluent/models/MetricAlertPropertiesPatch.java","src/main/java/com/azure/resourcemanager/monitor/fluent/models/MetricAlertResourceInner.java","src/main/java/com/azure/resourcemanager/monitor/fluent/models/MetricAlertStatusInner.java","src/main/java/com/azure/resourcemanager/monitor/fluent/models/MetricBaselinesProperties.java","src/main/java/com/azure/resourcemanager/monitor/fluent/models/MetricDefinitionInner.java","src/main/java/com/azure/resourcemanager/monitor/fluent/models/MetricInner.java","src/main/java/com/azure/resourcemanager/monitor/fluent/models/MetricNamespaceInner.java","src/main/java/com/azure/resourcemanager/monitor/fluent/models/NetworkSecurityPerimeterConfigurationInner.java","src/main/java/com/azure/resourcemanager/monitor/fluent/models/OperationStatusInner.java","src/main/java/com/azure/resourcemanager/monitor/fluent/models/PredictiveResponseInner.java","src/main/java/com/azure/resourcemanager/monitor/fluent/models/PrivateEndpointConnectionInner.java","src/main/java/com/azure/resourcemanager/monitor/fluent/models/PrivateEndpointConnectionProperties.java","src/main/java/com/azure/resourcemanager/monitor/fluent/models/PrivateLinkResourceInner.java","src/main/java/com/azure/resourcemanager/monitor/fluent/models/PrivateLinkResourceListResultInner.java","src/main/java/com/azure/resourcemanager/monitor/fluent/models/ResponseInner.java","src/main/java/com/azure/resourcemanager/monitor/fluent/models/ScaleRuleInner.java","src/main/java/com/azure/resourcemanager/monitor/fluent/models/ScheduledQueryRuleProperties.java","src/main/java/com/azure/resourcemanager/monitor/fluent/models/ScheduledQueryRuleResourceInner.java","src/main/java/com/azure/resourcemanager/monitor/fluent/models/ScopedResourceInner.java","src/main/java/com/azure/resourcemanager/monitor/fluent/models/ScopedResourceProperties.java","src/main/java/com/azure/resourcemanager/monitor/fluent/models/ServiceDiagnosticSettings.java","src/main/java/com/azure/resourcemanager/monitor/fluent/models/ServiceDiagnosticSettingsResourceInner.java","src/main/java/com/azure/resourcemanager/monitor/fluent/models/SingleMetricBaselineInner.java","src/main/java/com/azure/resourcemanager/monitor/fluent/models/SubscriptionScopeMetricDefinitionInner.java","src/main/java/com/azure/resourcemanager/monitor/fluent/models/TenantActionGroup.java","src/main/java/com/azure/resourcemanager/monitor/fluent/models/TenantActionGroupResourceInner.java","src/main/java/com/azure/resourcemanager/monitor/fluent/models/TenantActionGroupTestNotificationDetailsResponseInner.java","src/main/java/com/azure/resourcemanager/monitor/fluent/models/TestNotificationDetailsResponseInner.java","src/main/java/com/azure/resourcemanager/monitor/fluent/models/VMInsightsOnboardingStatusInner.java","src/main/java/com/azure/resourcemanager/monitor/fluent/models/VMInsightsOnboardingStatusProperties.java","src/main/java/com/azure/resourcemanager/monitor/fluent/models/WorkspaceInfoProperties.java","src/main/java/com/azure/resourcemanager/monitor/fluent/models/package-info.java","src/main/java/com/azure/resourcemanager/monitor/fluent/package-info.java","src/main/java/com/azure/resourcemanager/monitor/implementation/ActionGroupsClientImpl.java","src/main/java/com/azure/resourcemanager/monitor/implementation/ActivityLogAlertsClientImpl.java","src/main/java/com/azure/resourcemanager/monitor/implementation/ActivityLogsClientImpl.java","src/main/java/com/azure/resourcemanager/monitor/implementation/AlertRuleIncidentsClientImpl.java","src/main/java/com/azure/resourcemanager/monitor/implementation/AutoscaleSettingsClientImpl.java","src/main/java/com/azure/resourcemanager/monitor/implementation/BaselinesClientImpl.java","src/main/java/com/azure/resourcemanager/monitor/implementation/DataCollectionEndpointsClientImpl.java","src/main/java/com/azure/resourcemanager/monitor/implementation/DataCollectionRuleAssociationsClientImpl.java","src/main/java/com/azure/resourcemanager/monitor/implementation/DataCollectionRulesClientImpl.java","src/main/java/com/azure/resourcemanager/monitor/implementation/DiagnosticSettingsCategoriesClientImpl.java","src/main/java/com/azure/resourcemanager/monitor/implementation/DiagnosticSettingsOperationsClientImpl.java","src/main/java/com/azure/resourcemanager/monitor/implementation/EventCategoriesClientImpl.java","src/main/java/com/azure/resourcemanager/monitor/implementation/LogProfilesClientImpl.java","src/main/java/com/azure/resourcemanager/monitor/implementation/MetricAlertsClientImpl.java","src/main/java/com/azure/resourcemanager/monitor/implementation/MetricAlertsStatusClientImpl.java","src/main/java/com/azure/resourcemanager/monitor/implementation/MetricDefinitionsClientImpl.java","src/main/java/com/azure/resourcemanager/monitor/implementation/MetricNamespacesClientImpl.java","src/main/java/com/azure/resourcemanager/monitor/implementation/MetricsClientImpl.java","src/main/java/com/azure/resourcemanager/monitor/implementation/MonitorClientBuilder.java","src/main/java/com/azure/resourcemanager/monitor/implementation/MonitorClientImpl.java","src/main/java/com/azure/resourcemanager/monitor/implementation/NspScheduledQueryRulesClientImpl.java","src/main/java/com/azure/resourcemanager/monitor/implementation/PredictiveMetricsClientImpl.java","src/main/java/com/azure/resourcemanager/monitor/implementation/PrivateEndpointConnectionsClientImpl.java","src/main/java/com/azure/resourcemanager/monitor/implementation/PrivateLinkResourcesClientImpl.java","src/main/java/com/azure/resourcemanager/monitor/implementation/PrivateLinkScopeOperationStatusClientImpl.java","src/main/java/com/azure/resourcemanager/monitor/implementation/PrivateLinkScopedResourcesClientImpl.java","src/main/java/com/azure/resourcemanager/monitor/implementation/PrivateLinkScopesClientImpl.java","src/main/java/com/azure/resourcemanager/monitor/implementation/ScheduledQueryRulesClientImpl.java","src/main/java/com/azure/resourcemanager/monitor/implementation/ServiceDiagnosticSettingsOperationsClientImpl.java","src/main/java/com/azure/resourcemanager/monitor/implementation/TenantActionGroupsClientImpl.java","src/main/java/com/azure/resourcemanager/monitor/implementation/TenantActivityLogsClientImpl.java","src/main/java/com/azure/resourcemanager/monitor/implementation/VMInsightsClientImpl.java","src/main/java/com/azure/resourcemanager/monitor/implementation/models/ActionGroupList.java","src/main/java/com/azure/resourcemanager/monitor/implementation/models/AlertRuleList.java","src/main/java/com/azure/resourcemanager/monitor/implementation/models/AutoscaleSettingResourceCollection.java","src/main/java/com/azure/resourcemanager/monitor/implementation/models/AzureMonitorPrivateLinkScopeListResult.java","src/main/java/com/azure/resourcemanager/monitor/implementation/models/DataCollectionEndpointResourceListResult.java","src/main/java/com/azure/resourcemanager/monitor/implementation/models/DataCollectionRuleAssociationProxyOnlyResourceListResult.java","src/main/java/com/azure/resourcemanager/monitor/implementation/models/DataCollectionRuleResourceListResult.java","src/main/java/com/azure/resourcemanager/monitor/implementation/models/DiagnosticSettingsResourceCollection.java","src/main/java/com/azure/resourcemanager/monitor/implementation/models/EventCategoryCollection.java","src/main/java/com/azure/resourcemanager/monitor/implementation/models/EventDataCollection.java","src/main/java/com/azure/resourcemanager/monitor/implementation/models/IncidentListResult.java","src/main/java/com/azure/resourcemanager/monitor/implementation/models/LogProfileCollection.java","src/main/java/com/azure/resourcemanager/monitor/implementation/models/MetricAlertResourceCollection.java","src/main/java/com/azure/resourcemanager/monitor/implementation/models/MetricAlertStatusCollection.java","src/main/java/com/azure/resourcemanager/monitor/implementation/models/MetricBaselinesResponse.java","src/main/java/com/azure/resourcemanager/monitor/implementation/models/MetricDefinitionCollection.java","src/main/java/com/azure/resourcemanager/monitor/implementation/models/MetricNamespaceCollection.java","src/main/java/com/azure/resourcemanager/monitor/implementation/models/NetworkSecurityPerimeterConfigurationListResult.java","src/main/java/com/azure/resourcemanager/monitor/implementation/models/PrivateEndpointConnectionListResult.java","src/main/java/com/azure/resourcemanager/monitor/implementation/models/ScheduledQueryRuleResourceCollection.java","src/main/java/com/azure/resourcemanager/monitor/implementation/models/ScopedResourceListResult.java","src/main/java/com/azure/resourcemanager/monitor/implementation/models/SubscriptionScopeMetricDefinitionCollection.java","src/main/java/com/azure/resourcemanager/monitor/implementation/models/TenantActionGroupList.java","src/main/java/com/azure/resourcemanager/monitor/models/AccessMode.java","src/main/java/com/azure/resourcemanager/monitor/models/AccessModeSettings.java","src/main/java/com/azure/resourcemanager/monitor/models/AccessModeSettingsExclusion.java","src/main/java/com/azure/resourcemanager/monitor/models/AccessRule.java","src/main/java/com/azure/resourcemanager/monitor/models/AccessRuleDirection.java","src/main/java/com/azure/resourcemanager/monitor/models/AccessRuleProperties.java","src/main/java/com/azure/resourcemanager/monitor/models/AccessRulePropertiesSubscription.java","src/main/java/com/azure/resourcemanager/monitor/models/ActionDetail.java","src/main/java/com/azure/resourcemanager/monitor/models/ActionGroupPatchBody.java","src/main/java/com/azure/resourcemanager/monitor/models/ActionList.java","src/main/java/com/azure/resourcemanager/monitor/models/Actions.java","src/main/java/com/azure/resourcemanager/monitor/models/ActivityLogAlertActionGroup.java","src/main/java/com/azure/resourcemanager/monitor/models/ActivityLogAlertAllOfCondition.java","src/main/java/com/azure/resourcemanager/monitor/models/ActivityLogAlertLeafCondition.java","src/main/java/com/azure/resourcemanager/monitor/models/AdxDestination.java","src/main/java/com/azure/resourcemanager/monitor/models/AgentSetting.java","src/main/java/com/azure/resourcemanager/monitor/models/AgentSettingsSpec.java","src/main/java/com/azure/resourcemanager/monitor/models/AggregationType.java","src/main/java/com/azure/resourcemanager/monitor/models/AggregationTypeEnum.java","src/main/java/com/azure/resourcemanager/monitor/models/AlertRuleLeafCondition.java","src/main/java/com/azure/resourcemanager/monitor/models/AlertRulePatchObject.java","src/main/java/com/azure/resourcemanager/monitor/models/AlertSeverity.java","src/main/java/com/azure/resourcemanager/monitor/models/ApplicationInsights.java","src/main/java/com/azure/resourcemanager/monitor/models/ArmRoleReceiver.java","src/main/java/com/azure/resourcemanager/monitor/models/AutomationRunbookReceiver.java","src/main/java/com/azure/resourcemanager/monitor/models/AutoscaleNotification.java","src/main/java/com/azure/resourcemanager/monitor/models/AutoscaleSettingResourcePatch.java","src/main/java/com/azure/resourcemanager/monitor/models/AzureAppPushReceiver.java","src/main/java/com/azure/resourcemanager/monitor/models/AzureFunctionReceiver.java","src/main/java/com/azure/resourcemanager/monitor/models/AzureMonitorMetricsDestination.java","src/main/java/com/azure/resourcemanager/monitor/models/BaselineMetadata.java","src/main/java/com/azure/resourcemanager/monitor/models/BaselineSensitivity.java","src/main/java/com/azure/resourcemanager/monitor/models/CategoryType.java","src/main/java/com/azure/resourcemanager/monitor/models/ColumnDefinition.java","src/main/java/com/azure/resourcemanager/monitor/models/ComparisonOperationType.java","src/main/java/com/azure/resourcemanager/monitor/models/Condition.java","src/main/java/com/azure/resourcemanager/monitor/models/ConditionFailingPeriods.java","src/main/java/com/azure/resourcemanager/monitor/models/ConditionOperator.java","src/main/java/com/azure/resourcemanager/monitor/models/ConfigurationAccessEndpointSpec.java","src/main/java/com/azure/resourcemanager/monitor/models/Context.java","src/main/java/com/azure/resourcemanager/monitor/models/CriterionType.java","src/main/java/com/azure/resourcemanager/monitor/models/DataCollectionEndpoint.java","src/main/java/com/azure/resourcemanager/monitor/models/DataCollectionEndpointConfigurationAccess.java","src/main/java/com/azure/resourcemanager/monitor/models/DataCollectionEndpointFailoverConfiguration.java","src/main/java/com/azure/resourcemanager/monitor/models/DataCollectionEndpointLogsIngestion.java","src/main/java/com/azure/resourcemanager/monitor/models/DataCollectionEndpointMetadata.java","src/main/java/com/azure/resourcemanager/monitor/models/DataCollectionEndpointMetricsIngestion.java","src/main/java/com/azure/resourcemanager/monitor/models/DataCollectionEndpointNetworkAcls.java","src/main/java/com/azure/resourcemanager/monitor/models/DataCollectionEndpointResourceIdentity.java","src/main/java/com/azure/resourcemanager/monitor/models/DataCollectionEndpointResourceSku.java","src/main/java/com/azure/resourcemanager/monitor/models/DataCollectionRule.java","src/main/java/com/azure/resourcemanager/monitor/models/DataCollectionRuleAgentSettings.java","src/main/java/com/azure/resourcemanager/monitor/models/DataCollectionRuleAssociation.java","src/main/java/com/azure/resourcemanager/monitor/models/DataCollectionRuleAssociationMetadata.java","src/main/java/com/azure/resourcemanager/monitor/models/DataCollectionRuleDataSources.java","src/main/java/com/azure/resourcemanager/monitor/models/DataCollectionRuleDestinations.java","src/main/java/com/azure/resourcemanager/monitor/models/DataCollectionRuleDirectDataSources.java","src/main/java/com/azure/resourcemanager/monitor/models/DataCollectionRuleEndpoints.java","src/main/java/com/azure/resourcemanager/monitor/models/DataCollectionRuleIngestionQuotas.java","src/main/java/com/azure/resourcemanager/monitor/models/DataCollectionRuleMetadata.java","src/main/java/com/azure/resourcemanager/monitor/models/DataCollectionRuleReferences.java","src/main/java/com/azure/resourcemanager/monitor/models/DataCollectionRuleResourceIdentity.java","src/main/java/com/azure/resourcemanager/monitor/models/DataCollectionRuleResourceSku.java","src/main/java/com/azure/resourcemanager/monitor/models/DataContainer.java","src/main/java/com/azure/resourcemanager/monitor/models/DataFlow.java","src/main/java/com/azure/resourcemanager/monitor/models/DataImportSources.java","src/main/java/com/azure/resourcemanager/monitor/models/DataImportSourcesEventHub.java","src/main/java/com/azure/resourcemanager/monitor/models/DataSourcesSpec.java","src/main/java/com/azure/resourcemanager/monitor/models/DataSourcesSpecDataImports.java","src/main/java/com/azure/resourcemanager/monitor/models/DataStatus.java","src/main/java/com/azure/resourcemanager/monitor/models/DestinationsSpec.java","src/main/java/com/azure/resourcemanager/monitor/models/DestinationsSpecAzureMonitorMetrics.java","src/main/java/com/azure/resourcemanager/monitor/models/Dimension.java","src/main/java/com/azure/resourcemanager/monitor/models/DimensionOperator.java","src/main/java/com/azure/resourcemanager/monitor/models/DirectDataSourcesSpec.java","src/main/java/com/azure/resourcemanager/monitor/models/DynamicMetricCriteria.java","src/main/java/com/azure/resourcemanager/monitor/models/DynamicPromQLCriteria.java","src/main/java/com/azure/resourcemanager/monitor/models/DynamicThresholdFailingPeriods.java","src/main/java/com/azure/resourcemanager/monitor/models/DynamicThresholdOperator.java","src/main/java/com/azure/resourcemanager/monitor/models/DynamicThresholdSensitivity.java","src/main/java/com/azure/resourcemanager/monitor/models/EmailNotification.java","src/main/java/com/azure/resourcemanager/monitor/models/EmailReceiver.java","src/main/java/com/azure/resourcemanager/monitor/models/EnableRequest.java","src/main/java/com/azure/resourcemanager/monitor/models/EndpointsSpec.java","src/main/java/com/azure/resourcemanager/monitor/models/EnrichmentData.java","src/main/java/com/azure/resourcemanager/monitor/models/EtwProviderDataSource.java","src/main/java/com/azure/resourcemanager/monitor/models/EventHubDataSource.java","src/main/java/com/azure/resourcemanager/monitor/models/EventHubDestination.java","src/main/java/com/azure/resourcemanager/monitor/models/EventHubDirectDestination.java","src/main/java/com/azure/resourcemanager/monitor/models/EventHubReceiver.java","src/main/java/com/azure/resourcemanager/monitor/models/EventLevel.java","src/main/java/com/azure/resourcemanager/monitor/models/ExtensionDataSource.java","src/main/java/com/azure/resourcemanager/monitor/models/FailoverConfigurationSpec.java","src/main/java/com/azure/resourcemanager/monitor/models/HttpRequestInfo.java","src/main/java/com/azure/resourcemanager/monitor/models/Identity.java","src/main/java/com/azure/resourcemanager/monitor/models/IdentityType.java","src/main/java/com/azure/resourcemanager/monitor/models/IisLogsDataSource.java","src/main/java/com/azure/resourcemanager/monitor/models/IncidentManagementService.java","src/main/java/com/azure/resourcemanager/monitor/models/IncidentReceiver.java","src/main/java/com/azure/resourcemanager/monitor/models/IncidentServiceConnection.java","src/main/java/com/azure/resourcemanager/monitor/models/IngestionQuotas.java","src/main/java/com/azure/resourcemanager/monitor/models/IngestionQuotasLogs.java","src/main/java/com/azure/resourcemanager/monitor/models/IssueType.java","src/main/java/com/azure/resourcemanager/monitor/models/ItsmReceiver.java","src/main/java/com/azure/resourcemanager/monitor/models/Kind.java","src/main/java/com/azure/resourcemanager/monitor/models/KnownAgentSettingName.java","src/main/java/com/azure/resourcemanager/monitor/models/KnownColumnDefinitionType.java","src/main/java/com/azure/resourcemanager/monitor/models/KnownDataCollectionEndpointProvisioningState.java","src/main/java/com/azure/resourcemanager/monitor/models/KnownDataCollectionEndpointResourceKind.java","src/main/java/com/azure/resourcemanager/monitor/models/KnownDataCollectionRuleAssociationProvisioningState.java","src/main/java/com/azure/resourcemanager/monitor/models/KnownDataCollectionRuleProvisioningState.java","src/main/java/com/azure/resourcemanager/monitor/models/KnownDataCollectionRuleResourceKind.java","src/main/java/com/azure/resourcemanager/monitor/models/KnownDataFlowStreams.java","src/main/java/com/azure/resourcemanager/monitor/models/KnownEtwProviderDataSourceLogLevel.java","src/main/java/com/azure/resourcemanager/monitor/models/KnownEtwProviderType.java","src/main/java/com/azure/resourcemanager/monitor/models/KnownExtensionDataSourceStreams.java","src/main/java/com/azure/resourcemanager/monitor/models/KnownLocationSpecProvisioningStatus.java","src/main/java/com/azure/resourcemanager/monitor/models/KnownLogFileTextSettingsRecordStartTimestampFormat.java","src/main/java/com/azure/resourcemanager/monitor/models/KnownLogFilesDataSourceFormat.java","src/main/java/com/azure/resourcemanager/monitor/models/KnownOtelLogsDataSourceStreams.java","src/main/java/com/azure/resourcemanager/monitor/models/KnownOtelLogsDirectDataSourceStreams.java","src/main/java/com/azure/resourcemanager/monitor/models/KnownOtelTracesDataSourceStreams.java","src/main/java/com/azure/resourcemanager/monitor/models/KnownOtelTracesDirectDataSourceStreams.java","src/main/java/com/azure/resourcemanager/monitor/models/KnownPerfCounterDataSourceStreams.java","src/main/java/com/azure/resourcemanager/monitor/models/KnownPerformanceCountersOTelDataSourceStreams.java","src/main/java/com/azure/resourcemanager/monitor/models/KnownPrometheusForwarderDataSourceStreams.java","src/main/java/com/azure/resourcemanager/monitor/models/KnownPublicNetworkAccessOptions.java","src/main/java/com/azure/resourcemanager/monitor/models/KnownStorageBlobLookupType.java","src/main/java/com/azure/resourcemanager/monitor/models/KnownSyslogDataSourceFacilityNames.java","src/main/java/com/azure/resourcemanager/monitor/models/KnownSyslogDataSourceLogLevels.java","src/main/java/com/azure/resourcemanager/monitor/models/KnownSyslogDataSourceStreams.java","src/main/java/com/azure/resourcemanager/monitor/models/KnownWindowsEventLogDataSourceStreams.java","src/main/java/com/azure/resourcemanager/monitor/models/KnownWindowsFirewallLogsDataSourceProfileFilter.java","src/main/java/com/azure/resourcemanager/monitor/models/LocationSpec.java","src/main/java/com/azure/resourcemanager/monitor/models/LogAnalyticsDestination.java","src/main/java/com/azure/resourcemanager/monitor/models/LogFileSettings.java","src/main/java/com/azure/resourcemanager/monitor/models/LogFileSettingsText.java","src/main/java/com/azure/resourcemanager/monitor/models/LogFileTextSettings.java","src/main/java/com/azure/resourcemanager/monitor/models/LogFilesDataSource.java","src/main/java/com/azure/resourcemanager/monitor/models/LogFilesDataSourceSettings.java","src/main/java/com/azure/resourcemanager/monitor/models/LogProfileResourcePatch.java","src/main/java/com/azure/resourcemanager/monitor/models/LogSettings.java","src/main/java/com/azure/resourcemanager/monitor/models/LogicAppReceiver.java","src/main/java/com/azure/resourcemanager/monitor/models/LogsIngestionEndpointSpec.java","src/main/java/com/azure/resourcemanager/monitor/models/LogsQuotaSpec.java","src/main/java/com/azure/resourcemanager/monitor/models/ManagedServiceIdentity.java","src/main/java/com/azure/resourcemanager/monitor/models/ManagedServiceIdentityType.java","src/main/java/com/azure/resourcemanager/monitor/models/Metadata.java","src/main/java/com/azure/resourcemanager/monitor/models/MetricAggregationType.java","src/main/java/com/azure/resourcemanager/monitor/models/MetricAlertAction.java","src/main/java/com/azure/resourcemanager/monitor/models/MetricAlertCriteria.java","src/main/java/com/azure/resourcemanager/monitor/models/MetricAlertMultipleResourceMultipleMetricCriteria.java","src/main/java/com/azure/resourcemanager/monitor/models/MetricAlertResourcePatch.java","src/main/java/com/azure/resourcemanager/monitor/models/MetricAlertSingleResourceMultipleMetricCriteria.java","src/main/java/com/azure/resourcemanager/monitor/models/MetricAlertStatusProperties.java","src/main/java/com/azure/resourcemanager/monitor/models/MetricAvailability.java","src/main/java/com/azure/resourcemanager/monitor/models/MetricClass.java","src/main/java/com/azure/resourcemanager/monitor/models/MetricCriteria.java","src/main/java/com/azure/resourcemanager/monitor/models/MetricDimension.java","src/main/java/com/azure/resourcemanager/monitor/models/MetricNamespaceName.java","src/main/java/com/azure/resourcemanager/monitor/models/MetricResultType.java","src/main/java/com/azure/resourcemanager/monitor/models/MetricSettings.java","src/main/java/com/azure/resourcemanager/monitor/models/MetricSingleDimension.java","src/main/java/com/azure/resourcemanager/monitor/models/MetricStatisticType.java","src/main/java/com/azure/resourcemanager/monitor/models/MetricTrigger.java","src/main/java/com/azure/resourcemanager/monitor/models/MetricValue.java","src/main/java/com/azure/resourcemanager/monitor/models/MetricsIngestionEndpointSpec.java","src/main/java/com/azure/resourcemanager/monitor/models/MicrosoftFabricDestination.java","src/main/java/com/azure/resourcemanager/monitor/models/MonitoringAccountDestination.java","src/main/java/com/azure/resourcemanager/monitor/models/MultiMetricCriteria.java","src/main/java/com/azure/resourcemanager/monitor/models/MultiPromQLCriteria.java","src/main/java/com/azure/resourcemanager/monitor/models/NamespaceClassification.java","src/main/java/com/azure/resourcemanager/monitor/models/NetworkRuleSet.java","src/main/java/com/azure/resourcemanager/monitor/models/NetworkSecurityPerimeter.java","src/main/java/com/azure/resourcemanager/monitor/models/NetworkSecurityPerimeterConfigurationProperties.java","src/main/java/com/azure/resourcemanager/monitor/models/NetworkSecurityPerimeterConfigurationProvisioningState.java","src/main/java/com/azure/resourcemanager/monitor/models/NetworkSecurityProfile.java","src/main/java/com/azure/resourcemanager/monitor/models/NotificationRequestBody.java","src/main/java/com/azure/resourcemanager/monitor/models/Odatatype.java","src/main/java/com/azure/resourcemanager/monitor/models/OnboardingStatus.java","src/main/java/com/azure/resourcemanager/monitor/models/Operator.java","src/main/java/com/azure/resourcemanager/monitor/models/OtelDataSourceResourceAttributeRouting.java","src/main/java/com/azure/resourcemanager/monitor/models/OtelLogsDataSource.java","src/main/java/com/azure/resourcemanager/monitor/models/OtelLogsDataSourceResourceAttributeRouting.java","src/main/java/com/azure/resourcemanager/monitor/models/OtelLogsDirectDataSource.java","src/main/java/com/azure/resourcemanager/monitor/models/OtelMetricsDataSource.java","src/main/java/com/azure/resourcemanager/monitor/models/OtelMetricsDataSourceResourceAttributeRouting.java","src/main/java/com/azure/resourcemanager/monitor/models/OtelMetricsDirectDataSource.java","src/main/java/com/azure/resourcemanager/monitor/models/OtelTracesDataSource.java","src/main/java/com/azure/resourcemanager/monitor/models/OtelTracesDataSourceResourceAttributeRouting.java","src/main/java/com/azure/resourcemanager/monitor/models/OtelTracesDirectDataSource.java","src/main/java/com/azure/resourcemanager/monitor/models/PerfCounterDataSource.java","src/main/java/com/azure/resourcemanager/monitor/models/PerformanceCountersOTelDataSource.java","src/main/java/com/azure/resourcemanager/monitor/models/PlatformTelemetryDataSource.java","src/main/java/com/azure/resourcemanager/monitor/models/PredictiveAutoscalePolicy.java","src/main/java/com/azure/resourcemanager/monitor/models/PredictiveAutoscalePolicyScaleMode.java","src/main/java/com/azure/resourcemanager/monitor/models/PredictiveValue.java","src/main/java/com/azure/resourcemanager/monitor/models/PrivateEndpoint.java","src/main/java/com/azure/resourcemanager/monitor/models/PrivateEndpointConnectionProvisioningState.java","src/main/java/com/azure/resourcemanager/monitor/models/PrivateEndpointServiceConnectionStatus.java","src/main/java/com/azure/resourcemanager/monitor/models/PrivateLinkResourceProperties.java","src/main/java/com/azure/resourcemanager/monitor/models/PrivateLinkScopeProvisioningState.java","src/main/java/com/azure/resourcemanager/monitor/models/PrivateLinkScopedResource.java","src/main/java/com/azure/resourcemanager/monitor/models/PrivateLinkServiceConnectionState.java","src/main/java/com/azure/resourcemanager/monitor/models/PromQLCriteria.java","src/main/java/com/azure/resourcemanager/monitor/models/PrometheusForwarderDataSource.java","src/main/java/com/azure/resourcemanager/monitor/models/ProvisioningIssue.java","src/main/java/com/azure/resourcemanager/monitor/models/ProvisioningIssueProperties.java","src/main/java/com/azure/resourcemanager/monitor/models/QueryFailingPeriods.java","src/main/java/com/azure/resourcemanager/monitor/models/ReceiverStatus.java","src/main/java/com/azure/resourcemanager/monitor/models/Recurrence.java","src/main/java/com/azure/resourcemanager/monitor/models/RecurrenceFrequency.java","src/main/java/com/azure/resourcemanager/monitor/models/RecurrentSchedule.java","src/main/java/com/azure/resourcemanager/monitor/models/ReferencesSpec.java","src/main/java/com/azure/resourcemanager/monitor/models/ReferencesSpecEnrichmentData.java","src/main/java/com/azure/resourcemanager/monitor/models/ResolveConfiguration.java","src/main/java/com/azure/resourcemanager/monitor/models/ResourceAssociation.java","src/main/java/com/azure/resourcemanager/monitor/models/ResourceAssociationAccessMode.java","src/main/java/com/azure/resourcemanager/monitor/models/ResourceForUpdate.java","src/main/java/com/azure/resourcemanager/monitor/models/ResourceForUpdateIdentity.java","src/main/java/com/azure/resourcemanager/monitor/models/ResultType.java","src/main/java/com/azure/resourcemanager/monitor/models/RetentionPolicy.java","src/main/java/com/azure/resourcemanager/monitor/models/RuleResolveConfiguration.java","src/main/java/com/azure/resourcemanager/monitor/models/ScaleAction.java","src/main/java/com/azure/resourcemanager/monitor/models/ScaleCapacity.java","src/main/java/com/azure/resourcemanager/monitor/models/ScaleDirection.java","src/main/java/com/azure/resourcemanager/monitor/models/ScaleRuleMetricDimension.java","src/main/java/com/azure/resourcemanager/monitor/models/ScaleRuleMetricDimensionOperationType.java","src/main/java/com/azure/resourcemanager/monitor/models/ScaleType.java","src/main/java/com/azure/resourcemanager/monitor/models/ScheduledQueryRuleCriteria.java","src/main/java/com/azure/resourcemanager/monitor/models/ScheduledQueryRuleResourcePatch.java","src/main/java/com/azure/resourcemanager/monitor/models/ScopedResourceKind.java","src/main/java/com/azure/resourcemanager/monitor/models/ScopedResourceProvisioningState.java","src/main/java/com/azure/resourcemanager/monitor/models/SenderAuthorization.java","src/main/java/com/azure/resourcemanager/monitor/models/ServiceDiagnosticSettingsResourcePatch.java","src/main/java/com/azure/resourcemanager/monitor/models/Severity.java","src/main/java/com/azure/resourcemanager/monitor/models/SingleBaseline.java","src/main/java/com/azure/resourcemanager/monitor/models/Sku.java","src/main/java/com/azure/resourcemanager/monitor/models/SkuTier.java","src/main/java/com/azure/resourcemanager/monitor/models/SmsReceiver.java","src/main/java/com/azure/resourcemanager/monitor/models/StaticPromQLCriteria.java","src/main/java/com/azure/resourcemanager/monitor/models/StorageBlob.java","src/main/java/com/azure/resourcemanager/monitor/models/StorageBlobDestination.java","src/main/java/com/azure/resourcemanager/monitor/models/StorageTableDestination.java","src/main/java/com/azure/resourcemanager/monitor/models/StreamDeclaration.java","src/main/java/com/azure/resourcemanager/monitor/models/SubscriptionScopeMetricsRequestBodyParameters.java","src/main/java/com/azure/resourcemanager/monitor/models/SyslogDataSource.java","src/main/java/com/azure/resourcemanager/monitor/models/TagsResource.java","src/main/java/com/azure/resourcemanager/monitor/models/TenantActionGroupActionDetail.java","src/main/java/com/azure/resourcemanager/monitor/models/TenantActionGroupPatchBody.java","src/main/java/com/azure/resourcemanager/monitor/models/TenantActionGroupWebhookReceiver.java","src/main/java/com/azure/resourcemanager/monitor/models/TenantNotificationRequestBody.java","src/main/java/com/azure/resourcemanager/monitor/models/TimeAggregation.java","src/main/java/com/azure/resourcemanager/monitor/models/TimeAggregationType.java","src/main/java/com/azure/resourcemanager/monitor/models/TimeSeriesBaseline.java","src/main/java/com/azure/resourcemanager/monitor/models/TimeSeriesElement.java","src/main/java/com/azure/resourcemanager/monitor/models/TimeWindow.java","src/main/java/com/azure/resourcemanager/monitor/models/Unit.java","src/main/java/com/azure/resourcemanager/monitor/models/UserAssignedIdentity.java","src/main/java/com/azure/resourcemanager/monitor/models/UserIdentityProperties.java","src/main/java/com/azure/resourcemanager/monitor/models/VoiceReceiver.java","src/main/java/com/azure/resourcemanager/monitor/models/WebhookNotification.java","src/main/java/com/azure/resourcemanager/monitor/models/WebhookReceiver.java","src/main/java/com/azure/resourcemanager/monitor/models/WebtestLocationAvailabilityCriteria.java","src/main/java/com/azure/resourcemanager/monitor/models/WindowsEventLogDataSource.java","src/main/java/com/azure/resourcemanager/monitor/models/WindowsFirewallLogsDataSource.java","src/main/java/com/azure/resourcemanager/monitor/models/WorkspaceInfo.java","src/main/java/com/azure/resourcemanager/monitor/models/package-info.java","src/main/java/com/azure/resourcemanager/monitor/package-info.java"]} \ No newline at end of file diff --git a/sdk/monitor/azure-resourcemanager-monitor/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-monitor/proxy-config.json b/sdk/monitor/azure-resourcemanager-monitor/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-monitor/proxy-config.json index 36e34e5418e3..6a51c4e83f2c 100644 --- a/sdk/monitor/azure-resourcemanager-monitor/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-monitor/proxy-config.json +++ b/sdk/monitor/azure-resourcemanager-monitor/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-monitor/proxy-config.json @@ -1 +1 @@ -[["com.azure.resourcemanager.monitor.implementation.ActionGroupsClientImpl$ActionGroupsService"],["com.azure.resourcemanager.monitor.implementation.ActivityLogAlertsClientImpl$ActivityLogAlertsService"],["com.azure.resourcemanager.monitor.implementation.ActivityLogsClientImpl$ActivityLogsService"],["com.azure.resourcemanager.monitor.implementation.AlertRuleIncidentsClientImpl$AlertRuleIncidentsService"],["com.azure.resourcemanager.monitor.implementation.AutoscaleSettingsClientImpl$AutoscaleSettingsService"],["com.azure.resourcemanager.monitor.implementation.BaselinesClientImpl$BaselinesService"],["com.azure.resourcemanager.monitor.implementation.DataCollectionEndpointsClientImpl$DataCollectionEndpointsService"],["com.azure.resourcemanager.monitor.implementation.DataCollectionRuleAssociationsClientImpl$DataCollectionRuleAssociationsService"],["com.azure.resourcemanager.monitor.implementation.DataCollectionRulesClientImpl$DataCollectionRulesService"],["com.azure.resourcemanager.monitor.implementation.EventCategoriesClientImpl$EventCategoriesService"],["com.azure.resourcemanager.monitor.implementation.LogProfilesClientImpl$LogProfilesService"],["com.azure.resourcemanager.monitor.implementation.MetricAlertsClientImpl$MetricAlertsService"],["com.azure.resourcemanager.monitor.implementation.MetricAlertsStatusClientImpl$MetricAlertsStatusService"],["com.azure.resourcemanager.monitor.implementation.MetricDefinitionsClientImpl$MetricDefinitionsService"],["com.azure.resourcemanager.monitor.implementation.MetricNamespacesClientImpl$MetricNamespacesService"],["com.azure.resourcemanager.monitor.implementation.MetricsClientImpl$MetricsService"],["com.azure.resourcemanager.monitor.implementation.NspScheduledQueryRulesClientImpl$NspScheduledQueryRulesService"],["com.azure.resourcemanager.monitor.implementation.PredictiveMetricsClientImpl$PredictiveMetricsService"],["com.azure.resourcemanager.monitor.implementation.PrivateEndpointConnectionsClientImpl$PrivateEndpointConnectionsService"],["com.azure.resourcemanager.monitor.implementation.PrivateLinkResourcesClientImpl$PrivateLinkResourcesService"],["com.azure.resourcemanager.monitor.implementation.PrivateLinkScopeOperationStatusClientImpl$PrivateLinkScopeOperationStatusService"],["com.azure.resourcemanager.monitor.implementation.PrivateLinkScopedResourcesClientImpl$PrivateLinkScopedResourcesService"],["com.azure.resourcemanager.monitor.implementation.PrivateLinkScopesClientImpl$PrivateLinkScopesService"],["com.azure.resourcemanager.monitor.implementation.ScheduledQueryRulesClientImpl$ScheduledQueryRulesService"],["com.azure.resourcemanager.monitor.implementation.ServiceDiagnosticSettingsOperationsClientImpl$ServiceDiagnosticSettingsOperationsService"],["com.azure.resourcemanager.monitor.implementation.TenantActivityLogsClientImpl$TenantActivityLogsService"]] \ No newline at end of file +[["com.azure.resourcemanager.monitor.implementation.ActionGroupsClientImpl$ActionGroupsService"],["com.azure.resourcemanager.monitor.implementation.ActivityLogAlertsClientImpl$ActivityLogAlertsService"],["com.azure.resourcemanager.monitor.implementation.ActivityLogsClientImpl$ActivityLogsService"],["com.azure.resourcemanager.monitor.implementation.AlertRuleIncidentsClientImpl$AlertRuleIncidentsService"],["com.azure.resourcemanager.monitor.implementation.AutoscaleSettingsClientImpl$AutoscaleSettingsService"],["com.azure.resourcemanager.monitor.implementation.BaselinesClientImpl$BaselinesService"],["com.azure.resourcemanager.monitor.implementation.DataCollectionEndpointsClientImpl$DataCollectionEndpointsService"],["com.azure.resourcemanager.monitor.implementation.DataCollectionRuleAssociationsClientImpl$DataCollectionRuleAssociationsService"],["com.azure.resourcemanager.monitor.implementation.DataCollectionRulesClientImpl$DataCollectionRulesService"],["com.azure.resourcemanager.monitor.implementation.DiagnosticSettingsCategoriesClientImpl$DiagnosticSettingsCategoriesService"],["com.azure.resourcemanager.monitor.implementation.DiagnosticSettingsOperationsClientImpl$DiagnosticSettingsOperationsService"],["com.azure.resourcemanager.monitor.implementation.EventCategoriesClientImpl$EventCategoriesService"],["com.azure.resourcemanager.monitor.implementation.LogProfilesClientImpl$LogProfilesService"],["com.azure.resourcemanager.monitor.implementation.MetricAlertsClientImpl$MetricAlertsService"],["com.azure.resourcemanager.monitor.implementation.MetricAlertsStatusClientImpl$MetricAlertsStatusService"],["com.azure.resourcemanager.monitor.implementation.MetricDefinitionsClientImpl$MetricDefinitionsService"],["com.azure.resourcemanager.monitor.implementation.MetricNamespacesClientImpl$MetricNamespacesService"],["com.azure.resourcemanager.monitor.implementation.MetricsClientImpl$MetricsService"],["com.azure.resourcemanager.monitor.implementation.MonitorClientImpl$MonitorClientService"],["com.azure.resourcemanager.monitor.implementation.NspScheduledQueryRulesClientImpl$NspScheduledQueryRulesService"],["com.azure.resourcemanager.monitor.implementation.PredictiveMetricsClientImpl$PredictiveMetricsService"],["com.azure.resourcemanager.monitor.implementation.PrivateEndpointConnectionsClientImpl$PrivateEndpointConnectionsService"],["com.azure.resourcemanager.monitor.implementation.PrivateLinkResourcesClientImpl$PrivateLinkResourcesService"],["com.azure.resourcemanager.monitor.implementation.PrivateLinkScopeOperationStatusClientImpl$PrivateLinkScopeOperationStatusService"],["com.azure.resourcemanager.monitor.implementation.PrivateLinkScopedResourcesClientImpl$PrivateLinkScopedResourcesService"],["com.azure.resourcemanager.monitor.implementation.PrivateLinkScopesClientImpl$PrivateLinkScopesService"],["com.azure.resourcemanager.monitor.implementation.ScheduledQueryRulesClientImpl$ScheduledQueryRulesService"],["com.azure.resourcemanager.monitor.implementation.ServiceDiagnosticSettingsOperationsClientImpl$ServiceDiagnosticSettingsOperationsService"],["com.azure.resourcemanager.monitor.implementation.TenantActionGroupsClientImpl$TenantActionGroupsService"],["com.azure.resourcemanager.monitor.implementation.TenantActivityLogsClientImpl$TenantActivityLogsService"],["com.azure.resourcemanager.monitor.implementation.VMInsightsClientImpl$VMInsightsService"]] \ No newline at end of file diff --git a/sdk/monitor/azure-resourcemanager-monitor/src/samples/java/com/azure/resourcemanager/monitor/generated/DiagnosticSettingsCategoryGetSamples.java b/sdk/monitor/azure-resourcemanager-monitor/src/samples/java/com/azure/resourcemanager/monitor/generated/DiagnosticSettingsCategoryGetSamples.java new file mode 100644 index 000000000000..0d06f0920e66 --- /dev/null +++ b/sdk/monitor/azure-resourcemanager-monitor/src/samples/java/com/azure/resourcemanager/monitor/generated/DiagnosticSettingsCategoryGetSamples.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.monitor.generated; + +/** + * Samples for DiagnosticSettingsCategory Get. + */ +public final class DiagnosticSettingsCategoryGetSamples { + /* + * x-ms-original-file: 2021-05-01-preview/getDiagnosticSettingsCategory.json + */ + /** + * Sample code: Gets the diagnostic setting. + * + * @param manager Entry point to MonitorManager. + */ + public static void getsTheDiagnosticSetting(com.azure.resourcemanager.monitor.MonitorManager manager) { + manager.serviceClient() + .getDiagnosticSettingsCategories() + .getWithResponse( + "subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6", + "WorkflowRuntime", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/monitor/azure-resourcemanager-monitor/src/samples/java/com/azure/resourcemanager/monitor/generated/DiagnosticSettingsCategoryListSamples.java b/sdk/monitor/azure-resourcemanager-monitor/src/samples/java/com/azure/resourcemanager/monitor/generated/DiagnosticSettingsCategoryListSamples.java new file mode 100644 index 000000000000..6d9c5510a8a4 --- /dev/null +++ b/sdk/monitor/azure-resourcemanager-monitor/src/samples/java/com/azure/resourcemanager/monitor/generated/DiagnosticSettingsCategoryListSamples.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.monitor.generated; + +/** + * Samples for DiagnosticSettingsCategory List. + */ +public final class DiagnosticSettingsCategoryListSamples { + /* + * x-ms-original-file: 2021-05-01-preview/listDiagnosticSettingsCategories.json + */ + /** + * Sample code: Gets the diagnostic setting. + * + * @param manager Entry point to MonitorManager. + */ + public static void getsTheDiagnosticSetting(com.azure.resourcemanager.monitor.MonitorManager manager) { + manager.serviceClient() + .getDiagnosticSettingsCategories() + .list( + "subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/monitor/azure-resourcemanager-monitor/src/samples/java/com/azure/resourcemanager/monitor/generated/DiagnosticSettingsOperationCreateOrUpdateSamples.java b/sdk/monitor/azure-resourcemanager-monitor/src/samples/java/com/azure/resourcemanager/monitor/generated/DiagnosticSettingsOperationCreateOrUpdateSamples.java new file mode 100644 index 000000000000..64673b830d7b --- /dev/null +++ b/sdk/monitor/azure-resourcemanager-monitor/src/samples/java/com/azure/resourcemanager/monitor/generated/DiagnosticSettingsOperationCreateOrUpdateSamples.java @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.monitor.generated; + +import com.azure.resourcemanager.monitor.fluent.models.DiagnosticSettingsResourceInner; +import com.azure.resourcemanager.monitor.models.LogSettings; +import com.azure.resourcemanager.monitor.models.MetricSettings; +import com.azure.resourcemanager.monitor.models.RetentionPolicy; +import java.util.Arrays; + +/** + * Samples for DiagnosticSettingsOperation CreateOrUpdate. + */ +public final class DiagnosticSettingsOperationCreateOrUpdateSamples { + /* + * x-ms-original-file: 2021-05-01-preview/createOrUpdateDiagnosticSetting.json + */ + /** + * Sample code: Creates or Updates the diagnostic setting. + * + * @param manager Entry point to MonitorManager. + */ + public static void createsOrUpdatesTheDiagnosticSetting(com.azure.resourcemanager.monitor.MonitorManager manager) { + manager.serviceClient() + .getDiagnosticSettingsOperations() + .createOrUpdateWithResponse( + "subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6", + "mysetting", + new DiagnosticSettingsResourceInner().withStorageAccountId( + "/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/apptest/providers/Microsoft.Storage/storageAccounts/appteststorage1") + .withEventHubAuthorizationRuleId("fakeTokenPlaceholder") + .withEventHubName("myeventhub") + .withMetrics(Arrays.asList(new MetricSettings().withCategory("WorkflowMetrics") + .withEnabled(true) + .withRetentionPolicy(new RetentionPolicy().withEnabled(false).withDays(0)))) + .withLogs(Arrays.asList(new LogSettings().withCategoryGroup("allLogs") + .withEnabled(true) + .withRetentionPolicy(new RetentionPolicy().withEnabled(false).withDays(0)))) + .withWorkspaceId("") + .withMarketplacePartnerId( + "/subscriptions/abcdeabc-1234-1234-ab12-123a1234567a/resourceGroups/test-rg/providers/Microsoft.Datadog/monitors/dd1") + .withLogAnalyticsDestinationType("Dedicated"), + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2021-05-01-preview/createOrUpdateDiagnosticSettingCategory.json + */ + /** + * Sample code: Creates or Updates the diagnostic setting for category. + * + * @param manager Entry point to MonitorManager. + */ + public static void + createsOrUpdatesTheDiagnosticSettingForCategory(com.azure.resourcemanager.monitor.MonitorManager manager) { + manager.serviceClient() + .getDiagnosticSettingsOperations() + .createOrUpdateWithResponse( + "subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6", + "mysetting", + new DiagnosticSettingsResourceInner().withStorageAccountId( + "/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/apptest/providers/Microsoft.Storage/storageAccounts/appteststorage1") + .withEventHubAuthorizationRuleId("fakeTokenPlaceholder") + .withEventHubName("myeventhub") + .withMetrics(Arrays.asList(new MetricSettings().withCategory("WorkflowMetrics") + .withEnabled(true) + .withRetentionPolicy(new RetentionPolicy().withEnabled(false).withDays(0)))) + .withLogs(Arrays.asList(new LogSettings().withCategory("WorkflowRuntime") + .withEnabled(true) + .withRetentionPolicy(new RetentionPolicy().withEnabled(false).withDays(0)))) + .withWorkspaceId("") + .withMarketplacePartnerId( + "/subscriptions/abcdeabc-1234-1234-ab12-123a1234567a/resourceGroups/test-rg/providers/Microsoft.Datadog/monitors/dd1") + .withLogAnalyticsDestinationType("Dedicated"), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/monitor/azure-resourcemanager-monitor/src/samples/java/com/azure/resourcemanager/monitor/generated/DiagnosticSettingsOperationDeleteSamples.java b/sdk/monitor/azure-resourcemanager-monitor/src/samples/java/com/azure/resourcemanager/monitor/generated/DiagnosticSettingsOperationDeleteSamples.java new file mode 100644 index 000000000000..e2ebbf8d2368 --- /dev/null +++ b/sdk/monitor/azure-resourcemanager-monitor/src/samples/java/com/azure/resourcemanager/monitor/generated/DiagnosticSettingsOperationDeleteSamples.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.monitor.generated; + +/** + * Samples for DiagnosticSettingsOperation Delete. + */ +public final class DiagnosticSettingsOperationDeleteSamples { + /* + * x-ms-original-file: 2021-05-01-preview/deleteDiagnosticSetting.json + */ + /** + * Sample code: Deletes the diagnostic setting. + * + * @param manager Entry point to MonitorManager. + */ + public static void deletesTheDiagnosticSetting(com.azure.resourcemanager.monitor.MonitorManager manager) { + manager.serviceClient() + .getDiagnosticSettingsOperations() + .deleteWithResponse( + "subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6", + "mysetting", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/monitor/azure-resourcemanager-monitor/src/samples/java/com/azure/resourcemanager/monitor/generated/DiagnosticSettingsOperationGetSamples.java b/sdk/monitor/azure-resourcemanager-monitor/src/samples/java/com/azure/resourcemanager/monitor/generated/DiagnosticSettingsOperationGetSamples.java new file mode 100644 index 000000000000..3ba4870944de --- /dev/null +++ b/sdk/monitor/azure-resourcemanager-monitor/src/samples/java/com/azure/resourcemanager/monitor/generated/DiagnosticSettingsOperationGetSamples.java @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.monitor.generated; + +/** + * Samples for DiagnosticSettingsOperation Get. + */ +public final class DiagnosticSettingsOperationGetSamples { + /* + * x-ms-original-file: 2021-05-01-preview/getDiagnosticSetting.json + */ + /** + * Sample code: Gets the diagnostic setting. + * + * @param manager Entry point to MonitorManager. + */ + public static void getsTheDiagnosticSetting(com.azure.resourcemanager.monitor.MonitorManager manager) { + manager.serviceClient() + .getDiagnosticSettingsOperations() + .getWithResponse( + "subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6", + "mysetting", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2021-05-01-preview/getDiagnosticSettingCategory.json + */ + /** + * Sample code: Gets the diagnostic setting for category. + * + * @param manager Entry point to MonitorManager. + */ + public static void getsTheDiagnosticSettingForCategory(com.azure.resourcemanager.monitor.MonitorManager manager) { + manager.serviceClient() + .getDiagnosticSettingsOperations() + .getWithResponse( + "subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6", + "mysetting", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/monitor/azure-resourcemanager-monitor/src/samples/java/com/azure/resourcemanager/monitor/generated/DiagnosticSettingsOperationListSamples.java b/sdk/monitor/azure-resourcemanager-monitor/src/samples/java/com/azure/resourcemanager/monitor/generated/DiagnosticSettingsOperationListSamples.java new file mode 100644 index 000000000000..fc6e59917fa1 --- /dev/null +++ b/sdk/monitor/azure-resourcemanager-monitor/src/samples/java/com/azure/resourcemanager/monitor/generated/DiagnosticSettingsOperationListSamples.java @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.monitor.generated; + +/** + * Samples for DiagnosticSettingsOperation List. + */ +public final class DiagnosticSettingsOperationListSamples { + /* + * x-ms-original-file: 2021-05-01-preview/listDiagnosticSettings.json + */ + /** + * Sample code: Gets the diagnostic setting. + * + * @param manager Entry point to MonitorManager. + */ + public static void getsTheDiagnosticSetting(com.azure.resourcemanager.monitor.MonitorManager manager) { + manager.serviceClient() + .getDiagnosticSettingsOperations() + .list( + "subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6", + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2021-05-01-preview/listDiagnosticSettingsCategory.json + */ + /** + * Sample code: Gets the diagnostic setting for category. + * + * @param manager Entry point to MonitorManager. + */ + public static void getsTheDiagnosticSettingForCategory(com.azure.resourcemanager.monitor.MonitorManager manager) { + manager.serviceClient() + .getDiagnosticSettingsOperations() + .list( + "subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/monitor/azure-resourcemanager-monitor/src/samples/java/com/azure/resourcemanager/monitor/generated/MetricAlertsCreateOrUpdateSamples.java b/sdk/monitor/azure-resourcemanager-monitor/src/samples/java/com/azure/resourcemanager/monitor/generated/MetricAlertsCreateOrUpdateSamples.java index 7bb0528c87c0..113cd03ae8a4 100644 --- a/sdk/monitor/azure-resourcemanager-monitor/src/samples/java/com/azure/resourcemanager/monitor/generated/MetricAlertsCreateOrUpdateSamples.java +++ b/sdk/monitor/azure-resourcemanager-monitor/src/samples/java/com/azure/resourcemanager/monitor/generated/MetricAlertsCreateOrUpdateSamples.java @@ -36,46 +36,7 @@ */ public final class MetricAlertsCreateOrUpdateSamples { /* - * x-ms-original-file: 2024-03-01-preview/createOrUpdateMetricAlertSubscription.json - */ - /** - * Sample code: Create or update an alert rule on Subscription. - * - * @param manager Entry point to MonitorManager. - */ - public static void - createOrUpdateAnAlertRuleOnSubscription(com.azure.resourcemanager.monitor.MonitorManager manager) { - manager.serviceClient() - .getMetricAlerts() - .createOrUpdateWithResponse("gigtest", "MetricAlertAtSubscriptionLevel", - new MetricAlertResourceInner().withLocation("global") - .withTags(mapOf()) - .withDescription("This is the description of the rule1") - .withSeverity(3) - .withEnabled(true) - .withScopes(Arrays.asList("/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7")) - .withEvaluationFrequency(Duration.parse("PT1M")) - .withWindowSize(Duration.parse("PT15M")) - .withTargetResourceType("Microsoft.Compute/virtualMachines") - .withTargetResourceRegion("southcentralus") - .withCriteria(new MetricAlertMultipleResourceMultipleMetricCriteria() - .withAllOf(Arrays.asList(new MetricCriteria().withName("High_CPU_80") - .withMetricName("Percentage CPU") - .withMetricNamespace("microsoft.compute/virtualmachines") - .withTimeAggregation(AggregationTypeEnum.AVERAGE) - .withDimensions(Arrays.asList()) - .withOperator(Operator.GREATER_THAN) - .withThreshold(80.5)))) - .withAutoMitigate(true) - .withActions(Arrays.asList(new MetricAlertAction().withActionGroupId( - "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2") - .withWebhookProperties( - mapOf("key11", "fakeTokenPlaceholder", "key12", "fakeTokenPlaceholder")))), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2024-03-01-preview/createOrUpdateMetricAlertResourceGroup.json + * x-ms-original-file: 2026-01-01/createOrUpdateMetricAlertResourceGroup.json */ /** * Sample code: Create or update an alert rule on Resource group(s). @@ -114,7 +75,7 @@ public final class MetricAlertsCreateOrUpdateSamples { } /* - * x-ms-original-file: 2024-03-01-preview/createOrUpdateMetricAlertWithDimensions.json + * x-ms-original-file: 2026-01-01/createOrUpdateMetricAlertWithDimensions.json */ /** * Sample code: Create or update an alert rules with dimensions. @@ -157,7 +118,7 @@ public final class MetricAlertsCreateOrUpdateSamples { } /* - * x-ms-original-file: 2024-03-01-preview/createOrUpdateMetricAlertQuery.json + * x-ms-original-file: 2026-01-01/createOrUpdateMetricAlertQuery.json */ /** * Sample code: Create or update a query based alert rule. @@ -193,7 +154,7 @@ public static void createOrUpdateAQueryBasedAlertRule(com.azure.resourcemanager. } /* - * x-ms-original-file: 2024-03-01-preview/createOrUpdateWebTestMetricAlert.json + * x-ms-original-file: 2026-01-01/createOrUpdateWebTestMetricAlert.json */ /** * Sample code: Create or update a web test alert rule. @@ -227,7 +188,7 @@ public static void createOrUpdateAWebTestAlertRule(com.azure.resourcemanager.mon } /* - * x-ms-original-file: 2024-03-01-preview/createOrUpdateDynamicMetricAlertSingleResource.json + * x-ms-original-file: 2026-01-01/createOrUpdateDynamicMetricAlertSingleResource.json */ /** * Sample code: Create or update a dynamic alert rule for Single Resource. @@ -266,7 +227,7 @@ public static void createOrUpdateAWebTestAlertRule(com.azure.resourcemanager.mon } /* - * x-ms-original-file: 2024-03-01-preview/createOrUpdateMetricAlertQueryMultiResource.json + * x-ms-original-file: 2026-01-01/createOrUpdateMetricAlertQueryMultiResource.json */ /** * Sample code: Create or update a resource centric query based alert rule for Multiple Resources. @@ -302,7 +263,7 @@ public static void createOrUpdateAResourceCentricQueryBasedAlertRuleForMultipleR } /* - * x-ms-original-file: 2024-03-01-preview/createOrUpdateMetricAlertQueryResourceCentric.json + * x-ms-original-file: 2026-01-01/createOrUpdateMetricAlertQueryResourceCentric.json */ /** * Sample code: Create or update a resource centric query based alert rule. @@ -339,7 +300,7 @@ public static void createOrUpdateAResourceCentricQueryBasedAlertRuleForMultipleR } /* - * x-ms-original-file: 2024-03-01-preview/createOrUpdateMetricAlertSingleResource.json + * x-ms-original-file: 2026-01-01/createOrUpdateMetricAlertSingleResource.json */ /** * Sample code: Create or update an alert rule for Single Resource. @@ -374,7 +335,46 @@ public static void createOrUpdateAResourceCentricQueryBasedAlertRuleForMultipleR } /* - * x-ms-original-file: 2024-03-01-preview/createOrUpdateMetricAlertMultipleResource.json + * x-ms-original-file: 2026-01-01/createOrUpdateMetricAlertSubscription.json + */ + /** + * Sample code: Create or update an alert rule on Subscription. + * + * @param manager Entry point to MonitorManager. + */ + public static void + createOrUpdateAnAlertRuleOnSubscription(com.azure.resourcemanager.monitor.MonitorManager manager) { + manager.serviceClient() + .getMetricAlerts() + .createOrUpdateWithResponse("gigtest", "MetricAlertAtSubscriptionLevel", + new MetricAlertResourceInner().withLocation("global") + .withTags(mapOf()) + .withDescription("This is the description of the rule1") + .withSeverity(3) + .withEnabled(true) + .withScopes(Arrays.asList("/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7")) + .withEvaluationFrequency(Duration.parse("PT1M")) + .withWindowSize(Duration.parse("PT15M")) + .withTargetResourceType("Microsoft.Compute/virtualMachines") + .withTargetResourceRegion("southcentralus") + .withCriteria(new MetricAlertMultipleResourceMultipleMetricCriteria() + .withAllOf(Arrays.asList(new MetricCriteria().withName("High_CPU_80") + .withMetricName("Percentage CPU") + .withMetricNamespace("microsoft.compute/virtualmachines") + .withTimeAggregation(AggregationTypeEnum.AVERAGE) + .withDimensions(Arrays.asList()) + .withOperator(Operator.GREATER_THAN) + .withThreshold(80.5)))) + .withAutoMitigate(true) + .withActions(Arrays.asList(new MetricAlertAction().withActionGroupId( + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2") + .withWebhookProperties( + mapOf("key11", "fakeTokenPlaceholder", "key12", "fakeTokenPlaceholder")))), + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2026-01-01/createOrUpdateMetricAlertMultipleResource.json */ /** * Sample code: Create or update an alert rule for Multiple Resource. @@ -414,7 +414,7 @@ public static void createOrUpdateAResourceCentricQueryBasedAlertRuleForMultipleR } /* - * x-ms-original-file: 2024-03-01-preview/createOrUpdateDynamicMetricAlertMultipleResource.json + * x-ms-original-file: 2026-01-01/createOrUpdateDynamicMetricAlertMultipleResource.json */ /** * Sample code: Create or update a dynamic alert rule for Multiple Resources. @@ -456,7 +456,7 @@ public static void createOrUpdateAResourceCentricQueryBasedAlertRuleForMultipleR } /* - * x-ms-original-file: 2024-03-01-preview/createOrUpdateMetricAlertQueryDT.json + * x-ms-original-file: 2026-01-01/createOrUpdateMetricAlertQueryDT.json */ /** * Sample code: Create or update a query based alert rule with dynamic threshold. diff --git a/sdk/monitor/azure-resourcemanager-monitor/src/samples/java/com/azure/resourcemanager/monitor/generated/MetricAlertsDeleteSamples.java b/sdk/monitor/azure-resourcemanager-monitor/src/samples/java/com/azure/resourcemanager/monitor/generated/MetricAlertsDeleteSamples.java index d9988142a845..1d36c11a86b8 100644 --- a/sdk/monitor/azure-resourcemanager-monitor/src/samples/java/com/azure/resourcemanager/monitor/generated/MetricAlertsDeleteSamples.java +++ b/sdk/monitor/azure-resourcemanager-monitor/src/samples/java/com/azure/resourcemanager/monitor/generated/MetricAlertsDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class MetricAlertsDeleteSamples { /* - * x-ms-original-file: 2024-03-01-preview/deleteMetricAlert.json + * x-ms-original-file: 2026-01-01/deleteMetricAlert.json */ /** * Sample code: Delete an alert rule. diff --git a/sdk/monitor/azure-resourcemanager-monitor/src/samples/java/com/azure/resourcemanager/monitor/generated/MetricAlertsGetByResourceGroupSamples.java b/sdk/monitor/azure-resourcemanager-monitor/src/samples/java/com/azure/resourcemanager/monitor/generated/MetricAlertsGetByResourceGroupSamples.java index 2bdd19087519..d49638c978cb 100644 --- a/sdk/monitor/azure-resourcemanager-monitor/src/samples/java/com/azure/resourcemanager/monitor/generated/MetricAlertsGetByResourceGroupSamples.java +++ b/sdk/monitor/azure-resourcemanager-monitor/src/samples/java/com/azure/resourcemanager/monitor/generated/MetricAlertsGetByResourceGroupSamples.java @@ -9,7 +9,7 @@ */ public final class MetricAlertsGetByResourceGroupSamples { /* - * x-ms-original-file: 2024-03-01-preview/getMetricAlertQuery.json + * x-ms-original-file: 2026-01-01/getMetricAlertQuery.json */ /** * Sample code: Get a query based alert rule. @@ -23,7 +23,7 @@ public static void getAQueryBasedAlertRule(com.azure.resourcemanager.monitor.Mon } /* - * x-ms-original-file: 2024-03-01-preview/getMetricAlertResourceGroup.json + * x-ms-original-file: 2026-01-01/getMetricAlertResourceGroup.json */ /** * Sample code: Get an alert rule on resource group(s). @@ -38,7 +38,7 @@ public static void getAnAlertRuleOnResourceGroupS(com.azure.resourcemanager.moni } /* - * x-ms-original-file: 2024-03-01-preview/getDynamicMetricAlertMultipleResource.json + * x-ms-original-file: 2026-01-01/getDynamicMetricAlertMultipleResource.json */ /** * Sample code: Get a dynamic alert rule for multiple resources. @@ -54,7 +54,7 @@ public static void getAnAlertRuleOnResourceGroupS(com.azure.resourcemanager.moni } /* - * x-ms-original-file: 2024-03-01-preview/getWebTestMetricAlert.json + * x-ms-original-file: 2026-01-01/getWebTestMetricAlert.json */ /** * Sample code: Get a web test alert rule. @@ -68,7 +68,7 @@ public static void getAWebTestAlertRule(com.azure.resourcemanager.monitor.Monito } /* - * x-ms-original-file: 2024-03-01-preview/getMetricAlertSingleResource.json + * x-ms-original-file: 2026-01-01/getMetricAlertSingleResource.json */ /** * Sample code: Get an alert rule for single resource. @@ -82,7 +82,7 @@ public static void getAnAlertRuleForSingleResource(com.azure.resourcemanager.mon } /* - * x-ms-original-file: 2024-03-01-preview/getMetricAlertSubscription.json + * x-ms-original-file: 2026-01-01/getMetricAlertSubscription.json */ /** * Sample code: Get an alert rule on subscription. @@ -97,7 +97,7 @@ public static void getAnAlertRuleOnSubscription(com.azure.resourcemanager.monito } /* - * x-ms-original-file: 2024-03-01-preview/getDynamicMetricAlertSingleResource.json + * x-ms-original-file: 2026-01-01/getDynamicMetricAlertSingleResource.json */ /** * Sample code: Get a dynamic alert rule for single resource. @@ -111,7 +111,7 @@ public static void getADynamicAlertRuleForSingleResource(com.azure.resourcemanag } /* - * x-ms-original-file: 2024-03-01-preview/getMetricAlertMultipleResource.json + * x-ms-original-file: 2026-01-01/getMetricAlertMultipleResource.json */ /** * Sample code: Get an alert rule for multiple resources. diff --git a/sdk/monitor/azure-resourcemanager-monitor/src/samples/java/com/azure/resourcemanager/monitor/generated/MetricAlertsListByResourceGroupSamples.java b/sdk/monitor/azure-resourcemanager-monitor/src/samples/java/com/azure/resourcemanager/monitor/generated/MetricAlertsListByResourceGroupSamples.java index 75e6a0eb643d..43b4a1beb040 100644 --- a/sdk/monitor/azure-resourcemanager-monitor/src/samples/java/com/azure/resourcemanager/monitor/generated/MetricAlertsListByResourceGroupSamples.java +++ b/sdk/monitor/azure-resourcemanager-monitor/src/samples/java/com/azure/resourcemanager/monitor/generated/MetricAlertsListByResourceGroupSamples.java @@ -9,7 +9,7 @@ */ public final class MetricAlertsListByResourceGroupSamples { /* - * x-ms-original-file: 2024-03-01-preview/listByResourceGroupMetricAlert.json + * x-ms-original-file: 2026-01-01/listByResourceGroupMetricAlert.json */ /** * Sample code: List metric alert rules. diff --git a/sdk/monitor/azure-resourcemanager-monitor/src/samples/java/com/azure/resourcemanager/monitor/generated/MetricAlertsListSamples.java b/sdk/monitor/azure-resourcemanager-monitor/src/samples/java/com/azure/resourcemanager/monitor/generated/MetricAlertsListSamples.java index 4d5f98c0efaa..6aa204c4fa5a 100644 --- a/sdk/monitor/azure-resourcemanager-monitor/src/samples/java/com/azure/resourcemanager/monitor/generated/MetricAlertsListSamples.java +++ b/sdk/monitor/azure-resourcemanager-monitor/src/samples/java/com/azure/resourcemanager/monitor/generated/MetricAlertsListSamples.java @@ -9,7 +9,7 @@ */ public final class MetricAlertsListSamples { /* - * x-ms-original-file: 2024-03-01-preview/listMetricAlert.json + * x-ms-original-file: 2026-01-01/listMetricAlert.json */ /** * Sample code: List metric alert rules. diff --git a/sdk/monitor/azure-resourcemanager-monitor/src/samples/java/com/azure/resourcemanager/monitor/generated/MetricAlertsStatusListByNameSamples.java b/sdk/monitor/azure-resourcemanager-monitor/src/samples/java/com/azure/resourcemanager/monitor/generated/MetricAlertsStatusListByNameSamples.java index 7bb84cfdbe6d..fbb7295a4dba 100644 --- a/sdk/monitor/azure-resourcemanager-monitor/src/samples/java/com/azure/resourcemanager/monitor/generated/MetricAlertsStatusListByNameSamples.java +++ b/sdk/monitor/azure-resourcemanager-monitor/src/samples/java/com/azure/resourcemanager/monitor/generated/MetricAlertsStatusListByNameSamples.java @@ -9,7 +9,7 @@ */ public final class MetricAlertsStatusListByNameSamples { /* - * x-ms-original-file: 2024-03-01-preview/getMetricAlertStatusByName.json + * x-ms-original-file: 2026-01-01/getMetricAlertStatusByName.json */ /** * Sample code: Get an alert rule status. diff --git a/sdk/monitor/azure-resourcemanager-monitor/src/samples/java/com/azure/resourcemanager/monitor/generated/MetricAlertsStatusListSamples.java b/sdk/monitor/azure-resourcemanager-monitor/src/samples/java/com/azure/resourcemanager/monitor/generated/MetricAlertsStatusListSamples.java index df10e8d16be6..7439373be09a 100644 --- a/sdk/monitor/azure-resourcemanager-monitor/src/samples/java/com/azure/resourcemanager/monitor/generated/MetricAlertsStatusListSamples.java +++ b/sdk/monitor/azure-resourcemanager-monitor/src/samples/java/com/azure/resourcemanager/monitor/generated/MetricAlertsStatusListSamples.java @@ -9,7 +9,7 @@ */ public final class MetricAlertsStatusListSamples { /* - * x-ms-original-file: 2024-03-01-preview/getMetricAlertStatus.json + * x-ms-original-file: 2026-01-01/getMetricAlertStatus.json */ /** * Sample code: Get an alert rule status. diff --git a/sdk/monitor/azure-resourcemanager-monitor/src/samples/java/com/azure/resourcemanager/monitor/generated/MetricAlertsUpdateSamples.java b/sdk/monitor/azure-resourcemanager-monitor/src/samples/java/com/azure/resourcemanager/monitor/generated/MetricAlertsUpdateSamples.java index 0e17238c9cca..33ec464ee0da 100644 --- a/sdk/monitor/azure-resourcemanager-monitor/src/samples/java/com/azure/resourcemanager/monitor/generated/MetricAlertsUpdateSamples.java +++ b/sdk/monitor/azure-resourcemanager-monitor/src/samples/java/com/azure/resourcemanager/monitor/generated/MetricAlertsUpdateSamples.java @@ -20,7 +20,7 @@ */ public final class MetricAlertsUpdateSamples { /* - * x-ms-original-file: 2024-03-01-preview/UpdateMetricAlert.json + * x-ms-original-file: 2026-01-01/UpdateMetricAlert.json */ /** * Sample code: Create or update an alert rule. diff --git a/sdk/monitor/azure-resourcemanager-monitor/src/samples/java/com/azure/resourcemanager/monitor/generated/NspScheduledQueryRuleGetNSPSamples.java b/sdk/monitor/azure-resourcemanager-monitor/src/samples/java/com/azure/resourcemanager/monitor/generated/NspScheduledQueryRuleGetNSPSamples.java new file mode 100644 index 000000000000..5fbe6f459188 --- /dev/null +++ b/sdk/monitor/azure-resourcemanager-monitor/src/samples/java/com/azure/resourcemanager/monitor/generated/NspScheduledQueryRuleGetNSPSamples.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.monitor.generated; + +/** + * Samples for NspScheduledQueryRule GetNSP. + */ +public final class NspScheduledQueryRuleGetNSPSamples { + /* + * x-ms-original-file: 2021-10-01/NSPForScheduledQueryRule_Get.json + */ + /** + * Sample code: Get NSP config by name for Scheduled Query Rule. + * + * @param manager Entry point to MonitorManager. + */ + public static void + getNSPConfigByNameForScheduledQueryRule(com.azure.resourcemanager.monitor.MonitorManager manager) { + manager.serviceClient() + .getNspScheduledQueryRules() + .getNSPWithResponse("exampleRG", "someRule", "somePerimeterConfiguration", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/monitor/azure-resourcemanager-monitor/src/samples/java/com/azure/resourcemanager/monitor/generated/NspScheduledQueryRuleListNSPSamples.java b/sdk/monitor/azure-resourcemanager-monitor/src/samples/java/com/azure/resourcemanager/monitor/generated/NspScheduledQueryRuleListNSPSamples.java new file mode 100644 index 000000000000..06175ffc543a --- /dev/null +++ b/sdk/monitor/azure-resourcemanager-monitor/src/samples/java/com/azure/resourcemanager/monitor/generated/NspScheduledQueryRuleListNSPSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.monitor.generated; + +/** + * Samples for NspScheduledQueryRule ListNSP. + */ +public final class NspScheduledQueryRuleListNSPSamples { + /* + * x-ms-original-file: 2021-10-01/NSPForScheduledQueryRule_List.json + */ + /** + * Sample code: List NSP configs by Scheduled Query Rule. + * + * @param manager Entry point to MonitorManager. + */ + public static void listNSPConfigsByScheduledQueryRule(com.azure.resourcemanager.monitor.MonitorManager manager) { + manager.serviceClient() + .getNspScheduledQueryRules() + .listNSP("exampleRG", "someRule", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/monitor/azure-resourcemanager-monitor/src/samples/java/com/azure/resourcemanager/monitor/generated/NspScheduledQueryRuleReconcileNSPSamples.java b/sdk/monitor/azure-resourcemanager-monitor/src/samples/java/com/azure/resourcemanager/monitor/generated/NspScheduledQueryRuleReconcileNSPSamples.java new file mode 100644 index 000000000000..07130bc8a01c --- /dev/null +++ b/sdk/monitor/azure-resourcemanager-monitor/src/samples/java/com/azure/resourcemanager/monitor/generated/NspScheduledQueryRuleReconcileNSPSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.monitor.generated; + +/** + * Samples for NspScheduledQueryRule ReconcileNSP. + */ +public final class NspScheduledQueryRuleReconcileNSPSamples { + /* + * x-ms-original-file: 2021-10-01/NSPForScheduledQueryRule_Reconcile.json + */ + /** + * Sample code: Reconcile NSP config for Scheduled Query Rule. + * + * @param manager Entry point to MonitorManager. + */ + public static void + reconcileNSPConfigForScheduledQueryRule(com.azure.resourcemanager.monitor.MonitorManager manager) { + manager.serviceClient() + .getNspScheduledQueryRules() + .reconcileNSP("exampleRG", "someRule", "somePerimeterConfiguration", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/monitor/azure-resourcemanager-monitor/src/samples/java/com/azure/resourcemanager/monitor/generated/TenantActionGroupsCreateOrUpdateSamples.java b/sdk/monitor/azure-resourcemanager-monitor/src/samples/java/com/azure/resourcemanager/monitor/generated/TenantActionGroupsCreateOrUpdateSamples.java new file mode 100644 index 000000000000..af04dc798b92 --- /dev/null +++ b/sdk/monitor/azure-resourcemanager-monitor/src/samples/java/com/azure/resourcemanager/monitor/generated/TenantActionGroupsCreateOrUpdateSamples.java @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.monitor.generated; + +import com.azure.resourcemanager.monitor.fluent.models.TenantActionGroupResourceInner; +import com.azure.resourcemanager.monitor.models.AzureAppPushReceiver; +import com.azure.resourcemanager.monitor.models.EmailReceiver; +import com.azure.resourcemanager.monitor.models.SmsReceiver; +import com.azure.resourcemanager.monitor.models.TenantActionGroupWebhookReceiver; +import com.azure.resourcemanager.monitor.models.VoiceReceiver; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for TenantActionGroups CreateOrUpdate. + */ +public final class TenantActionGroupsCreateOrUpdateSamples { + /* + * x-ms-original-file: 2023-05-01-preview/createOrUpdateTenantActionGroup.json + */ + /** + * Sample code: Create or update a tenant action group. + * + * @param manager Entry point to MonitorManager. + */ + public static void createOrUpdateATenantActionGroup(com.azure.resourcemanager.monitor.MonitorManager manager) { + manager.serviceClient() + .getTenantActionGroups() + .createOrUpdateWithResponse("72f988bf-86f1-41af-91ab-2d7cd011db47", "testTenantActionGroup", + "72f988bf-86f1-41af-91ab-2d7cd011db47", + new TenantActionGroupResourceInner().withLocation("Global") + .withTags(mapOf()) + .withGroupShortName("sample") + .withEnabled(true) + .withEmailReceivers(Arrays.asList( + new EmailReceiver().withName("John Doe's email") + .withEmailAddress("johndoe@email.com") + .withUseCommonAlertSchema(false), + new EmailReceiver().withName("Jane Smith's email") + .withEmailAddress("janesmith@email.com") + .withUseCommonAlertSchema(true))) + .withSmsReceivers(Arrays.asList( + new SmsReceiver().withName("John Doe's mobile") + .withCountryCode("fakeTokenPlaceholder") + .withPhoneNumber("2062022299"), + new SmsReceiver().withName("Jane Smith's mobile") + .withCountryCode("fakeTokenPlaceholder") + .withPhoneNumber("0987654321"))) + .withWebhookReceivers(Arrays.asList( + new TenantActionGroupWebhookReceiver().withName("Sample webhook 1") + .withServiceUri("http://www.example.com/webhook1") + .withUseCommonAlertSchema(true), + new TenantActionGroupWebhookReceiver().withName("Sample webhook 2") + .withServiceUri("http://www.example.com/webhook2") + .withUseCommonAlertSchema(true) + .withUseAadAuth(true) + .withObjectId("d3bb868c-fe44-452c-aa26-769a6538c808") + .withIdentifierUri("http://someidentifier/d7811ba3-7996-4a93-99b6-6b2f3f355f8a") + .withTenantId("68a4459a-ccb8-493c-b9da-dd30457d1b84"))) + .withAzureAppPushReceivers(Arrays.asList(new AzureAppPushReceiver().withName("Sample azureAppPush") + .withEmailAddress("johndoe@email.com"))) + .withVoiceReceivers(Arrays.asList(new VoiceReceiver().withName("Sample voice") + .withCountryCode("fakeTokenPlaceholder") + .withPhoneNumber("2062022299"))), + com.azure.core.util.Context.NONE); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/monitor/azure-resourcemanager-monitor/src/samples/java/com/azure/resourcemanager/monitor/generated/TenantActionGroupsDeleteSamples.java b/sdk/monitor/azure-resourcemanager-monitor/src/samples/java/com/azure/resourcemanager/monitor/generated/TenantActionGroupsDeleteSamples.java new file mode 100644 index 000000000000..1d880c3c5860 --- /dev/null +++ b/sdk/monitor/azure-resourcemanager-monitor/src/samples/java/com/azure/resourcemanager/monitor/generated/TenantActionGroupsDeleteSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.monitor.generated; + +/** + * Samples for TenantActionGroups Delete. + */ +public final class TenantActionGroupsDeleteSamples { + /* + * x-ms-original-file: 2023-05-01-preview/deleteTenantActionGroup.json + */ + /** + * Sample code: Delete a tenant action group. + * + * @param manager Entry point to MonitorManager. + */ + public static void deleteATenantActionGroup(com.azure.resourcemanager.monitor.MonitorManager manager) { + manager.serviceClient() + .getTenantActionGroups() + .deleteWithResponse("72f988bf-86f1-41af-91ab-2d7cd011db47", "testTenantActionGroup", + "72f988bf-86f1-41af-91ab-2d7cd011db47", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/monitor/azure-resourcemanager-monitor/src/samples/java/com/azure/resourcemanager/monitor/generated/TenantActionGroupsGetSamples.java b/sdk/monitor/azure-resourcemanager-monitor/src/samples/java/com/azure/resourcemanager/monitor/generated/TenantActionGroupsGetSamples.java new file mode 100644 index 000000000000..03ecb6e31672 --- /dev/null +++ b/sdk/monitor/azure-resourcemanager-monitor/src/samples/java/com/azure/resourcemanager/monitor/generated/TenantActionGroupsGetSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.monitor.generated; + +/** + * Samples for TenantActionGroups Get. + */ +public final class TenantActionGroupsGetSamples { + /* + * x-ms-original-file: 2023-05-01-preview/getTenantActionGroup.json + */ + /** + * Sample code: Get an action group. + * + * @param manager Entry point to MonitorManager. + */ + public static void getAnActionGroup(com.azure.resourcemanager.monitor.MonitorManager manager) { + manager.serviceClient() + .getTenantActionGroups() + .getWithResponse("72f988bf-86f1-41af-91ab-2d7cd011db47", "testTenantActionGroup", + "72f988bf-86f1-41af-91ab-2d7cd011db47", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/monitor/azure-resourcemanager-monitor/src/samples/java/com/azure/resourcemanager/monitor/generated/TenantActionGroupsListByManagementGroupIdSamples.java b/sdk/monitor/azure-resourcemanager-monitor/src/samples/java/com/azure/resourcemanager/monitor/generated/TenantActionGroupsListByManagementGroupIdSamples.java new file mode 100644 index 000000000000..f9d8bbdc82c2 --- /dev/null +++ b/sdk/monitor/azure-resourcemanager-monitor/src/samples/java/com/azure/resourcemanager/monitor/generated/TenantActionGroupsListByManagementGroupIdSamples.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.monitor.generated; + +/** + * Samples for TenantActionGroups ListByManagementGroupId. + */ +public final class TenantActionGroupsListByManagementGroupIdSamples { + /* + * x-ms-original-file: 2023-05-01-preview/listTenantActionGroups.json + */ + /** + * Sample code: List tenant action groups at management group level. + * + * @param manager Entry point to MonitorManager. + */ + public static void + listTenantActionGroupsAtManagementGroupLevel(com.azure.resourcemanager.monitor.MonitorManager manager) { + manager.serviceClient() + .getTenantActionGroups() + .listByManagementGroupId("72f988bf-86f1-41af-91ab-2d7cd011db47", "72f988bf-86f1-41af-91ab-2d7cd011db47", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/monitor/azure-resourcemanager-monitor/src/samples/java/com/azure/resourcemanager/monitor/generated/TenantActionGroupsUpdateSamples.java b/sdk/monitor/azure-resourcemanager-monitor/src/samples/java/com/azure/resourcemanager/monitor/generated/TenantActionGroupsUpdateSamples.java new file mode 100644 index 000000000000..0af4ef1b0ec1 --- /dev/null +++ b/sdk/monitor/azure-resourcemanager-monitor/src/samples/java/com/azure/resourcemanager/monitor/generated/TenantActionGroupsUpdateSamples.java @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.monitor.generated; + +import com.azure.resourcemanager.monitor.models.TenantActionGroupPatchBody; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for TenantActionGroups Update. + */ +public final class TenantActionGroupsUpdateSamples { + /* + * x-ms-original-file: 2023-05-01-preview/patchTenantActionGroup.json + */ + /** + * Sample code: Patch a tenant action group. + * + * @param manager Entry point to MonitorManager. + */ + public static void patchATenantActionGroup(com.azure.resourcemanager.monitor.MonitorManager manager) { + manager.serviceClient() + .getTenantActionGroups() + .updateWithResponse("72f988bf-86f1-41af-91ab-2d7cd011db47", "testTenantActionGroup", + "72f988bf-86f1-41af-91ab-2d7cd011db47", + new TenantActionGroupPatchBody() + .withTags(mapOf("key1", "fakeTokenPlaceholder", "key2", "fakeTokenPlaceholder")) + .withEnabled(false), + com.azure.core.util.Context.NONE); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/monitor/azure-resourcemanager-monitor/src/samples/java/com/azure/resourcemanager/monitor/generated/VMInsightsGetOnboardingStatusSamples.java b/sdk/monitor/azure-resourcemanager-monitor/src/samples/java/com/azure/resourcemanager/monitor/generated/VMInsightsGetOnboardingStatusSamples.java new file mode 100644 index 000000000000..eb9b7a1af580 --- /dev/null +++ b/sdk/monitor/azure-resourcemanager-monitor/src/samples/java/com/azure/resourcemanager/monitor/generated/VMInsightsGetOnboardingStatusSamples.java @@ -0,0 +1,94 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.monitor.generated; + +/** + * Samples for VMInsights GetOnboardingStatus. + */ +public final class VMInsightsGetOnboardingStatusSamples { + /* + * x-ms-original-file: 2018-11-27-preview/getOnboardingStatusResourceGroup.json + */ + /** + * Sample code: Get status for a resource group that has at least one VM that is actively reporting data. + * + * @param manager Entry point to MonitorManager. + */ + public static void getStatusForAResourceGroupThatHasAtLeastOneVMThatIsActivelyReportingData( + com.azure.resourcemanager.monitor.MonitorManager manager) { + manager.serviceClient() + .getVMInsights() + .getOnboardingStatusWithResponse( + "subscriptions/3d51de47-8d1c-4d24-b42f-bcae075dfa87/resourceGroups/resource-group-with-vms", + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2018-11-27-preview/getOnboardingStatusSingleVMUnknown.json + */ + /** + * Sample code: Get status for a VM that has not yet reported data. + * + * @param manager Entry point to MonitorManager. + */ + public static void + getStatusForAVMThatHasNotYetReportedData(com.azure.resourcemanager.monitor.MonitorManager manager) { + manager.serviceClient() + .getVMInsights() + .getOnboardingStatusWithResponse( + "subscriptions/3d51de47-8d1c-4d24-b42f-bcae075dfa87/resourceGroups/vm-resource-group/providers/Microsoft.Compute/virtualMachines/ubuntu-vm", + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2018-11-27-preview/getOnboardingStatusSingleVM.json + */ + /** + * Sample code: Get status for a VM that is actively reporting data. + * + * @param manager Entry point to MonitorManager. + */ + public static void + getStatusForAVMThatIsActivelyReportingData(com.azure.resourcemanager.monitor.MonitorManager manager) { + manager.serviceClient() + .getVMInsights() + .getOnboardingStatusWithResponse( + "subscriptions/3d51de47-8d1c-4d24-b42f-bcae075dfa87/resourceGroups/vm-resource-group/providers/Microsoft.Compute/virtualMachines/ubuntu-vm", + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2018-11-27-preview/getOnboardingStatusSubscription.json + */ + /** + * Sample code: Get status for a subscription that has at least one VM that is actively reporting data. + * + * @param manager Entry point to MonitorManager. + */ + public static void getStatusForASubscriptionThatHasAtLeastOneVMThatIsActivelyReportingData( + com.azure.resourcemanager.monitor.MonitorManager manager) { + manager.serviceClient() + .getVMInsights() + .getOnboardingStatusWithResponse("subscriptions/3d51de47-8d1c-4d24-b42f-bcae075dfa87", + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2018-11-27-preview/getOnboardingStatusVMScaleSet.json + */ + /** + * Sample code: Get status for a VM scale set that is actively reporting data. + * + * @param manager Entry point to MonitorManager. + */ + public static void + getStatusForAVMScaleSetThatIsActivelyReportingData(com.azure.resourcemanager.monitor.MonitorManager manager) { + manager.serviceClient() + .getVMInsights() + .getOnboardingStatusWithResponse( + "subscriptions/3d51de47-8d1c-4d24-b42f-bcae075dfa87/resourceGroups/my-service-cluster/providers/Microsoft.Compute/virtualMachineScaleSets/scale-set-01", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/monitor/azure-resourcemanager-monitor/src/test/java/com/azure/resourcemanager/monitor/DiagnosticSettingsTests.java b/sdk/monitor/azure-resourcemanager-monitor/src/test/java/com/azure/resourcemanager/monitor/DiagnosticSettingsTests.java index db4d34979b80..9943bd94267e 100644 --- a/sdk/monitor/azure-resourcemanager-monitor/src/test/java/com/azure/resourcemanager/monitor/DiagnosticSettingsTests.java +++ b/sdk/monitor/azure-resourcemanager-monitor/src/test/java/com/azure/resourcemanager/monitor/DiagnosticSettingsTests.java @@ -269,7 +269,7 @@ public void canCRUDDiagnosticSettingsForVault() { DiagnosticSettingsResourceInner inner = setting.innerModel(); inner.withLogs(new ArrayList<>()).logs().add(new LogSettings().withEnabled(true).withCategoryGroup("audit")); - monitorManager.alertRuleClient() + monitorManager.serviceClient() .getDiagnosticSettingsOperations() .createOrUpdate(vault.id(), setting.name(), inner); @@ -343,7 +343,7 @@ public void canCRUDDiagnosticSettingsLogsCategoryGroup() { .add(new LogSettings().withCategoryGroup("audit") .withEnabled(true) .withRetentionPolicy(new RetentionPolicy().withEnabled(false))); - monitorManager.alertRuleClient() + monitorManager.serviceClient() .getDiagnosticSettingsOperations() .createOrUpdate(wpsResource.id(), dsName, inner); diff --git a/sdk/monitor/azure-resourcemanager-monitor/tsp-location.yaml b/sdk/monitor/azure-resourcemanager-monitor/tsp-location.yaml new file mode 100644 index 000000000000..d2e9c55efad1 --- /dev/null +++ b/sdk/monitor/azure-resourcemanager-monitor/tsp-location.yaml @@ -0,0 +1,6 @@ +directory: specification/monitor/resource-manager/Microsoft.Insights/Insights +commit: 6b3cd2b94299c3aaa579ca90218368bd45f3e1e0 +repo: Azure/azure-rest-api-specs +additionalDirectories: + +emitterPackageJsonPath: eng\emitter-package.json \ No newline at end of file