diff --git a/sdk/policyinsights/azure-resourcemanager-policyinsights/CHANGELOG.md b/sdk/policyinsights/azure-resourcemanager-policyinsights/CHANGELOG.md index 6a2aea56a3f7d..851b743512e89 100644 --- a/sdk/policyinsights/azure-resourcemanager-policyinsights/CHANGELOG.md +++ b/sdk/policyinsights/azure-resourcemanager-policyinsights/CHANGELOG.md @@ -1,6 +1,8 @@ # Release History -## 1.0.0-beta.3 (Unreleased) +## 1.0.0-beta.1 (2022-02-23) + +- Azure Resource Manager PolicyInsights client library for Java. This package contains Microsoft Azure SDK for PolicyInsights Management SDK. Package tag package-2021-10. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ### Features Added diff --git a/sdk/policyinsights/azure-resourcemanager-policyinsights/README.md b/sdk/policyinsights/azure-resourcemanager-policyinsights/README.md index ca1dcf8493461..7d24755f14249 100644 --- a/sdk/policyinsights/azure-resourcemanager-policyinsights/README.md +++ b/sdk/policyinsights/azure-resourcemanager-policyinsights/README.md @@ -32,7 +32,7 @@ Various documentation is available to help you get started com.azure.resourcemanager azure-resourcemanager-policyinsights - 1.0.0-beta.2 + 1.0.0-beta.3 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/policyinsights/azure-resourcemanager-policyinsights/SAMPLE.md b/sdk/policyinsights/azure-resourcemanager-policyinsights/SAMPLE.md index 5592e4996b65d..16a89ec32251d 100644 --- a/sdk/policyinsights/azure-resourcemanager-policyinsights/SAMPLE.md +++ b/sdk/policyinsights/azure-resourcemanager-policyinsights/SAMPLE.md @@ -554,6 +554,7 @@ public final class OperationsListSamples { ```java import com.azure.core.util.Context; +import com.azure.resourcemanager.policyinsights.models.PolicyEventsResourceType; /** Samples for PolicyEvents ListQueryResultsForManagementGroup. */ public final class PolicyEventsListQueryResultsForManagementGroupSamples { @@ -570,7 +571,17 @@ public final class PolicyEventsListQueryResultsForManagementGroupSamples { manager .policyEvents() .listQueryResultsForManagementGroup( - "myManagementGroup", null, null, null, null, null, null, null, "WpmWfBSvPhkAK6QD", Context.NONE); + PolicyEventsResourceType.DEFAULT, + "myManagementGroup", + null, + null, + null, + null, + null, + null, + null, + "WpmWfBSvPhkAK6QD", + Context.NONE); } /* @@ -586,7 +597,17 @@ public final class PolicyEventsListQueryResultsForManagementGroupSamples { manager .policyEvents() .listQueryResultsForManagementGroup( - "myManagementGroup", null, null, null, null, null, null, null, null, Context.NONE); + PolicyEventsResourceType.DEFAULT, + "myManagementGroup", + null, + null, + null, + null, + null, + null, + null, + null, + Context.NONE); } } ``` @@ -595,6 +616,7 @@ public final class PolicyEventsListQueryResultsForManagementGroupSamples { ```java import com.azure.core.util.Context; +import com.azure.resourcemanager.policyinsights.models.PolicyEventsResourceType; /** Samples for PolicyEvents ListQueryResultsForPolicyDefinition. */ public final class PolicyEventsListQueryResultsForPolicyDefinitionSamples { @@ -611,6 +633,7 @@ public final class PolicyEventsListQueryResultsForPolicyDefinitionSamples { manager .policyEvents() .listQueryResultsForPolicyDefinition( + PolicyEventsResourceType.DEFAULT, "fffedd8f-ffff-fffd-fffd-fffed2f84852", "24813039-7534-408a-9842-eb99f45721b1", null, @@ -637,6 +660,7 @@ public final class PolicyEventsListQueryResultsForPolicyDefinitionSamples { manager .policyEvents() .listQueryResultsForPolicyDefinition( + PolicyEventsResourceType.DEFAULT, "fffedd8f-ffff-fffd-fffd-fffed2f84852", "24813039-7534-408a-9842-eb99f45721b1", null, @@ -656,6 +680,7 @@ public final class PolicyEventsListQueryResultsForPolicyDefinitionSamples { ```java import com.azure.core.util.Context; +import com.azure.resourcemanager.policyinsights.models.PolicyEventsResourceType; /** Samples for PolicyEvents ListQueryResultsForPolicySetDefinition. */ public final class PolicyEventsListQueryResultsForPolicySetDefinitionSamples { @@ -672,6 +697,7 @@ public final class PolicyEventsListQueryResultsForPolicySetDefinitionSamples { manager .policyEvents() .listQueryResultsForPolicySetDefinition( + PolicyEventsResourceType.DEFAULT, "fffedd8f-ffff-fffd-fffd-fffed2f84852", "3e3807c1-65c9-49e0-a406-82d8ae3e338c", null, @@ -698,6 +724,7 @@ public final class PolicyEventsListQueryResultsForPolicySetDefinitionSamples { manager .policyEvents() .listQueryResultsForPolicySetDefinition( + PolicyEventsResourceType.DEFAULT, "fffedd8f-ffff-fffd-fffd-fffed2f84852", "3e3807c1-65c9-49e0-a406-82d8ae3e338c", null, @@ -717,6 +744,7 @@ public final class PolicyEventsListQueryResultsForPolicySetDefinitionSamples { ```java import com.azure.core.util.Context; +import com.azure.resourcemanager.policyinsights.models.PolicyEventsResourceType; /** Samples for PolicyEvents ListQueryResultsForResource. */ public final class PolicyEventsListQueryResultsForResourceSamples { @@ -733,6 +761,7 @@ public final class PolicyEventsListQueryResultsForResourceSamples { manager .policyEvents() .listQueryResultsForResource( + PolicyEventsResourceType.DEFAULT, "subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResourceName", null, null, @@ -759,6 +788,7 @@ public final class PolicyEventsListQueryResultsForResourceSamples { manager .policyEvents() .listQueryResultsForResource( + PolicyEventsResourceType.DEFAULT, "subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.ServiceFabric/clusters/myCluster/applications/myApplication", null, null, @@ -785,6 +815,7 @@ public final class PolicyEventsListQueryResultsForResourceSamples { manager .policyEvents() .listQueryResultsForResource( + PolicyEventsResourceType.DEFAULT, "subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResource/someNestedResourceType/someNestedResource", null, null, @@ -810,6 +841,7 @@ public final class PolicyEventsListQueryResultsForResourceSamples { manager .policyEvents() .listQueryResultsForResource( + PolicyEventsResourceType.DEFAULT, "subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.ClassicCompute/domainNames/myDomainName", null, null, @@ -836,6 +868,7 @@ public final class PolicyEventsListQueryResultsForResourceSamples { manager .policyEvents() .listQueryResultsForResource( + PolicyEventsResourceType.DEFAULT, "subscriptions/e78961ba-36fe-4739-9212-e3031b4c8db7/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/Vaults/myKVName", null, null, @@ -865,6 +898,7 @@ public final class PolicyEventsListQueryResultsForResourceSamples { manager .policyEvents() .listQueryResultsForResource( + PolicyEventsResourceType.DEFAULT, "subscriptions/e78961ba-36fe-4739-9212-e3031b4c8db7/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/Vaults/myKVName", null, null, @@ -893,6 +927,7 @@ public final class PolicyEventsListQueryResultsForResourceSamples { manager .policyEvents() .listQueryResultsForResource( + PolicyEventsResourceType.DEFAULT, "subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.ClassicCompute/domainNames/myDomainName", null, null, @@ -912,6 +947,7 @@ public final class PolicyEventsListQueryResultsForResourceSamples { ```java import com.azure.core.util.Context; +import com.azure.resourcemanager.policyinsights.models.PolicyEventsResourceType; /** Samples for PolicyEvents ListQueryResultsForResourceGroup. */ public final class PolicyEventsListQueryResultsForResourceGroupSamples { @@ -928,6 +964,7 @@ public final class PolicyEventsListQueryResultsForResourceGroupSamples { manager .policyEvents() .listQueryResultsForResourceGroup( + PolicyEventsResourceType.DEFAULT, "fffedd8f-ffff-fffd-fffd-fffed2f84852", "myResourceGroup", null, @@ -954,6 +991,7 @@ public final class PolicyEventsListQueryResultsForResourceGroupSamples { manager .policyEvents() .listQueryResultsForResourceGroup( + PolicyEventsResourceType.DEFAULT, "fffedd8f-ffff-fffd-fffd-fffed2f84852", "myResourceGroup", null, @@ -973,6 +1011,7 @@ public final class PolicyEventsListQueryResultsForResourceGroupSamples { ```java import com.azure.core.util.Context; +import com.azure.resourcemanager.policyinsights.models.PolicyEventsResourceType; /** Samples for PolicyEvents ListQueryResultsForResourceGroupLevelPolicyAssignment. */ public final class PolicyEventsListQueryResultsForResourceGroupLevelPolicyAssignmentSamples { @@ -989,6 +1028,7 @@ public final class PolicyEventsListQueryResultsForResourceGroupLevelPolicyAssign manager .policyEvents() .listQueryResultsForResourceGroupLevelPolicyAssignment( + PolicyEventsResourceType.DEFAULT, "fffedd8f-ffff-fffd-fffd-fffed2f84852", "myResourceGroup", "myPolicyAssignment", @@ -1016,6 +1056,7 @@ public final class PolicyEventsListQueryResultsForResourceGroupLevelPolicyAssign manager .policyEvents() .listQueryResultsForResourceGroupLevelPolicyAssignment( + PolicyEventsResourceType.DEFAULT, "fffedd8f-ffff-fffd-fffd-fffed2f84852", "myResourceGroup", "myPolicyAssignment", @@ -1036,6 +1077,7 @@ public final class PolicyEventsListQueryResultsForResourceGroupLevelPolicyAssign ```java import com.azure.core.util.Context; +import com.azure.resourcemanager.policyinsights.models.PolicyEventsResourceType; import java.time.OffsetDateTime; /** Samples for PolicyEvents ListQueryResultsForSubscription. */ @@ -1053,6 +1095,7 @@ public final class PolicyEventsListQueryResultsForSubscriptionSamples { manager .policyEvents() .listQueryResultsForSubscription( + PolicyEventsResourceType.DEFAULT, "fffedd8f-ffff-fffd-fffd-fffed2f84852", 2, "Timestamp desc, PolicyAssignmentId asc, SubscriptionId asc, ResourceGroup asc, ResourceId", @@ -1077,6 +1120,7 @@ public final class PolicyEventsListQueryResultsForSubscriptionSamples { manager .policyEvents() .listQueryResultsForSubscription( + PolicyEventsResourceType.DEFAULT, "fffedd8f-ffff-fffd-fffd-fffed2f84852", null, null, @@ -1102,6 +1146,7 @@ public final class PolicyEventsListQueryResultsForSubscriptionSamples { manager .policyEvents() .listQueryResultsForSubscription( + PolicyEventsResourceType.DEFAULT, "fffedd8f-ffff-fffd-fffd-fffed2f84852", 2, null, @@ -1127,6 +1172,7 @@ public final class PolicyEventsListQueryResultsForSubscriptionSamples { manager .policyEvents() .listQueryResultsForSubscription( + PolicyEventsResourceType.DEFAULT, "fffedd8f-ffff-fffd-fffd-fffed2f84852", null, null, @@ -1151,6 +1197,7 @@ public final class PolicyEventsListQueryResultsForSubscriptionSamples { manager .policyEvents() .listQueryResultsForSubscription( + PolicyEventsResourceType.DEFAULT, "fffedd8f-ffff-fffd-fffd-fffed2f84852", 10, "NumDeniedResources desc", @@ -1177,6 +1224,7 @@ public final class PolicyEventsListQueryResultsForSubscriptionSamples { manager .policyEvents() .listQueryResultsForSubscription( + PolicyEventsResourceType.DEFAULT, "fffedd8f-ffff-fffd-fffd-fffed2f84852", 2, null, @@ -1203,7 +1251,17 @@ public final class PolicyEventsListQueryResultsForSubscriptionSamples { manager .policyEvents() .listQueryResultsForSubscription( - "fffedd8f-ffff-fffd-fffd-fffed2f84852", null, null, null, null, null, null, null, null, Context.NONE); + PolicyEventsResourceType.DEFAULT, + "fffedd8f-ffff-fffd-fffd-fffed2f84852", + null, + null, + null, + null, + null, + null, + null, + null, + Context.NONE); } } ``` @@ -1212,6 +1270,7 @@ public final class PolicyEventsListQueryResultsForSubscriptionSamples { ```java import com.azure.core.util.Context; +import com.azure.resourcemanager.policyinsights.models.PolicyEventsResourceType; /** Samples for PolicyEvents ListQueryResultsForSubscriptionLevelPolicyAssignment. */ public final class PolicyEventsListQueryResultsForSubscriptionLevelPolicyAssignmentSamples { @@ -1228,6 +1287,7 @@ public final class PolicyEventsListQueryResultsForSubscriptionLevelPolicyAssignm manager .policyEvents() .listQueryResultsForSubscriptionLevelPolicyAssignment( + PolicyEventsResourceType.DEFAULT, "fffedd8f-ffff-fffd-fffd-fffed2f84852", "ec8f9645-8ecb-4abb-9c0b-5292f19d4003", null, @@ -1254,6 +1314,7 @@ public final class PolicyEventsListQueryResultsForSubscriptionLevelPolicyAssignm manager .policyEvents() .listQueryResultsForSubscriptionLevelPolicyAssignment( + PolicyEventsResourceType.DEFAULT, "fffedd8f-ffff-fffd-fffd-fffed2f84852", "ec8f9645-8ecb-4abb-9c0b-5292f19d4003", null, @@ -2243,6 +2304,7 @@ public final class PolicyStatesListQueryResultsForSubscriptionLevelPolicyAssignm ```java import com.azure.core.util.Context; +import com.azure.resourcemanager.policyinsights.models.PolicyStatesSummaryResourceType; import java.time.OffsetDateTime; /** Samples for PolicyStates SummarizeForManagementGroup. */ @@ -2260,6 +2322,7 @@ public final class PolicyStatesSummarizeForManagementGroupSamples { manager .policyStates() .summarizeForManagementGroupWithResponse( + PolicyStatesSummaryResourceType.LATEST, "myManagementGroup", 0, OffsetDateTime.parse("2019-10-05T18:00:00Z"), @@ -2274,6 +2337,7 @@ public final class PolicyStatesSummarizeForManagementGroupSamples { ```java import com.azure.core.util.Context; +import com.azure.resourcemanager.policyinsights.models.PolicyStatesSummaryResourceType; /** Samples for PolicyStates SummarizeForPolicyDefinition. */ public final class PolicyStatesSummarizeForPolicyDefinitionSamples { @@ -2290,6 +2354,7 @@ public final class PolicyStatesSummarizeForPolicyDefinitionSamples { manager .policyStates() .summarizeForPolicyDefinitionWithResponse( + PolicyStatesSummaryResourceType.LATEST, "fffedd8f-ffff-fffd-fffd-fffed2f84852", "24813039-7534-408a-9842-eb99f45721b1", null, @@ -2305,6 +2370,7 @@ public final class PolicyStatesSummarizeForPolicyDefinitionSamples { ```java import com.azure.core.util.Context; +import com.azure.resourcemanager.policyinsights.models.PolicyStatesSummaryResourceType; import java.time.OffsetDateTime; /** Samples for PolicyStates SummarizeForPolicySetDefinition. */ @@ -2322,6 +2388,7 @@ public final class PolicyStatesSummarizeForPolicySetDefinitionSamples { manager .policyStates() .summarizeForPolicySetDefinitionWithResponse( + PolicyStatesSummaryResourceType.LATEST, "fffedd8f-ffff-fffd-fffd-fffed2f84852", "3e3807c1-65c9-49e0-a406-82d8ae3e338c", 1, @@ -2337,6 +2404,7 @@ public final class PolicyStatesSummarizeForPolicySetDefinitionSamples { ```java import com.azure.core.util.Context; +import com.azure.resourcemanager.policyinsights.models.PolicyStatesSummaryResourceType; /** Samples for PolicyStates SummarizeForResource. */ public final class PolicyStatesSummarizeForResourceSamples { @@ -2353,6 +2421,7 @@ public final class PolicyStatesSummarizeForResourceSamples { manager .policyStates() .summarizeForResourceWithResponse( + PolicyStatesSummaryResourceType.LATEST, "subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault", 2, null, @@ -2367,6 +2436,7 @@ public final class PolicyStatesSummarizeForResourceSamples { ```java import com.azure.core.util.Context; +import com.azure.resourcemanager.policyinsights.models.PolicyStatesSummaryResourceType; /** Samples for PolicyStates SummarizeForResourceGroup. */ public final class PolicyStatesSummarizeForResourceGroupSamples { @@ -2383,7 +2453,14 @@ public final class PolicyStatesSummarizeForResourceGroupSamples { manager .policyStates() .summarizeForResourceGroupWithResponse( - "fffedd8f-ffff-fffd-fffd-fffed2f84852", "myResourceGroup", null, null, null, null, Context.NONE); + PolicyStatesSummaryResourceType.LATEST, + "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "myResourceGroup", + null, + null, + null, + null, + Context.NONE); } } ``` @@ -2392,6 +2469,7 @@ public final class PolicyStatesSummarizeForResourceGroupSamples { ```java import com.azure.core.util.Context; +import com.azure.resourcemanager.policyinsights.models.PolicyStatesSummaryResourceType; /** Samples for PolicyStates SummarizeForResourceGroupLevelPolicyAssignment. */ public final class PolicyStatesSummarizeForResourceGroupLevelPolicyAssignmentSamples { @@ -2408,6 +2486,7 @@ public final class PolicyStatesSummarizeForResourceGroupLevelPolicyAssignmentSam manager .policyStates() .summarizeForResourceGroupLevelPolicyAssignmentWithResponse( + PolicyStatesSummaryResourceType.LATEST, "fffedd8f-ffff-fffd-fffd-fffed2f84852", "myResourceGroup", "b7a1ca2596524e3ab19597f2", @@ -2424,6 +2503,7 @@ public final class PolicyStatesSummarizeForResourceGroupLevelPolicyAssignmentSam ```java import com.azure.core.util.Context; +import com.azure.resourcemanager.policyinsights.models.PolicyStatesSummaryResourceType; /** Samples for PolicyStates SummarizeForSubscription. */ public final class PolicyStatesSummarizeForSubscriptionSamples { @@ -2440,6 +2520,7 @@ public final class PolicyStatesSummarizeForSubscriptionSamples { manager .policyStates() .summarizeForSubscriptionWithResponse( + PolicyStatesSummaryResourceType.LATEST, "fffedd8f-ffff-fffd-fffd-fffed2f84852", 1, null, @@ -2461,7 +2542,13 @@ public final class PolicyStatesSummarizeForSubscriptionSamples { manager .policyStates() .summarizeForSubscriptionWithResponse( - "fffedd8f-ffff-fffd-fffd-fffed2f84852", 5, null, null, null, Context.NONE); + PolicyStatesSummaryResourceType.LATEST, + "fffedd8f-ffff-fffd-fffd-fffed2f84852", + 5, + null, + null, + null, + Context.NONE); } } ``` @@ -2470,6 +2557,7 @@ public final class PolicyStatesSummarizeForSubscriptionSamples { ```java import com.azure.core.util.Context; +import com.azure.resourcemanager.policyinsights.models.PolicyStatesSummaryResourceType; /** Samples for PolicyStates SummarizeForSubscriptionLevelPolicyAssignment. */ public final class PolicyStatesSummarizeForSubscriptionLevelPolicyAssignmentSamples { @@ -2486,6 +2574,7 @@ public final class PolicyStatesSummarizeForSubscriptionLevelPolicyAssignmentSamp manager .policyStates() .summarizeForSubscriptionLevelPolicyAssignmentWithResponse( + PolicyStatesSummaryResourceType.LATEST, "fffedd8f-ffff-fffd-fffd-fffed2f84852", "ec8f9645-8ecb-4abb-9c0b-5292f19d4003", null, @@ -2547,6 +2636,7 @@ public final class PolicyStatesTriggerSubscriptionEvaluationSamples { ```java import com.azure.core.util.Context; +import com.azure.resourcemanager.policyinsights.models.PolicyTrackedResourcesResourceType; /** Samples for PolicyTrackedResources ListQueryResultsForManagementGroup. */ public final class PolicyTrackedResourcesListQueryResultsForManagementGroupSamples { @@ -2564,6 +2654,7 @@ public final class PolicyTrackedResourcesListQueryResultsForManagementGroupSampl .policyTrackedResources() .listQueryResultsForManagementGroup( "myManagementGroup", + PolicyTrackedResourcesResourceType.DEFAULT, 1, "PolicyAssignmentId eq" + " '/subscriptions/fff8dfdb-fff3-fff0-fff4-fffdcbe6b2ef/resourceGroups/myResourceGroup/providers/Microsoft.Authorization/policyAssignments/myPolicyAssignment'" @@ -2584,7 +2675,8 @@ public final class PolicyTrackedResourcesListQueryResultsForManagementGroupSampl com.azure.resourcemanager.policyinsights.PolicyInsightsManager manager) { manager .policyTrackedResources() - .listQueryResultsForManagementGroup("myManagementGroup", null, null, Context.NONE); + .listQueryResultsForManagementGroup( + "myManagementGroup", PolicyTrackedResourcesResourceType.DEFAULT, null, null, Context.NONE); } } ``` @@ -2593,6 +2685,7 @@ public final class PolicyTrackedResourcesListQueryResultsForManagementGroupSampl ```java import com.azure.core.util.Context; +import com.azure.resourcemanager.policyinsights.models.PolicyTrackedResourcesResourceType; /** Samples for PolicyTrackedResources ListQueryResultsForResource. */ public final class PolicyTrackedResourcesListQueryResultsForResourceSamples { @@ -2610,6 +2703,7 @@ public final class PolicyTrackedResourcesListQueryResultsForResourceSamples { .policyTrackedResources() .listQueryResultsForResource( "subscriptions/fff8dfdb-fff3-fff0-fff4-fffdcbe6b2ef/resourceGroups/myResourceGroup/providers/Microsoft.Example/exampleResourceType/myResource", + PolicyTrackedResourcesResourceType.DEFAULT, 1, "PolicyAssignmentId eq" + " '/subscriptions/fff8dfdb-fff3-fff0-fff4-fffdcbe6b2ef/resourceGroups/myResourceGroup/providers/Microsoft.Authorization/policyAssignments/myPolicyAssignment'" @@ -2631,6 +2725,7 @@ public final class PolicyTrackedResourcesListQueryResultsForResourceSamples { .policyTrackedResources() .listQueryResultsForResource( "subscriptions/fff8dfdb-fff3-fff0-fff4-fffdcbe6b2ef/resourceGroups/myResourceGroup/providers/Microsoft.Example/exampleResourceType/myResource", + PolicyTrackedResourcesResourceType.DEFAULT, null, null, Context.NONE); @@ -2642,6 +2737,7 @@ public final class PolicyTrackedResourcesListQueryResultsForResourceSamples { ```java import com.azure.core.util.Context; +import com.azure.resourcemanager.policyinsights.models.PolicyTrackedResourcesResourceType; /** Samples for PolicyTrackedResources ListQueryResultsForResourceGroup. */ public final class PolicyTrackedResourcesListQueryResultsForResourceGroupSamples { @@ -2659,6 +2755,7 @@ public final class PolicyTrackedResourcesListQueryResultsForResourceGroupSamples .policyTrackedResources() .listQueryResultsForResourceGroup( "myResourceGroup", + PolicyTrackedResourcesResourceType.DEFAULT, 1, "PolicyAssignmentId eq" + " '/subscriptions/fff8dfdb-fff3-fff0-fff4-fffdcbe6b2ef/resourceGroups/myResourceGroup/providers/Microsoft.Authorization/policyAssignments/myPolicyAssignment'" @@ -2677,7 +2774,10 @@ public final class PolicyTrackedResourcesListQueryResultsForResourceGroupSamples */ public static void queryAtResourceGroupScope( com.azure.resourcemanager.policyinsights.PolicyInsightsManager manager) { - manager.policyTrackedResources().listQueryResultsForResourceGroup("myResourceGroup", null, null, Context.NONE); + manager + .policyTrackedResources() + .listQueryResultsForResourceGroup( + "myResourceGroup", PolicyTrackedResourcesResourceType.DEFAULT, null, null, Context.NONE); } } ``` @@ -2686,6 +2786,7 @@ public final class PolicyTrackedResourcesListQueryResultsForResourceGroupSamples ```java import com.azure.core.util.Context; +import com.azure.resourcemanager.policyinsights.models.PolicyTrackedResourcesResourceType; /** Samples for PolicyTrackedResources ListQueryResultsForSubscription. */ public final class PolicyTrackedResourcesListQueryResultsForSubscriptionSamples { @@ -2702,6 +2803,7 @@ public final class PolicyTrackedResourcesListQueryResultsForSubscriptionSamples manager .policyTrackedResources() .listQueryResultsForSubscription( + PolicyTrackedResourcesResourceType.DEFAULT, 1, "PolicyAssignmentId eq" + " '/subscriptions/fff8dfdb-fff3-fff0-fff4-fffdcbe6b2ef/resourceGroups/myResourceGroup/providers/Microsoft.Authorization/policyAssignments/myPolicyAssignment'" @@ -2720,7 +2822,9 @@ public final class PolicyTrackedResourcesListQueryResultsForSubscriptionSamples */ public static void queryAtSubscriptionScope( com.azure.resourcemanager.policyinsights.PolicyInsightsManager manager) { - manager.policyTrackedResources().listQueryResultsForSubscription(null, null, Context.NONE); + manager + .policyTrackedResources() + .listQueryResultsForSubscription(PolicyTrackedResourcesResourceType.DEFAULT, null, null, Context.NONE); } } ``` diff --git a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/PolicyInsightsManager.java b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/PolicyInsightsManager.java index 1188782411440..8773a9b8a70b8 100644 --- a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/PolicyInsightsManager.java +++ b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/PolicyInsightsManager.java @@ -200,7 +200,7 @@ public PolicyInsightsManager authenticate(TokenCredential credential, AzureProfi .append("-") .append("com.azure.resourcemanager.policyinsights") .append("/") - .append("1.0.0-beta.2"); + .append("1.0.0-beta.1"); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { userAgentBuilder .append(" (") diff --git a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/AttestationsClient.java b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/AttestationsClient.java index 27762cb0732b6..2d8e3958436d9 100644 --- a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/AttestationsClient.java +++ b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/AttestationsClient.java @@ -20,7 +20,7 @@ public interface AttestationsClient { * * @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 all attestations for the subscription. + * @return all attestations for the subscription as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); @@ -34,7 +34,7 @@ public interface AttestationsClient { * @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 all attestations for the subscription. + * @return all attestations for the subscription as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Integer top, String filter, Context context); @@ -47,7 +47,7 @@ public interface AttestationsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an attestation resource. + * @return the {@link SyncPoller} for polling of an attestation resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, AttestationInner> beginCreateOrUpdateAtSubscription( @@ -62,7 +62,7 @@ SyncPoller, AttestationInner> beginCreateOrUpdateAt * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an attestation resource. + * @return the {@link SyncPoller} for polling of an attestation resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, AttestationInner> beginCreateOrUpdateAtSubscription( @@ -115,7 +115,7 @@ SyncPoller, AttestationInner> beginCreateOrUpdateAt * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an existing attestation at subscription scope. + * @return an existing attestation at subscription scope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getAtSubscriptionWithResponse(String attestationName, Context context); @@ -139,7 +139,7 @@ SyncPoller, AttestationInner> beginCreateOrUpdateAt * @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 {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response deleteAtSubscriptionWithResponse(String attestationName, Context context); @@ -151,7 +151,7 @@ SyncPoller, AttestationInner> beginCreateOrUpdateAt * @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 all attestations for the resource group. + * @return all attestations for the resource group as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName); @@ -166,7 +166,7 @@ SyncPoller, AttestationInner> beginCreateOrUpdateAt * @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 all attestations for the resource group. + * @return all attestations for the resource group as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup( @@ -181,7 +181,7 @@ PagedIterable listByResourceGroup( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an attestation resource. + * @return the {@link SyncPoller} for polling of an attestation resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, AttestationInner> beginCreateOrUpdateAtResourceGroup( @@ -197,7 +197,7 @@ SyncPoller, AttestationInner> beginCreateOrUpdateAt * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an attestation resource. + * @return the {@link SyncPoller} for polling of an attestation resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, AttestationInner> beginCreateOrUpdateAtResourceGroup( @@ -256,7 +256,7 @@ AttestationInner createOrUpdateAtResourceGroup( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an existing attestation at resource group scope. + * @return an existing attestation at resource group scope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getByResourceGroupWithResponse( @@ -283,7 +283,7 @@ Response getByResourceGroupWithResponse( * @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 {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response deleteWithResponse(String resourceGroupName, String attestationName, Context context); @@ -295,7 +295,7 @@ Response getByResourceGroupWithResponse( * @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 all attestations for a resource. + * @return all attestations for a resource as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listForResource(String resourceId); @@ -310,7 +310,7 @@ Response getByResourceGroupWithResponse( * @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 all attestations for a resource. + * @return all attestations for a resource as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listForResource(String resourceId, Integer top, String filter, Context context); @@ -324,7 +324,7 @@ Response getByResourceGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an attestation resource. + * @return the {@link SyncPoller} for polling of an attestation resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, AttestationInner> beginCreateOrUpdateAtResource( @@ -340,7 +340,7 @@ SyncPoller, AttestationInner> beginCreateOrUpdateAt * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an attestation resource. + * @return the {@link SyncPoller} for polling of an attestation resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, AttestationInner> beginCreateOrUpdateAtResource( @@ -398,7 +398,7 @@ AttestationInner createOrUpdateAtResource( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an existing attestation at resource scope. + * @return an existing attestation at resource scope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getAtResourceWithResponse(String resourceId, String attestationName, Context context); @@ -424,7 +424,7 @@ AttestationInner createOrUpdateAtResource( * @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 {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response deleteAtResourceWithResponse(String resourceId, String attestationName, Context context); diff --git a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/OperationsClient.java b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/OperationsClient.java index fd08a116756ed..eee9909301adc 100644 --- a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/OperationsClient.java +++ b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/OperationsClient.java @@ -29,7 +29,7 @@ public interface OperationsClient { * @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 list of available operations. + * @return list of available operations along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response listWithResponse(Context context); diff --git a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/PolicyEventsClient.java b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/PolicyEventsClient.java index 3d264be6c2470..4375008175a2e 100644 --- a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/PolicyEventsClient.java +++ b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/PolicyEventsClient.java @@ -9,6 +9,7 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.core.util.Context; import com.azure.resourcemanager.policyinsights.fluent.models.PolicyEventInner; +import com.azure.resourcemanager.policyinsights.models.PolicyEventsResourceType; import java.time.OffsetDateTime; /** An instance of this class provides access to all the operations defined in PolicyEventsClient. */ @@ -16,18 +17,23 @@ public interface PolicyEventsClient { /** * Queries policy events for the resources under the management group. * + * @param policyEventsResource The name of the virtual resource under PolicyEvents resource type; only "default" is + * allowed. * @param managementGroupName Management group name. * @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 query results. + * @return query results as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listQueryResultsForManagementGroup(String managementGroupName); + PagedIterable listQueryResultsForManagementGroup( + PolicyEventsResourceType policyEventsResource, String managementGroupName); /** * Queries policy events for the resources under the management group. * + * @param policyEventsResource The name of the virtual resource under PolicyEvents resource type; only "default" is + * allowed. * @param managementGroupName Management group name. * @param top Maximum number of records to return. * @param orderBy Ordering expression using OData notation. One or more comma-separated column names with an @@ -46,10 +52,11 @@ public interface PolicyEventsClient { * @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 query results. + * @return query results as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listQueryResultsForManagementGroup( + PolicyEventsResourceType policyEventsResource, String managementGroupName, Integer top, String orderBy, @@ -64,18 +71,23 @@ PagedIterable listQueryResultsForManagementGroup( /** * Queries policy events for the resources under the subscription. * + * @param policyEventsResource The name of the virtual resource under PolicyEvents resource type; only "default" is + * allowed. * @param subscriptionId Microsoft Azure subscription ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return query results. + * @return query results as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listQueryResultsForSubscription(String subscriptionId); + PagedIterable listQueryResultsForSubscription( + PolicyEventsResourceType policyEventsResource, String subscriptionId); /** * Queries policy events for the resources under the subscription. * + * @param policyEventsResource The name of the virtual resource under PolicyEvents resource type; only "default" is + * allowed. * @param subscriptionId Microsoft Azure subscription ID. * @param top Maximum number of records to return. * @param orderBy Ordering expression using OData notation. One or more comma-separated column names with an @@ -94,10 +106,11 @@ PagedIterable listQueryResultsForManagementGroup( * @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 query results. + * @return query results as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listQueryResultsForSubscription( + PolicyEventsResourceType policyEventsResource, String subscriptionId, Integer top, String orderBy, @@ -112,19 +125,24 @@ PagedIterable listQueryResultsForSubscription( /** * Queries policy events for the resources under the resource group. * + * @param policyEventsResource The name of the virtual resource under PolicyEvents resource type; only "default" is + * allowed. * @param subscriptionId Microsoft Azure subscription ID. * @param resourceGroupName Resource group name. * @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 query results. + * @return query results as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listQueryResultsForResourceGroup(String subscriptionId, String resourceGroupName); + PagedIterable listQueryResultsForResourceGroup( + PolicyEventsResourceType policyEventsResource, String subscriptionId, String resourceGroupName); /** * Queries policy events for the resources under the resource group. * + * @param policyEventsResource The name of the virtual resource under PolicyEvents resource type; only "default" is + * allowed. * @param subscriptionId Microsoft Azure subscription ID. * @param resourceGroupName Resource group name. * @param top Maximum number of records to return. @@ -144,10 +162,11 @@ PagedIterable listQueryResultsForSubscription( * @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 query results. + * @return query results as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listQueryResultsForResourceGroup( + PolicyEventsResourceType policyEventsResource, String subscriptionId, String resourceGroupName, Integer top, @@ -163,18 +182,23 @@ PagedIterable listQueryResultsForResourceGroup( /** * Queries policy events for the resource. * + * @param policyEventsResource The name of the virtual resource under PolicyEvents resource type; only "default" is + * allowed. * @param resourceId Resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return query results. + * @return query results as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listQueryResultsForResource(String resourceId); + PagedIterable listQueryResultsForResource( + PolicyEventsResourceType policyEventsResource, String resourceId); /** * Queries policy events for the resource. * + * @param policyEventsResource The name of the virtual resource under PolicyEvents resource type; only "default" is + * allowed. * @param resourceId Resource ID. * @param top Maximum number of records to return. * @param orderBy Ordering expression using OData notation. One or more comma-separated column names with an @@ -194,10 +218,11 @@ PagedIterable listQueryResultsForResourceGroup( * @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 query results. + * @return query results as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listQueryResultsForResource( + PolicyEventsResourceType policyEventsResource, String resourceId, Integer top, String orderBy, @@ -213,20 +238,24 @@ PagedIterable listQueryResultsForResource( /** * Queries policy events for the subscription level policy set definition. * + * @param policyEventsResource The name of the virtual resource under PolicyEvents resource type; only "default" is + * allowed. * @param subscriptionId Microsoft Azure subscription ID. * @param policySetDefinitionName Policy set definition name. * @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 query results. + * @return query results as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listQueryResultsForPolicySetDefinition( - String subscriptionId, String policySetDefinitionName); + PolicyEventsResourceType policyEventsResource, String subscriptionId, String policySetDefinitionName); /** * Queries policy events for the subscription level policy set definition. * + * @param policyEventsResource The name of the virtual resource under PolicyEvents resource type; only "default" is + * allowed. * @param subscriptionId Microsoft Azure subscription ID. * @param policySetDefinitionName Policy set definition name. * @param top Maximum number of records to return. @@ -246,10 +275,11 @@ PagedIterable listQueryResultsForPolicySetDefinition( * @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 query results. + * @return query results as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listQueryResultsForPolicySetDefinition( + PolicyEventsResourceType policyEventsResource, String subscriptionId, String policySetDefinitionName, Integer top, @@ -265,20 +295,24 @@ PagedIterable listQueryResultsForPolicySetDefinition( /** * Queries policy events for the subscription level policy definition. * + * @param policyEventsResource The name of the virtual resource under PolicyEvents resource type; only "default" is + * allowed. * @param subscriptionId Microsoft Azure subscription ID. * @param policyDefinitionName Policy definition name. * @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 query results. + * @return query results as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listQueryResultsForPolicyDefinition( - String subscriptionId, String policyDefinitionName); + PolicyEventsResourceType policyEventsResource, String subscriptionId, String policyDefinitionName); /** * Queries policy events for the subscription level policy definition. * + * @param policyEventsResource The name of the virtual resource under PolicyEvents resource type; only "default" is + * allowed. * @param subscriptionId Microsoft Azure subscription ID. * @param policyDefinitionName Policy definition name. * @param top Maximum number of records to return. @@ -298,10 +332,11 @@ PagedIterable listQueryResultsForPolicyDefinition( * @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 query results. + * @return query results as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listQueryResultsForPolicyDefinition( + PolicyEventsResourceType policyEventsResource, String subscriptionId, String policyDefinitionName, Integer top, @@ -317,20 +352,24 @@ PagedIterable listQueryResultsForPolicyDefinition( /** * Queries policy events for the subscription level policy assignment. * + * @param policyEventsResource The name of the virtual resource under PolicyEvents resource type; only "default" is + * allowed. * @param subscriptionId Microsoft Azure subscription ID. * @param policyAssignmentName Policy assignment name. * @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 query results. + * @return query results as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listQueryResultsForSubscriptionLevelPolicyAssignment( - String subscriptionId, String policyAssignmentName); + PolicyEventsResourceType policyEventsResource, String subscriptionId, String policyAssignmentName); /** * Queries policy events for the subscription level policy assignment. * + * @param policyEventsResource The name of the virtual resource under PolicyEvents resource type; only "default" is + * allowed. * @param subscriptionId Microsoft Azure subscription ID. * @param policyAssignmentName Policy assignment name. * @param top Maximum number of records to return. @@ -350,10 +389,11 @@ PagedIterable listQueryResultsForSubscriptionLevelPolicyAssign * @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 query results. + * @return query results as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listQueryResultsForSubscriptionLevelPolicyAssignment( + PolicyEventsResourceType policyEventsResource, String subscriptionId, String policyAssignmentName, Integer top, @@ -369,21 +409,28 @@ PagedIterable listQueryResultsForSubscriptionLevelPolicyAssign /** * Queries policy events for the resource group level policy assignment. * + * @param policyEventsResource The name of the virtual resource under PolicyEvents resource type; only "default" is + * allowed. * @param subscriptionId Microsoft Azure subscription ID. * @param resourceGroupName Resource group name. * @param policyAssignmentName Policy assignment name. * @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 query results. + * @return query results as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listQueryResultsForResourceGroupLevelPolicyAssignment( - String subscriptionId, String resourceGroupName, String policyAssignmentName); + PolicyEventsResourceType policyEventsResource, + String subscriptionId, + String resourceGroupName, + String policyAssignmentName); /** * Queries policy events for the resource group level policy assignment. * + * @param policyEventsResource The name of the virtual resource under PolicyEvents resource type; only "default" is + * allowed. * @param subscriptionId Microsoft Azure subscription ID. * @param resourceGroupName Resource group name. * @param policyAssignmentName Policy assignment name. @@ -404,10 +451,11 @@ PagedIterable listQueryResultsForResourceGroupLevelPolicyAssig * @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 query results. + * @return query results as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listQueryResultsForResourceGroupLevelPolicyAssignment( + PolicyEventsResourceType policyEventsResource, String subscriptionId, String resourceGroupName, String policyAssignmentName, diff --git a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/PolicyMetadatasClient.java b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/PolicyMetadatasClient.java index 9a2b70311eaa2..50215392d46b4 100644 --- a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/PolicyMetadatasClient.java +++ b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/PolicyMetadatasClient.java @@ -34,7 +34,7 @@ public interface PolicyMetadatasClient { * @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 policy metadata resource. + * @return policy metadata resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getResourceWithResponse(String resourceName, Context context); @@ -44,7 +44,7 @@ public interface PolicyMetadatasClient { * * @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 the policy metadata resources. + * @return a list of the policy metadata resources as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); @@ -57,7 +57,7 @@ public interface PolicyMetadatasClient { * @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 the policy metadata resources. + * @return a list of the policy metadata resources as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Integer top, Context context); diff --git a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/PolicyRestrictionsClient.java b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/PolicyRestrictionsClient.java index a08ccecbf4776..4e90065f73ea3 100644 --- a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/PolicyRestrictionsClient.java +++ b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/PolicyRestrictionsClient.java @@ -33,7 +33,7 @@ public interface PolicyRestrictionsClient { * @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 result of a check policy restrictions evaluation on a resource. + * @return the result of a check policy restrictions evaluation on a resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response checkAtSubscriptionScopeWithResponse( @@ -64,7 +64,7 @@ CheckRestrictionsResultInner checkAtResourceGroupScope( * @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 result of a check policy restrictions evaluation on a resource. + * @return the result of a check policy restrictions evaluation on a resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response checkAtResourceGroupScopeWithResponse( diff --git a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/PolicyStatesClient.java b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/PolicyStatesClient.java index 174231c66d889..0225dda114a60 100644 --- a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/PolicyStatesClient.java +++ b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/PolicyStatesClient.java @@ -14,6 +14,7 @@ import com.azure.resourcemanager.policyinsights.fluent.models.PolicyStateInner; import com.azure.resourcemanager.policyinsights.fluent.models.SummarizeResultsInner; import com.azure.resourcemanager.policyinsights.models.PolicyStatesResource; +import com.azure.resourcemanager.policyinsights.models.PolicyStatesSummaryResourceType; import java.time.OffsetDateTime; /** An instance of this class provides access to all the operations defined in PolicyStatesClient. */ @@ -27,7 +28,7 @@ public interface PolicyStatesClient { * @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 query results. + * @return query results as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listQueryResultsForManagementGroup( @@ -56,7 +57,7 @@ PagedIterable listQueryResultsForManagementGroup( * @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 query results. + * @return query results as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listQueryResultsForManagementGroup( @@ -75,6 +76,8 @@ PagedIterable listQueryResultsForManagementGroup( /** * Summarizes policy states for the resources under the management group. * + * @param policyStatesSummaryResource The virtual resource under PolicyStates resource type for summarize action. In + * a given time range, 'latest' represents the latest policy state(s) and is the only allowed value. * @param managementGroupName Management group name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -82,11 +85,14 @@ PagedIterable listQueryResultsForManagementGroup( * @return summarize action results. */ @ServiceMethod(returns = ReturnType.SINGLE) - SummarizeResultsInner summarizeForManagementGroup(String managementGroupName); + SummarizeResultsInner summarizeForManagementGroup( + PolicyStatesSummaryResourceType policyStatesSummaryResource, String managementGroupName); /** * Summarizes policy states for the resources under the management group. * + * @param policyStatesSummaryResource The virtual resource under PolicyStates resource type for summarize action. In + * a given time range, 'latest' represents the latest policy state(s) and is the only allowed value. * @param managementGroupName Management group name. * @param top Maximum number of records to return. * @param from ISO 8601 formatted timestamp specifying the start time of the interval to query. When not specified, @@ -98,10 +104,11 @@ PagedIterable listQueryResultsForManagementGroup( * @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 summarize action results. + * @return summarize action results along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response summarizeForManagementGroupWithResponse( + PolicyStatesSummaryResourceType policyStatesSummaryResource, String managementGroupName, Integer top, OffsetDateTime from, @@ -118,7 +125,7 @@ Response summarizeForManagementGroupWithResponse( * @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 query results. + * @return query results as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listQueryResultsForSubscription( @@ -147,7 +154,7 @@ PagedIterable listQueryResultsForSubscription( * @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 query results. + * @return query results as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listQueryResultsForSubscription( @@ -166,6 +173,8 @@ PagedIterable listQueryResultsForSubscription( /** * Summarizes policy states for the resources under the subscription. * + * @param policyStatesSummaryResource The virtual resource under PolicyStates resource type for summarize action. In + * a given time range, 'latest' represents the latest policy state(s) and is the only allowed value. * @param subscriptionId Microsoft Azure subscription ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -173,11 +182,14 @@ PagedIterable listQueryResultsForSubscription( * @return summarize action results. */ @ServiceMethod(returns = ReturnType.SINGLE) - SummarizeResultsInner summarizeForSubscription(String subscriptionId); + SummarizeResultsInner summarizeForSubscription( + PolicyStatesSummaryResourceType policyStatesSummaryResource, String subscriptionId); /** * Summarizes policy states for the resources under the subscription. * + * @param policyStatesSummaryResource The virtual resource under PolicyStates resource type for summarize action. In + * a given time range, 'latest' represents the latest policy state(s) and is the only allowed value. * @param subscriptionId Microsoft Azure subscription ID. * @param top Maximum number of records to return. * @param from ISO 8601 formatted timestamp specifying the start time of the interval to query. When not specified, @@ -189,11 +201,17 @@ PagedIterable listQueryResultsForSubscription( * @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 summarize action results. + * @return summarize action results along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response summarizeForSubscriptionWithResponse( - String subscriptionId, Integer top, OffsetDateTime from, OffsetDateTime to, String filter, Context context); + PolicyStatesSummaryResourceType policyStatesSummaryResource, + String subscriptionId, + Integer top, + OffsetDateTime from, + OffsetDateTime to, + String filter, + Context context); /** * Queries policy states for the resources under the resource group. @@ -205,7 +223,7 @@ Response summarizeForSubscriptionWithResponse( * @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 query results. + * @return query results as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listQueryResultsForResourceGroup( @@ -235,7 +253,7 @@ PagedIterable listQueryResultsForResourceGroup( * @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 query results. + * @return query results as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listQueryResultsForResourceGroup( @@ -255,6 +273,8 @@ PagedIterable listQueryResultsForResourceGroup( /** * Summarizes policy states for the resources under the resource group. * + * @param policyStatesSummaryResource The virtual resource under PolicyStates resource type for summarize action. In + * a given time range, 'latest' represents the latest policy state(s) and is the only allowed value. * @param subscriptionId Microsoft Azure subscription ID. * @param resourceGroupName Resource group name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -263,11 +283,14 @@ PagedIterable listQueryResultsForResourceGroup( * @return summarize action results. */ @ServiceMethod(returns = ReturnType.SINGLE) - SummarizeResultsInner summarizeForResourceGroup(String subscriptionId, String resourceGroupName); + SummarizeResultsInner summarizeForResourceGroup( + PolicyStatesSummaryResourceType policyStatesSummaryResource, String subscriptionId, String resourceGroupName); /** * Summarizes policy states for the resources under the resource group. * + * @param policyStatesSummaryResource The virtual resource under PolicyStates resource type for summarize action. In + * a given time range, 'latest' represents the latest policy state(s) and is the only allowed value. * @param subscriptionId Microsoft Azure subscription ID. * @param resourceGroupName Resource group name. * @param top Maximum number of records to return. @@ -280,10 +303,11 @@ PagedIterable listQueryResultsForResourceGroup( * @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 summarize action results. + * @return summarize action results along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response summarizeForResourceGroupWithResponse( + PolicyStatesSummaryResourceType policyStatesSummaryResource, String subscriptionId, String resourceGroupName, Integer top, @@ -301,7 +325,7 @@ Response summarizeForResourceGroupWithResponse( * @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 query results. + * @return query results as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listQueryResultsForResource( @@ -331,7 +355,7 @@ PagedIterable listQueryResultsForResource( * @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 query results. + * @return query results as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listQueryResultsForResource( @@ -351,6 +375,8 @@ PagedIterable listQueryResultsForResource( /** * Summarizes policy states for the resource. * + * @param policyStatesSummaryResource The virtual resource under PolicyStates resource type for summarize action. In + * a given time range, 'latest' represents the latest policy state(s) and is the only allowed value. * @param resourceId Resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -358,11 +384,14 @@ PagedIterable listQueryResultsForResource( * @return summarize action results. */ @ServiceMethod(returns = ReturnType.SINGLE) - SummarizeResultsInner summarizeForResource(String resourceId); + SummarizeResultsInner summarizeForResource( + PolicyStatesSummaryResourceType policyStatesSummaryResource, String resourceId); /** * Summarizes policy states for the resource. * + * @param policyStatesSummaryResource The virtual resource under PolicyStates resource type for summarize action. In + * a given time range, 'latest' represents the latest policy state(s) and is the only allowed value. * @param resourceId Resource ID. * @param top Maximum number of records to return. * @param from ISO 8601 formatted timestamp specifying the start time of the interval to query. When not specified, @@ -374,11 +403,17 @@ PagedIterable listQueryResultsForResource( * @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 summarize action results. + * @return summarize action results along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response summarizeForResourceWithResponse( - String resourceId, Integer top, OffsetDateTime from, OffsetDateTime to, String filter, Context context); + PolicyStatesSummaryResourceType policyStatesSummaryResource, + String resourceId, + Integer top, + OffsetDateTime from, + OffsetDateTime to, + String filter, + Context context); /** * Triggers a policy evaluation scan for all the resources under the subscription. @@ -387,7 +422,7 @@ Response summarizeForResourceWithResponse( * @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 completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginTriggerSubscriptionEvaluation(String subscriptionId); @@ -400,7 +435,7 @@ Response summarizeForResourceWithResponse( * @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 completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginTriggerSubscriptionEvaluation(String subscriptionId, Context context); @@ -436,7 +471,7 @@ Response summarizeForResourceWithResponse( * @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 completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginTriggerResourceGroupEvaluation( @@ -451,7 +486,7 @@ SyncPoller, Void> beginTriggerResourceGroupEvaluation( * @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 completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginTriggerResourceGroupEvaluation( @@ -492,7 +527,7 @@ SyncPoller, Void> beginTriggerResourceGroupEvaluation( * @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 query results. + * @return query results as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listQueryResultsForPolicySetDefinition( @@ -522,7 +557,7 @@ PagedIterable listQueryResultsForPolicySetDefinition( * @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 query results. + * @return query results as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listQueryResultsForPolicySetDefinition( @@ -542,6 +577,8 @@ PagedIterable listQueryResultsForPolicySetDefinition( /** * Summarizes policy states for the subscription level policy set definition. * + * @param policyStatesSummaryResource The virtual resource under PolicyStates resource type for summarize action. In + * a given time range, 'latest' represents the latest policy state(s) and is the only allowed value. * @param subscriptionId Microsoft Azure subscription ID. * @param policySetDefinitionName Policy set definition name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -550,11 +587,16 @@ PagedIterable listQueryResultsForPolicySetDefinition( * @return summarize action results. */ @ServiceMethod(returns = ReturnType.SINGLE) - SummarizeResultsInner summarizeForPolicySetDefinition(String subscriptionId, String policySetDefinitionName); + SummarizeResultsInner summarizeForPolicySetDefinition( + PolicyStatesSummaryResourceType policyStatesSummaryResource, + String subscriptionId, + String policySetDefinitionName); /** * Summarizes policy states for the subscription level policy set definition. * + * @param policyStatesSummaryResource The virtual resource under PolicyStates resource type for summarize action. In + * a given time range, 'latest' represents the latest policy state(s) and is the only allowed value. * @param subscriptionId Microsoft Azure subscription ID. * @param policySetDefinitionName Policy set definition name. * @param top Maximum number of records to return. @@ -567,10 +609,11 @@ PagedIterable listQueryResultsForPolicySetDefinition( * @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 summarize action results. + * @return summarize action results along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response summarizeForPolicySetDefinitionWithResponse( + PolicyStatesSummaryResourceType policyStatesSummaryResource, String subscriptionId, String policySetDefinitionName, Integer top, @@ -589,7 +632,7 @@ Response summarizeForPolicySetDefinitionWithResponse( * @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 query results. + * @return query results as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listQueryResultsForPolicyDefinition( @@ -619,7 +662,7 @@ PagedIterable listQueryResultsForPolicyDefinition( * @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 query results. + * @return query results as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listQueryResultsForPolicyDefinition( @@ -639,6 +682,8 @@ PagedIterable listQueryResultsForPolicyDefinition( /** * Summarizes policy states for the subscription level policy definition. * + * @param policyStatesSummaryResource The virtual resource under PolicyStates resource type for summarize action. In + * a given time range, 'latest' represents the latest policy state(s) and is the only allowed value. * @param subscriptionId Microsoft Azure subscription ID. * @param policyDefinitionName Policy definition name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -647,11 +692,16 @@ PagedIterable listQueryResultsForPolicyDefinition( * @return summarize action results. */ @ServiceMethod(returns = ReturnType.SINGLE) - SummarizeResultsInner summarizeForPolicyDefinition(String subscriptionId, String policyDefinitionName); + SummarizeResultsInner summarizeForPolicyDefinition( + PolicyStatesSummaryResourceType policyStatesSummaryResource, + String subscriptionId, + String policyDefinitionName); /** * Summarizes policy states for the subscription level policy definition. * + * @param policyStatesSummaryResource The virtual resource under PolicyStates resource type for summarize action. In + * a given time range, 'latest' represents the latest policy state(s) and is the only allowed value. * @param subscriptionId Microsoft Azure subscription ID. * @param policyDefinitionName Policy definition name. * @param top Maximum number of records to return. @@ -664,10 +714,11 @@ PagedIterable listQueryResultsForPolicyDefinition( * @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 summarize action results. + * @return summarize action results along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response summarizeForPolicyDefinitionWithResponse( + PolicyStatesSummaryResourceType policyStatesSummaryResource, String subscriptionId, String policyDefinitionName, Integer top, @@ -686,7 +737,7 @@ Response summarizeForPolicyDefinitionWithResponse( * @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 query results. + * @return query results as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listQueryResultsForSubscriptionLevelPolicyAssignment( @@ -716,7 +767,7 @@ PagedIterable listQueryResultsForSubscriptionLevelPolicyAssign * @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 query results. + * @return query results as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listQueryResultsForSubscriptionLevelPolicyAssignment( @@ -736,6 +787,8 @@ PagedIterable listQueryResultsForSubscriptionLevelPolicyAssign /** * Summarizes policy states for the subscription level policy assignment. * + * @param policyStatesSummaryResource The virtual resource under PolicyStates resource type for summarize action. In + * a given time range, 'latest' represents the latest policy state(s) and is the only allowed value. * @param subscriptionId Microsoft Azure subscription ID. * @param policyAssignmentName Policy assignment name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -745,11 +798,15 @@ PagedIterable listQueryResultsForSubscriptionLevelPolicyAssign */ @ServiceMethod(returns = ReturnType.SINGLE) SummarizeResultsInner summarizeForSubscriptionLevelPolicyAssignment( - String subscriptionId, String policyAssignmentName); + PolicyStatesSummaryResourceType policyStatesSummaryResource, + String subscriptionId, + String policyAssignmentName); /** * Summarizes policy states for the subscription level policy assignment. * + * @param policyStatesSummaryResource The virtual resource under PolicyStates resource type for summarize action. In + * a given time range, 'latest' represents the latest policy state(s) and is the only allowed value. * @param subscriptionId Microsoft Azure subscription ID. * @param policyAssignmentName Policy assignment name. * @param top Maximum number of records to return. @@ -762,10 +819,11 @@ SummarizeResultsInner summarizeForSubscriptionLevelPolicyAssignment( * @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 summarize action results. + * @return summarize action results along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response summarizeForSubscriptionLevelPolicyAssignmentWithResponse( + PolicyStatesSummaryResourceType policyStatesSummaryResource, String subscriptionId, String policyAssignmentName, Integer top, @@ -785,7 +843,7 @@ Response summarizeForSubscriptionLevelPolicyAssignmentWit * @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 query results. + * @return query results as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listQueryResultsForResourceGroupLevelPolicyAssignment( @@ -819,7 +877,7 @@ PagedIterable listQueryResultsForResourceGroupLevelPolicyAssig * @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 query results. + * @return query results as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listQueryResultsForResourceGroupLevelPolicyAssignment( @@ -840,6 +898,8 @@ PagedIterable listQueryResultsForResourceGroupLevelPolicyAssig /** * Summarizes policy states for the resource group level policy assignment. * + * @param policyStatesSummaryResource The virtual resource under PolicyStates resource type for summarize action. In + * a given time range, 'latest' represents the latest policy state(s) and is the only allowed value. * @param subscriptionId Microsoft Azure subscription ID. * @param resourceGroupName Resource group name. * @param policyAssignmentName Policy assignment name. @@ -850,11 +910,16 @@ PagedIterable listQueryResultsForResourceGroupLevelPolicyAssig */ @ServiceMethod(returns = ReturnType.SINGLE) SummarizeResultsInner summarizeForResourceGroupLevelPolicyAssignment( - String subscriptionId, String resourceGroupName, String policyAssignmentName); + PolicyStatesSummaryResourceType policyStatesSummaryResource, + String subscriptionId, + String resourceGroupName, + String policyAssignmentName); /** * Summarizes policy states for the resource group level policy assignment. * + * @param policyStatesSummaryResource The virtual resource under PolicyStates resource type for summarize action. In + * a given time range, 'latest' represents the latest policy state(s) and is the only allowed value. * @param subscriptionId Microsoft Azure subscription ID. * @param resourceGroupName Resource group name. * @param policyAssignmentName Policy assignment name. @@ -868,10 +933,11 @@ SummarizeResultsInner summarizeForResourceGroupLevelPolicyAssignment( * @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 summarize action results. + * @return summarize action results along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response summarizeForResourceGroupLevelPolicyAssignmentWithResponse( + PolicyStatesSummaryResourceType policyStatesSummaryResource, String subscriptionId, String resourceGroupName, String policyAssignmentName, diff --git a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/PolicyTrackedResourcesClient.java b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/PolicyTrackedResourcesClient.java index b5d6660300456..4c2fde5584408 100644 --- a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/PolicyTrackedResourcesClient.java +++ b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/PolicyTrackedResourcesClient.java @@ -9,6 +9,7 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.core.util.Context; import com.azure.resourcemanager.policyinsights.fluent.models.PolicyTrackedResourceInner; +import com.azure.resourcemanager.policyinsights.models.PolicyTrackedResourcesResourceType; /** An instance of this class provides access to all the operations defined in PolicyTrackedResourcesClient. */ public interface PolicyTrackedResourcesClient { @@ -16,108 +17,141 @@ public interface PolicyTrackedResourcesClient { * Queries policy tracked resources under the management group. * * @param managementGroupName Management group name. + * @param policyTrackedResourcesResource The name of the virtual resource under PolicyTrackedResources resource + * type; only "default" is allowed. * @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 query results. + * @return query results as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listQueryResultsForManagementGroup(String managementGroupName); + PagedIterable listQueryResultsForManagementGroup( + String managementGroupName, PolicyTrackedResourcesResourceType policyTrackedResourcesResource); /** * Queries policy tracked resources under the management group. * * @param managementGroupName Management group name. + * @param policyTrackedResourcesResource The name of the virtual resource under PolicyTrackedResources resource + * type; only "default" is allowed. * @param top Maximum number of records to return. * @param filter OData filter expression. * @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 query results. + * @return query results as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listQueryResultsForManagementGroup( - String managementGroupName, Integer top, String filter, Context context); + String managementGroupName, + PolicyTrackedResourcesResourceType policyTrackedResourcesResource, + Integer top, + String filter, + Context context); /** * Queries policy tracked resources under the subscription. * + * @param policyTrackedResourcesResource The name of the virtual resource under PolicyTrackedResources resource + * type; only "default" is allowed. + * @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 query results. + * @return query results as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listQueryResultsForSubscription(); + PagedIterable listQueryResultsForSubscription( + PolicyTrackedResourcesResourceType policyTrackedResourcesResource); /** * Queries policy tracked resources under the subscription. * + * @param policyTrackedResourcesResource The name of the virtual resource under PolicyTrackedResources resource + * type; only "default" is allowed. * @param top Maximum number of records to return. * @param filter OData filter expression. * @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 query results. + * @return query results as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listQueryResultsForSubscription( - Integer top, String filter, Context context); + PolicyTrackedResourcesResourceType policyTrackedResourcesResource, Integer top, String filter, Context context); /** * Queries policy tracked resources under the resource group. * * @param resourceGroupName Resource group name. + * @param policyTrackedResourcesResource The name of the virtual resource under PolicyTrackedResources resource + * type; only "default" is allowed. * @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 query results. + * @return query results as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listQueryResultsForResourceGroup(String resourceGroupName); + PagedIterable listQueryResultsForResourceGroup( + String resourceGroupName, PolicyTrackedResourcesResourceType policyTrackedResourcesResource); /** * Queries policy tracked resources under the resource group. * * @param resourceGroupName Resource group name. + * @param policyTrackedResourcesResource The name of the virtual resource under PolicyTrackedResources resource + * type; only "default" is allowed. * @param top Maximum number of records to return. * @param filter OData filter expression. * @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 query results. + * @return query results as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listQueryResultsForResourceGroup( - String resourceGroupName, Integer top, String filter, Context context); + String resourceGroupName, + PolicyTrackedResourcesResourceType policyTrackedResourcesResource, + Integer top, + String filter, + Context context); /** * Queries policy tracked resources under the resource. * * @param resourceId Resource ID. + * @param policyTrackedResourcesResource The name of the virtual resource under PolicyTrackedResources resource + * type; only "default" is allowed. * @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 query results. + * @return query results as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listQueryResultsForResource(String resourceId); + PagedIterable listQueryResultsForResource( + String resourceId, PolicyTrackedResourcesResourceType policyTrackedResourcesResource); /** * Queries policy tracked resources under the resource. * * @param resourceId Resource ID. + * @param policyTrackedResourcesResource The name of the virtual resource under PolicyTrackedResources resource + * type; only "default" is allowed. * @param top Maximum number of records to return. * @param filter OData filter expression. * @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 query results. + * @return query results as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listQueryResultsForResource( - String resourceId, Integer top, String filter, Context context); + String resourceId, + PolicyTrackedResourcesResourceType policyTrackedResourcesResource, + Integer top, + String filter, + Context context); } diff --git a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/RemediationsClient.java b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/RemediationsClient.java index 9e0e7fcaf5b89..14fc4d02baace 100644 --- a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/RemediationsClient.java +++ b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/RemediationsClient.java @@ -22,7 +22,8 @@ public interface RemediationsClient { * @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 all deployments for a remediation at management group scope. + * @return all deployments for a remediation at management group scope as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listDeploymentsAtManagementGroup( @@ -38,7 +39,8 @@ PagedIterable listDeploymentsAtManagementGroup( * @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 all deployments for a remediation at management group scope. + * @return all deployments for a remediation at management group scope as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listDeploymentsAtManagementGroup( @@ -66,7 +68,7 @@ PagedIterable listDeploymentsAtManagementGroup( * @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 remediation definition. + * @return the remediation definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response cancelAtManagementGroupWithResponse( @@ -79,7 +81,7 @@ Response cancelAtManagementGroupWithResponse( * @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 all remediations for the management group. + * @return all remediations for the management group as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listForManagementGroup(String managementGroupId); @@ -94,7 +96,7 @@ Response cancelAtManagementGroupWithResponse( * @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 all remediations for the management group. + * @return all remediations for the management group as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listForManagementGroup( @@ -125,7 +127,7 @@ RemediationInner createOrUpdateAtManagementGroup( * @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 remediation definition. + * @return the remediation definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response createOrUpdateAtManagementGroupWithResponse( @@ -153,7 +155,7 @@ Response createOrUpdateAtManagementGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an existing remediation at management group scope. + * @return an existing remediation at management group scope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getAtManagementGroupWithResponse( @@ -181,7 +183,7 @@ Response getAtManagementGroupWithResponse( * @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 remediation definition. + * @return the remediation definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response deleteAtManagementGroupWithResponse( @@ -194,7 +196,7 @@ Response deleteAtManagementGroupWithResponse( * @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 all deployments for a remediation at subscription scope. + * @return all deployments for a remediation at subscription scope as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listDeploymentsAtSubscription(String remediationName); @@ -208,7 +210,7 @@ Response deleteAtManagementGroupWithResponse( * @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 all deployments for a remediation at subscription scope. + * @return all deployments for a remediation at subscription scope as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listDeploymentsAtSubscription( @@ -234,7 +236,7 @@ PagedIterable listDeploymentsAtSubscription( * @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 remediation definition. + * @return the remediation definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response cancelAtSubscriptionWithResponse(String remediationName, Context context); @@ -244,7 +246,7 @@ PagedIterable listDeploymentsAtSubscription( * * @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 all remediations for the subscription. + * @return all remediations for the subscription as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); @@ -258,7 +260,7 @@ PagedIterable listDeploymentsAtSubscription( * @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 all remediations for the subscription. + * @return all remediations for the subscription as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Integer top, String filter, Context context); @@ -285,7 +287,7 @@ PagedIterable listDeploymentsAtSubscription( * @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 remediation definition. + * @return the remediation definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response createOrUpdateAtSubscriptionWithResponse( @@ -311,7 +313,7 @@ Response createOrUpdateAtSubscriptionWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an existing remediation at subscription scope. + * @return an existing remediation at subscription scope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getAtSubscriptionWithResponse(String remediationName, Context context); @@ -336,7 +338,7 @@ Response createOrUpdateAtSubscriptionWithResponse( * @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 remediation definition. + * @return the remediation definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response deleteAtSubscriptionWithResponse(String remediationName, Context context); @@ -349,7 +351,8 @@ Response createOrUpdateAtSubscriptionWithResponse( * @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 all deployments for a remediation at resource group scope. + * @return all deployments for a remediation at resource group scope as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listDeploymentsAtResourceGroup( @@ -365,7 +368,8 @@ PagedIterable listDeploymentsAtResourceGroup( * @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 all deployments for a remediation at resource group scope. + * @return all deployments for a remediation at resource group scope as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listDeploymentsAtResourceGroup( @@ -393,7 +397,7 @@ PagedIterable listDeploymentsAtResourceGroup( * @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 remediation definition. + * @return the remediation definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response cancelAtResourceGroupWithResponse( @@ -406,7 +410,7 @@ Response cancelAtResourceGroupWithResponse( * @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 all remediations for the subscription. + * @return all remediations for the subscription as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName); @@ -421,7 +425,7 @@ Response cancelAtResourceGroupWithResponse( * @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 all remediations for the subscription. + * @return all remediations for the subscription as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup( @@ -452,7 +456,7 @@ RemediationInner createOrUpdateAtResourceGroup( * @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 remediation definition. + * @return the remediation definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response createOrUpdateAtResourceGroupWithResponse( @@ -480,7 +484,7 @@ Response createOrUpdateAtResourceGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an existing remediation at resource group scope. + * @return an existing remediation at resource group scope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getByResourceGroupWithResponse( @@ -508,7 +512,7 @@ Response getByResourceGroupWithResponse( * @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 remediation definition. + * @return the remediation definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response deleteWithResponse(String resourceGroupName, String remediationName, Context context); @@ -521,7 +525,7 @@ Response getByResourceGroupWithResponse( * @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 all deployments for a remediation at resource scope. + * @return all deployments for a remediation at resource scope as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listDeploymentsAtResource(String resourceId, String remediationName); @@ -536,7 +540,7 @@ Response getByResourceGroupWithResponse( * @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 all deployments for a remediation at resource scope. + * @return all deployments for a remediation at resource scope as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listDeploymentsAtResource( @@ -564,7 +568,7 @@ PagedIterable listDeploymentsAtResource( * @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 remediation definition. + * @return the remediation definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response cancelAtResourceWithResponse(String resourceId, String remediationName, Context context); @@ -576,7 +580,7 @@ PagedIterable listDeploymentsAtResource( * @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 all remediations for a resource. + * @return all remediations for a resource as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listForResource(String resourceId); @@ -591,7 +595,7 @@ PagedIterable listDeploymentsAtResource( * @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 all remediations for a resource. + * @return all remediations for a resource as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listForResource(String resourceId, Integer top, String filter, Context context); @@ -620,7 +624,7 @@ PagedIterable listDeploymentsAtResource( * @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 remediation definition. + * @return the remediation definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response createOrUpdateAtResourceWithResponse( @@ -648,7 +652,7 @@ Response createOrUpdateAtResourceWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an existing remediation at resource scope. + * @return an existing remediation at resource scope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getAtResourceWithResponse(String resourceId, String remediationName, Context context); @@ -675,7 +679,7 @@ Response createOrUpdateAtResourceWithResponse( * @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 remediation definition. + * @return the remediation definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response deleteAtResourceWithResponse(String resourceId, String remediationName, Context context); diff --git a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/implementation/AttestationsClientImpl.java b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/implementation/AttestationsClientImpl.java index 0d8ac5a09c736..5ea371c59bbef 100644 --- a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/implementation/AttestationsClientImpl.java +++ b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/implementation/AttestationsClientImpl.java @@ -268,7 +268,8 @@ Mono> listForResourceNext( * @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 all attestations for the subscription. + * @return all attestations for the subscription along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Integer top, String filter) { @@ -319,7 +320,8 @@ private Mono> listSinglePageAsync(Integer top, S * @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 all attestations for the subscription. + * @return all attestations for the subscription along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Integer top, String filter, Context context) { @@ -359,7 +361,7 @@ private Mono> listSinglePageAsync(Integer top, S * @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 all attestations for the subscription. + * @return all attestations for the subscription as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Integer top, String filter) { @@ -372,7 +374,7 @@ private PagedFlux listAsync(Integer top, String filter) { * * @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 all attestations for the subscription. + * @return all attestations for the subscription as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { @@ -391,7 +393,7 @@ private PagedFlux listAsync() { * @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 all attestations for the subscription. + * @return all attestations for the subscription as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Integer top, String filter, Context context) { @@ -405,7 +407,7 @@ private PagedFlux listAsync(Integer top, String filter, Contex * * @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 all attestations for the subscription. + * @return all attestations for the subscription as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { @@ -423,7 +425,7 @@ public PagedIterable list() { * @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 all attestations for the subscription. + * @return all attestations for the subscription as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Integer top, String filter, Context context) { @@ -438,7 +440,7 @@ public PagedIterable list(Integer top, String filter, 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 an attestation resource. + * @return an attestation resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateAtSubscriptionWithResponseAsync( @@ -490,7 +492,7 @@ private Mono>> createOrUpdateAtSubscriptionWithRespons * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an attestation resource. + * @return an attestation resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateAtSubscriptionWithResponseAsync( @@ -538,7 +540,7 @@ private Mono>> createOrUpdateAtSubscriptionWithRespons * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an attestation resource. + * @return the {@link PollerFlux} for polling of an attestation resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, AttestationInner> beginCreateOrUpdateAtSubscriptionAsync( @@ -564,7 +566,7 @@ private PollerFlux, AttestationInner> beginCreateOr * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an attestation resource. + * @return the {@link PollerFlux} for polling of an attestation resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, AttestationInner> beginCreateOrUpdateAtSubscriptionAsync( @@ -586,7 +588,7 @@ private PollerFlux, AttestationInner> beginCreateOr * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an attestation resource. + * @return the {@link SyncPoller} for polling of an attestation resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, AttestationInner> beginCreateOrUpdateAtSubscription( @@ -603,7 +605,7 @@ public SyncPoller, AttestationInner> beginCreateOrU * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an attestation resource. + * @return the {@link SyncPoller} for polling of an attestation resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, AttestationInner> beginCreateOrUpdateAtSubscription( @@ -619,7 +621,7 @@ public SyncPoller, AttestationInner> beginCreateOrU * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an attestation resource. + * @return an attestation resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAtSubscriptionAsync( @@ -638,7 +640,7 @@ private Mono createOrUpdateAtSubscriptionAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an attestation resource. + * @return an attestation resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAtSubscriptionAsync( @@ -687,7 +689,8 @@ public AttestationInner createOrUpdateAtSubscription( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an existing attestation at subscription scope. + * @return an existing attestation at subscription scope along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getAtSubscriptionWithResponseAsync(String attestationName) { @@ -731,7 +734,8 @@ private Mono> getAtSubscriptionWithResponseAsync(Stri * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an existing attestation at subscription scope. + * @return an existing attestation at subscription scope along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getAtSubscriptionWithResponseAsync( @@ -772,7 +776,7 @@ private Mono> getAtSubscriptionWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an existing attestation at subscription scope. + * @return an existing attestation at subscription scope on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAtSubscriptionAsync(String attestationName) { @@ -809,7 +813,7 @@ public AttestationInner getAtSubscription(String attestationName) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an existing attestation at subscription scope. + * @return an existing attestation at subscription scope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getAtSubscriptionWithResponse(String attestationName, Context context) { @@ -823,7 +827,7 @@ public Response getAtSubscriptionWithResponse(String attestati * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteAtSubscriptionWithResponseAsync(String attestationName) { @@ -867,7 +871,7 @@ private Mono> deleteAtSubscriptionWithResponseAsync(String attest * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteAtSubscriptionWithResponseAsync(String attestationName, Context context) { @@ -907,7 +911,7 @@ private Mono> deleteAtSubscriptionWithResponseAsync(String attest * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAtSubscriptionAsync(String attestationName) { @@ -935,7 +939,7 @@ public void deleteAtSubscription(String attestationName) { * @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 {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response deleteAtSubscriptionWithResponse(String attestationName, Context context) { @@ -951,7 +955,8 @@ public Response deleteAtSubscriptionWithResponse(String attestationName, C * @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 all attestations for the resource group. + * @return all attestations for the resource group along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync( @@ -1009,7 +1014,8 @@ private Mono> listByResourceGroupSinglePageAsync * @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 all attestations for the resource group. + * @return all attestations for the resource group along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync( @@ -1063,7 +1069,7 @@ private Mono> listByResourceGroupSinglePageAsync * @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 all attestations for the resource group. + * @return all attestations for the resource group as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName, Integer top, String filter) { @@ -1079,7 +1085,7 @@ private PagedFlux listByResourceGroupAsync(String resourceGrou * @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 all attestations for the resource group. + * @return all attestations for the resource group as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName) { @@ -1100,7 +1106,7 @@ private PagedFlux listByResourceGroupAsync(String resourceGrou * @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 all attestations for the resource group. + * @return all attestations for the resource group as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync( @@ -1117,7 +1123,7 @@ private PagedFlux listByResourceGroupAsync( * @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 all attestations for the resource group. + * @return all attestations for the resource group as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName) { @@ -1136,7 +1142,7 @@ public PagedIterable listByResourceGroup(String resourceGroupN * @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 all attestations for the resource group. + * @return all attestations for the resource group as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup( @@ -1153,7 +1159,7 @@ public PagedIterable listByResourceGroup( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an attestation resource. + * @return an attestation resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateAtResourceGroupWithResponseAsync( @@ -1211,7 +1217,7 @@ private Mono>> createOrUpdateAtResourceGroupWithRespon * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an attestation resource. + * @return an attestation resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateAtResourceGroupWithResponseAsync( @@ -1265,7 +1271,7 @@ private Mono>> createOrUpdateAtResourceGroupWithRespon * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an attestation resource. + * @return the {@link PollerFlux} for polling of an attestation resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, AttestationInner> beginCreateOrUpdateAtResourceGroupAsync( @@ -1292,7 +1298,7 @@ private PollerFlux, AttestationInner> beginCreateOr * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an attestation resource. + * @return the {@link PollerFlux} for polling of an attestation resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, AttestationInner> beginCreateOrUpdateAtResourceGroupAsync( @@ -1315,7 +1321,7 @@ private PollerFlux, AttestationInner> beginCreateOr * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an attestation resource. + * @return the {@link SyncPoller} for polling of an attestation resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, AttestationInner> beginCreateOrUpdateAtResourceGroup( @@ -1333,7 +1339,7 @@ public SyncPoller, AttestationInner> beginCreateOrU * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an attestation resource. + * @return the {@link SyncPoller} for polling of an attestation resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, AttestationInner> beginCreateOrUpdateAtResourceGroup( @@ -1351,7 +1357,7 @@ public SyncPoller, AttestationInner> beginCreateOrU * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an attestation resource. + * @return an attestation resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAtResourceGroupAsync( @@ -1371,7 +1377,7 @@ private Mono createOrUpdateAtResourceGroupAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an attestation resource. + * @return an attestation resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAtResourceGroupAsync( @@ -1424,7 +1430,8 @@ public AttestationInner createOrUpdateAtResourceGroup( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an existing attestation at resource group scope. + * @return an existing attestation at resource group scope along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByResourceGroupWithResponseAsync( @@ -1475,7 +1482,8 @@ private Mono> getByResourceGroupWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an existing attestation at resource group scope. + * @return an existing attestation at resource group scope along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByResourceGroupWithResponseAsync( @@ -1522,7 +1530,7 @@ private Mono> getByResourceGroupWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an existing attestation at resource group scope. + * @return an existing attestation at resource group scope on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getByResourceGroupAsync(String resourceGroupName, String attestationName) { @@ -1561,7 +1569,7 @@ public AttestationInner getByResourceGroup(String resourceGroupName, String atte * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an existing attestation at resource group scope. + * @return an existing attestation at resource group scope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getByResourceGroupWithResponse( @@ -1577,7 +1585,7 @@ public Response getByResourceGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteWithResponseAsync(String resourceGroupName, String attestationName) { @@ -1627,7 +1635,7 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteWithResponseAsync( @@ -1674,7 +1682,7 @@ private Mono> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String attestationName) { @@ -1705,7 +1713,7 @@ public void delete(String resourceGroupName, String attestationName) { * @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 {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response deleteWithResponse(String resourceGroupName, String attestationName, Context context) { @@ -1721,7 +1729,8 @@ public Response deleteWithResponse(String resourceGroupName, String attest * @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 all attestations for a resource. + * @return all attestations for a resource along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listForResourceSinglePageAsync( @@ -1765,7 +1774,8 @@ private Mono> listForResourceSinglePageAsync( * @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 all attestations for a resource. + * @return all attestations for a resource along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listForResourceSinglePageAsync( @@ -1804,7 +1814,7 @@ private Mono> listForResourceSinglePageAsync( * @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 all attestations for a resource. + * @return all attestations for a resource as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listForResourceAsync(String resourceId, Integer top, String filter) { @@ -1820,7 +1830,7 @@ private PagedFlux listForResourceAsync(String resourceId, Inte * @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 all attestations for a resource. + * @return all attestations for a resource as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listForResourceAsync(String resourceId) { @@ -1841,7 +1851,7 @@ private PagedFlux listForResourceAsync(String resourceId) { * @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 all attestations for a resource. + * @return all attestations for a resource as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listForResourceAsync( @@ -1858,7 +1868,7 @@ private PagedFlux listForResourceAsync( * @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 all attestations for a resource. + * @return all attestations for a resource as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listForResource(String resourceId) { @@ -1877,7 +1887,7 @@ public PagedIterable listForResource(String resourceId) { * @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 all attestations for a resource. + * @return all attestations for a resource as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listForResource( @@ -1894,7 +1904,7 @@ public PagedIterable listForResource( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an attestation resource. + * @return an attestation resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateAtResourceWithResponseAsync( @@ -1944,7 +1954,7 @@ private Mono>> createOrUpdateAtResourceWithResponseAsy * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an attestation resource. + * @return an attestation resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateAtResourceWithResponseAsync( @@ -1984,7 +1994,7 @@ private Mono>> createOrUpdateAtResourceWithResponseAsy * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an attestation resource. + * @return the {@link PollerFlux} for polling of an attestation resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, AttestationInner> beginCreateOrUpdateAtResourceAsync( @@ -2011,7 +2021,7 @@ private PollerFlux, AttestationInner> beginCreateOr * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an attestation resource. + * @return the {@link PollerFlux} for polling of an attestation resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, AttestationInner> beginCreateOrUpdateAtResourceAsync( @@ -2034,7 +2044,7 @@ private PollerFlux, AttestationInner> beginCreateOr * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an attestation resource. + * @return the {@link SyncPoller} for polling of an attestation resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, AttestationInner> beginCreateOrUpdateAtResource( @@ -2052,7 +2062,7 @@ public SyncPoller, AttestationInner> beginCreateOrU * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an attestation resource. + * @return the {@link SyncPoller} for polling of an attestation resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, AttestationInner> beginCreateOrUpdateAtResource( @@ -2069,7 +2079,7 @@ public SyncPoller, AttestationInner> beginCreateOrU * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an attestation resource. + * @return an attestation resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAtResourceAsync( @@ -2089,7 +2099,7 @@ private Mono createOrUpdateAtResourceAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an attestation resource. + * @return an attestation resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAtResourceAsync( @@ -2142,7 +2152,8 @@ public AttestationInner createOrUpdateAtResource( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an existing attestation at resource scope. + * @return an existing attestation at resource scope along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getAtResourceWithResponseAsync(String resourceId, String attestationName) { @@ -2179,7 +2190,8 @@ private Mono> getAtResourceWithResponseAsync(String r * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an existing attestation at resource scope. + * @return an existing attestation at resource scope along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getAtResourceWithResponseAsync( @@ -2212,7 +2224,7 @@ private Mono> getAtResourceWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an existing attestation at resource scope. + * @return an existing attestation at resource scope on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAtResourceAsync(String resourceId, String attestationName) { @@ -2251,7 +2263,7 @@ public AttestationInner getAtResource(String resourceId, String attestationName) * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an existing attestation at resource scope. + * @return an existing attestation at resource scope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getAtResourceWithResponse( @@ -2267,7 +2279,7 @@ public Response getAtResourceWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteAtResourceWithResponseAsync(String resourceId, String attestationName) { @@ -2304,7 +2316,7 @@ private Mono> deleteAtResourceWithResponseAsync(String resourceId * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteAtResourceWithResponseAsync( @@ -2337,7 +2349,7 @@ private Mono> deleteAtResourceWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAtResourceAsync(String resourceId, String attestationName) { @@ -2368,7 +2380,7 @@ public void deleteAtResource(String resourceId, String attestationName) { * @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 {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response deleteAtResourceWithResponse(String resourceId, String attestationName, Context context) { @@ -2382,7 +2394,7 @@ public Response deleteAtResourceWithResponse(String resourceId, String att * @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 list of attestations. + * @return list of attestations along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listForSubscriptionNextSinglePageAsync(String nextLink) { @@ -2419,7 +2431,7 @@ private Mono> listForSubscriptionNextSinglePageA * @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 list of attestations. + * @return list of attestations along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listForSubscriptionNextSinglePageAsync( @@ -2455,7 +2467,7 @@ private Mono> listForSubscriptionNextSinglePageA * @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 list of attestations. + * @return list of attestations along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listForResourceGroupNextSinglePageAsync(String nextLink) { @@ -2492,7 +2504,7 @@ private Mono> listForResourceGroupNextSinglePage * @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 list of attestations. + * @return list of attestations along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listForResourceGroupNextSinglePageAsync( @@ -2528,7 +2540,7 @@ private Mono> listForResourceGroupNextSinglePage * @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 list of attestations. + * @return list of attestations along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listForResourceNextSinglePageAsync(String nextLink) { @@ -2564,7 +2576,7 @@ private Mono> listForResourceNextSinglePageAsync * @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 list of attestations. + * @return list of attestations along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listForResourceNextSinglePageAsync(String nextLink, Context context) { diff --git a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/implementation/OperationsClientImpl.java b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/implementation/OperationsClientImpl.java index 39d095ff4d2c0..1136ac7689e0c 100644 --- a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/implementation/OperationsClientImpl.java +++ b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/implementation/OperationsClientImpl.java @@ -69,7 +69,7 @@ Mono> list( * * @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 list of available operations. + * @return list of available operations along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listWithResponseAsync() { @@ -93,7 +93,7 @@ private Mono> listWithResponseAsync() { * @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 list of available operations. + * @return list of available operations along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listWithResponseAsync(Context context) { @@ -114,7 +114,7 @@ private Mono> listWithResponseAsync(Context * * @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 list of available operations. + * @return list of available operations on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono listAsync() { @@ -148,7 +148,7 @@ public OperationsListResultsInner list() { * @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 list of available operations. + * @return list of available operations along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response listWithResponse(Context context) { diff --git a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/implementation/PolicyEventsClientImpl.java b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/implementation/PolicyEventsClientImpl.java index 000c8e026abb1..355e2c506e6ed 100644 --- a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/implementation/PolicyEventsClientImpl.java +++ b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/implementation/PolicyEventsClientImpl.java @@ -30,6 +30,7 @@ import com.azure.resourcemanager.policyinsights.fluent.PolicyEventsClient; import com.azure.resourcemanager.policyinsights.fluent.models.PolicyEventInner; import com.azure.resourcemanager.policyinsights.models.PolicyEventsQueryResults; +import com.azure.resourcemanager.policyinsights.models.PolicyEventsResourceType; import java.time.OffsetDateTime; import reactor.core.publisher.Mono; @@ -69,7 +70,7 @@ private interface PolicyEventsService { @UnexpectedResponseExceptionType(ManagementException.class) Mono> listQueryResultsForManagementGroup( @HostParam("$host") String endpoint, - @PathParam("policyEventsResource") String policyEventsResource, + @PathParam("policyEventsResource") PolicyEventsResourceType policyEventsResource, @PathParam("managementGroupsNamespace") String managementGroupsNamespace, @PathParam("managementGroupName") String managementGroupName, @QueryParam("api-version") String apiVersion, @@ -92,7 +93,7 @@ Mono> listQueryResultsForManagementGroup( @UnexpectedResponseExceptionType(ManagementException.class) Mono> listQueryResultsForSubscription( @HostParam("$host") String endpoint, - @PathParam("policyEventsResource") String policyEventsResource, + @PathParam("policyEventsResource") PolicyEventsResourceType policyEventsResource, @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @QueryParam("$top") Integer top, @@ -114,7 +115,7 @@ Mono> listQueryResultsForSubscription( @UnexpectedResponseExceptionType(ManagementException.class) Mono> listQueryResultsForResourceGroup( @HostParam("$host") String endpoint, - @PathParam("policyEventsResource") String policyEventsResource, + @PathParam("policyEventsResource") PolicyEventsResourceType policyEventsResource, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, @@ -135,7 +136,7 @@ Mono> listQueryResultsForResourceGroup( @UnexpectedResponseExceptionType(ManagementException.class) Mono> listQueryResultsForResource( @HostParam("$host") String endpoint, - @PathParam("policyEventsResource") String policyEventsResource, + @PathParam("policyEventsResource") PolicyEventsResourceType policyEventsResource, @PathParam(value = "resourceId", encoded = true) String resourceId, @QueryParam("api-version") String apiVersion, @QueryParam("$top") Integer top, @@ -159,7 +160,7 @@ Mono> listQueryResultsForResource( @UnexpectedResponseExceptionType(ManagementException.class) Mono> listQueryResultsForPolicySetDefinition( @HostParam("$host") String endpoint, - @PathParam("policyEventsResource") String policyEventsResource, + @PathParam("policyEventsResource") PolicyEventsResourceType policyEventsResource, @PathParam("subscriptionId") String subscriptionId, @PathParam("authorizationNamespace") String authorizationNamespace, @PathParam("policySetDefinitionName") String policySetDefinitionName, @@ -184,7 +185,7 @@ Mono> listQueryResultsForPolicySetDefinition( @UnexpectedResponseExceptionType(ManagementException.class) Mono> listQueryResultsForPolicyDefinition( @HostParam("$host") String endpoint, - @PathParam("policyEventsResource") String policyEventsResource, + @PathParam("policyEventsResource") PolicyEventsResourceType policyEventsResource, @PathParam("subscriptionId") String subscriptionId, @PathParam("authorizationNamespace") String authorizationNamespace, @PathParam("policyDefinitionName") String policyDefinitionName, @@ -209,7 +210,7 @@ Mono> listQueryResultsForPolicyDefinition( @UnexpectedResponseExceptionType(ManagementException.class) Mono> listQueryResultsForSubscriptionLevelPolicyAssignment( @HostParam("$host") String endpoint, - @PathParam("policyEventsResource") String policyEventsResource, + @PathParam("policyEventsResource") PolicyEventsResourceType policyEventsResource, @PathParam("subscriptionId") String subscriptionId, @PathParam("authorizationNamespace") String authorizationNamespace, @PathParam("policyAssignmentName") String policyAssignmentName, @@ -234,7 +235,7 @@ Mono> listQueryResultsForSubscriptionLevelPol @UnexpectedResponseExceptionType(ManagementException.class) Mono> listQueryResultsForResourceGroupLevelPolicyAssignment( @HostParam("$host") String endpoint, - @PathParam("policyEventsResource") String policyEventsResource, + @PathParam("policyEventsResource") PolicyEventsResourceType policyEventsResource, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("authorizationNamespace") String authorizationNamespace, @@ -262,6 +263,8 @@ Mono> nextLink( /** * Queries policy events for the resources under the management group. * + * @param policyEventsResource The name of the virtual resource under PolicyEvents resource type; only "default" is + * allowed. * @param managementGroupName Management group name. * @param top Maximum number of records to return. * @param orderBy Ordering expression using OData notation. One or more comma-separated column names with an @@ -279,10 +282,11 @@ Mono> nextLink( * @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 query results. + * @return query results along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listQueryResultsForManagementGroupSinglePageAsync( + PolicyEventsResourceType policyEventsResource, String managementGroupName, Integer top, String orderBy, @@ -298,11 +302,14 @@ private Mono> listQueryResultsForManagementGroup new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } + if (policyEventsResource == null) { + return Mono + .error(new IllegalArgumentException("Parameter policyEventsResource is required and cannot be null.")); + } if (managementGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter managementGroupName is required and cannot be null.")); } - final String policyEventsResource = "default"; final String managementGroupsNamespace = "Microsoft.Management"; final String apiVersion = "2019-10-01"; final String accept = "application/json"; @@ -341,6 +348,8 @@ private Mono> listQueryResultsForManagementGroup /** * Queries policy events for the resources under the management group. * + * @param policyEventsResource The name of the virtual resource under PolicyEvents resource type; only "default" is + * allowed. * @param managementGroupName Management group name. * @param top Maximum number of records to return. * @param orderBy Ordering expression using OData notation. One or more comma-separated column names with an @@ -359,10 +368,11 @@ private Mono> listQueryResultsForManagementGroup * @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 query results. + * @return query results along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listQueryResultsForManagementGroupSinglePageAsync( + PolicyEventsResourceType policyEventsResource, String managementGroupName, Integer top, String orderBy, @@ -379,11 +389,14 @@ private Mono> listQueryResultsForManagementGroup new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } + if (policyEventsResource == null) { + return Mono + .error(new IllegalArgumentException("Parameter policyEventsResource is required and cannot be null.")); + } if (managementGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter managementGroupName is required and cannot be null.")); } - final String policyEventsResource = "default"; final String managementGroupsNamespace = "Microsoft.Management"; final String apiVersion = "2019-10-01"; final String accept = "application/json"; @@ -419,6 +432,8 @@ private Mono> listQueryResultsForManagementGroup /** * Queries policy events for the resources under the management group. * + * @param policyEventsResource The name of the virtual resource under PolicyEvents resource type; only "default" is + * allowed. * @param managementGroupName Management group name. * @param top Maximum number of records to return. * @param orderBy Ordering expression using OData notation. One or more comma-separated column names with an @@ -436,10 +451,11 @@ private Mono> listQueryResultsForManagementGroup * @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 query results. + * @return query results as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listQueryResultsForManagementGroupAsync( + PolicyEventsResourceType policyEventsResource, String managementGroupName, Integer top, String orderBy, @@ -452,21 +468,33 @@ private PagedFlux listQueryResultsForManagementGroupAsync( return new PagedFlux<>( () -> listQueryResultsForManagementGroupSinglePageAsync( - managementGroupName, top, orderBy, select, from, to, filter, apply, skipToken), + policyEventsResource, + managementGroupName, + top, + orderBy, + select, + from, + to, + filter, + apply, + skipToken), nextLink -> nextLinkSinglePageAsync(nextLink)); } /** * Queries policy events for the resources under the management group. * + * @param policyEventsResource The name of the virtual resource under PolicyEvents resource type; only "default" is + * allowed. * @param managementGroupName Management group name. * @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 query results. + * @return query results as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listQueryResultsForManagementGroupAsync(String managementGroupName) { + private PagedFlux listQueryResultsForManagementGroupAsync( + PolicyEventsResourceType policyEventsResource, String managementGroupName) { final Integer top = null; final String orderBy = null; final String select = null; @@ -478,13 +506,24 @@ private PagedFlux listQueryResultsForManagementGroupAsync(Stri return new PagedFlux<>( () -> listQueryResultsForManagementGroupSinglePageAsync( - managementGroupName, top, orderBy, select, from, to, filter, apply, skipToken), + policyEventsResource, + managementGroupName, + top, + orderBy, + select, + from, + to, + filter, + apply, + skipToken), nextLink -> nextLinkSinglePageAsync(nextLink)); } /** * Queries policy events for the resources under the management group. * + * @param policyEventsResource The name of the virtual resource under PolicyEvents resource type; only "default" is + * allowed. * @param managementGroupName Management group name. * @param top Maximum number of records to return. * @param orderBy Ordering expression using OData notation. One or more comma-separated column names with an @@ -503,10 +542,11 @@ private PagedFlux listQueryResultsForManagementGroupAsync(Stri * @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 query results. + * @return query results as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listQueryResultsForManagementGroupAsync( + PolicyEventsResourceType policyEventsResource, String managementGroupName, Integer top, String orderBy, @@ -520,21 +560,34 @@ private PagedFlux listQueryResultsForManagementGroupAsync( return new PagedFlux<>( () -> listQueryResultsForManagementGroupSinglePageAsync( - managementGroupName, top, orderBy, select, from, to, filter, apply, skipToken, context), + policyEventsResource, + managementGroupName, + top, + orderBy, + select, + from, + to, + filter, + apply, + skipToken, + context), nextLink -> nextLinkSinglePageAsync(nextLink, context)); } /** * Queries policy events for the resources under the management group. * + * @param policyEventsResource The name of the virtual resource under PolicyEvents resource type; only "default" is + * allowed. * @param managementGroupName Management group name. * @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 query results. + * @return query results as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listQueryResultsForManagementGroup(String managementGroupName) { + public PagedIterable listQueryResultsForManagementGroup( + PolicyEventsResourceType policyEventsResource, String managementGroupName) { final Integer top = null; final String orderBy = null; final String select = null; @@ -545,12 +598,14 @@ public PagedIterable listQueryResultsForManagementGroup(String final String skipToken = null; return new PagedIterable<>( listQueryResultsForManagementGroupAsync( - managementGroupName, top, orderBy, select, from, to, filter, apply, skipToken)); + policyEventsResource, managementGroupName, top, orderBy, select, from, to, filter, apply, skipToken)); } /** * Queries policy events for the resources under the management group. * + * @param policyEventsResource The name of the virtual resource under PolicyEvents resource type; only "default" is + * allowed. * @param managementGroupName Management group name. * @param top Maximum number of records to return. * @param orderBy Ordering expression using OData notation. One or more comma-separated column names with an @@ -569,10 +624,11 @@ public PagedIterable listQueryResultsForManagementGroup(String * @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 query results. + * @return query results as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listQueryResultsForManagementGroup( + PolicyEventsResourceType policyEventsResource, String managementGroupName, Integer top, String orderBy, @@ -585,12 +641,24 @@ public PagedIterable listQueryResultsForManagementGroup( Context context) { return new PagedIterable<>( listQueryResultsForManagementGroupAsync( - managementGroupName, top, orderBy, select, from, to, filter, apply, skipToken, context)); + policyEventsResource, + managementGroupName, + top, + orderBy, + select, + from, + to, + filter, + apply, + skipToken, + context)); } /** * Queries policy events for the resources under the subscription. * + * @param policyEventsResource The name of the virtual resource under PolicyEvents resource type; only "default" is + * allowed. * @param subscriptionId Microsoft Azure subscription ID. * @param top Maximum number of records to return. * @param orderBy Ordering expression using OData notation. One or more comma-separated column names with an @@ -608,10 +676,11 @@ public PagedIterable listQueryResultsForManagementGroup( * @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 query results. + * @return query results along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listQueryResultsForSubscriptionSinglePageAsync( + PolicyEventsResourceType policyEventsResource, String subscriptionId, Integer top, String orderBy, @@ -627,10 +696,13 @@ private Mono> listQueryResultsForSubscriptionSin new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } + if (policyEventsResource == null) { + return Mono + .error(new IllegalArgumentException("Parameter policyEventsResource is required and cannot be null.")); + } if (subscriptionId == null) { return Mono.error(new IllegalArgumentException("Parameter subscriptionId is required and cannot be null.")); } - final String policyEventsResource = "default"; final String apiVersion = "2019-10-01"; final String accept = "application/json"; return FluxUtil @@ -667,6 +739,8 @@ private Mono> listQueryResultsForSubscriptionSin /** * Queries policy events for the resources under the subscription. * + * @param policyEventsResource The name of the virtual resource under PolicyEvents resource type; only "default" is + * allowed. * @param subscriptionId Microsoft Azure subscription ID. * @param top Maximum number of records to return. * @param orderBy Ordering expression using OData notation. One or more comma-separated column names with an @@ -685,10 +759,11 @@ private Mono> listQueryResultsForSubscriptionSin * @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 query results. + * @return query results along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listQueryResultsForSubscriptionSinglePageAsync( + PolicyEventsResourceType policyEventsResource, String subscriptionId, Integer top, String orderBy, @@ -705,10 +780,13 @@ private Mono> listQueryResultsForSubscriptionSin new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } + if (policyEventsResource == null) { + return Mono + .error(new IllegalArgumentException("Parameter policyEventsResource is required and cannot be null.")); + } if (subscriptionId == null) { return Mono.error(new IllegalArgumentException("Parameter subscriptionId is required and cannot be null.")); } - final String policyEventsResource = "default"; final String apiVersion = "2019-10-01"; final String accept = "application/json"; context = this.client.mergeContext(context); @@ -742,6 +820,8 @@ private Mono> listQueryResultsForSubscriptionSin /** * Queries policy events for the resources under the subscription. * + * @param policyEventsResource The name of the virtual resource under PolicyEvents resource type; only "default" is + * allowed. * @param subscriptionId Microsoft Azure subscription ID. * @param top Maximum number of records to return. * @param orderBy Ordering expression using OData notation. One or more comma-separated column names with an @@ -759,10 +839,11 @@ private Mono> listQueryResultsForSubscriptionSin * @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 query results. + * @return query results as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listQueryResultsForSubscriptionAsync( + PolicyEventsResourceType policyEventsResource, String subscriptionId, Integer top, String orderBy, @@ -775,21 +856,24 @@ private PagedFlux listQueryResultsForSubscriptionAsync( return new PagedFlux<>( () -> listQueryResultsForSubscriptionSinglePageAsync( - subscriptionId, top, orderBy, select, from, to, filter, apply, skipToken), + policyEventsResource, subscriptionId, top, orderBy, select, from, to, filter, apply, skipToken), nextLink -> nextLinkSinglePageAsync(nextLink)); } /** * Queries policy events for the resources under the subscription. * + * @param policyEventsResource The name of the virtual resource under PolicyEvents resource type; only "default" is + * allowed. * @param subscriptionId Microsoft Azure subscription ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return query results. + * @return query results as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listQueryResultsForSubscriptionAsync(String subscriptionId) { + private PagedFlux listQueryResultsForSubscriptionAsync( + PolicyEventsResourceType policyEventsResource, String subscriptionId) { final Integer top = null; final String orderBy = null; final String select = null; @@ -801,13 +885,15 @@ private PagedFlux listQueryResultsForSubscriptionAsync(String return new PagedFlux<>( () -> listQueryResultsForSubscriptionSinglePageAsync( - subscriptionId, top, orderBy, select, from, to, filter, apply, skipToken), + policyEventsResource, subscriptionId, top, orderBy, select, from, to, filter, apply, skipToken), nextLink -> nextLinkSinglePageAsync(nextLink)); } /** * Queries policy events for the resources under the subscription. * + * @param policyEventsResource The name of the virtual resource under PolicyEvents resource type; only "default" is + * allowed. * @param subscriptionId Microsoft Azure subscription ID. * @param top Maximum number of records to return. * @param orderBy Ordering expression using OData notation. One or more comma-separated column names with an @@ -826,10 +912,11 @@ private PagedFlux listQueryResultsForSubscriptionAsync(String * @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 query results. + * @return query results as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listQueryResultsForSubscriptionAsync( + PolicyEventsResourceType policyEventsResource, String subscriptionId, Integer top, String orderBy, @@ -843,21 +930,34 @@ private PagedFlux listQueryResultsForSubscriptionAsync( return new PagedFlux<>( () -> listQueryResultsForSubscriptionSinglePageAsync( - subscriptionId, top, orderBy, select, from, to, filter, apply, skipToken, context), + policyEventsResource, + subscriptionId, + top, + orderBy, + select, + from, + to, + filter, + apply, + skipToken, + context), nextLink -> nextLinkSinglePageAsync(nextLink, context)); } /** * Queries policy events for the resources under the subscription. * + * @param policyEventsResource The name of the virtual resource under PolicyEvents resource type; only "default" is + * allowed. * @param subscriptionId Microsoft Azure subscription ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return query results. + * @return query results as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listQueryResultsForSubscription(String subscriptionId) { + public PagedIterable listQueryResultsForSubscription( + PolicyEventsResourceType policyEventsResource, String subscriptionId) { final Integer top = null; final String orderBy = null; final String select = null; @@ -868,12 +968,14 @@ public PagedIterable listQueryResultsForSubscription(String su final String skipToken = null; return new PagedIterable<>( listQueryResultsForSubscriptionAsync( - subscriptionId, top, orderBy, select, from, to, filter, apply, skipToken)); + policyEventsResource, subscriptionId, top, orderBy, select, from, to, filter, apply, skipToken)); } /** * Queries policy events for the resources under the subscription. * + * @param policyEventsResource The name of the virtual resource under PolicyEvents resource type; only "default" is + * allowed. * @param subscriptionId Microsoft Azure subscription ID. * @param top Maximum number of records to return. * @param orderBy Ordering expression using OData notation. One or more comma-separated column names with an @@ -892,10 +994,11 @@ public PagedIterable listQueryResultsForSubscription(String su * @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 query results. + * @return query results as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listQueryResultsForSubscription( + PolicyEventsResourceType policyEventsResource, String subscriptionId, Integer top, String orderBy, @@ -908,12 +1011,24 @@ public PagedIterable listQueryResultsForSubscription( Context context) { return new PagedIterable<>( listQueryResultsForSubscriptionAsync( - subscriptionId, top, orderBy, select, from, to, filter, apply, skipToken, context)); + policyEventsResource, + subscriptionId, + top, + orderBy, + select, + from, + to, + filter, + apply, + skipToken, + context)); } /** * Queries policy events for the resources under the resource group. * + * @param policyEventsResource The name of the virtual resource under PolicyEvents resource type; only "default" is + * allowed. * @param subscriptionId Microsoft Azure subscription ID. * @param resourceGroupName Resource group name. * @param top Maximum number of records to return. @@ -932,10 +1047,11 @@ public PagedIterable listQueryResultsForSubscription( * @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 query results. + * @return query results along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listQueryResultsForResourceGroupSinglePageAsync( + PolicyEventsResourceType policyEventsResource, String subscriptionId, String resourceGroupName, Integer top, @@ -952,6 +1068,10 @@ private Mono> listQueryResultsForResourceGroupSi new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } + if (policyEventsResource == null) { + return Mono + .error(new IllegalArgumentException("Parameter policyEventsResource is required and cannot be null.")); + } if (subscriptionId == null) { return Mono.error(new IllegalArgumentException("Parameter subscriptionId is required and cannot be null.")); } @@ -959,7 +1079,6 @@ private Mono> listQueryResultsForResourceGroupSi return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } - final String policyEventsResource = "default"; final String apiVersion = "2019-10-01"; final String accept = "application/json"; return FluxUtil @@ -997,6 +1116,8 @@ private Mono> listQueryResultsForResourceGroupSi /** * Queries policy events for the resources under the resource group. * + * @param policyEventsResource The name of the virtual resource under PolicyEvents resource type; only "default" is + * allowed. * @param subscriptionId Microsoft Azure subscription ID. * @param resourceGroupName Resource group name. * @param top Maximum number of records to return. @@ -1016,10 +1137,11 @@ private Mono> listQueryResultsForResourceGroupSi * @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 query results. + * @return query results along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listQueryResultsForResourceGroupSinglePageAsync( + PolicyEventsResourceType policyEventsResource, String subscriptionId, String resourceGroupName, Integer top, @@ -1037,6 +1159,10 @@ private Mono> listQueryResultsForResourceGroupSi new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } + if (policyEventsResource == null) { + return Mono + .error(new IllegalArgumentException("Parameter policyEventsResource is required and cannot be null.")); + } if (subscriptionId == null) { return Mono.error(new IllegalArgumentException("Parameter subscriptionId is required and cannot be null.")); } @@ -1044,7 +1170,6 @@ private Mono> listQueryResultsForResourceGroupSi return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } - final String policyEventsResource = "default"; final String apiVersion = "2019-10-01"; final String accept = "application/json"; context = this.client.mergeContext(context); @@ -1079,6 +1204,8 @@ private Mono> listQueryResultsForResourceGroupSi /** * Queries policy events for the resources under the resource group. * + * @param policyEventsResource The name of the virtual resource under PolicyEvents resource type; only "default" is + * allowed. * @param subscriptionId Microsoft Azure subscription ID. * @param resourceGroupName Resource group name. * @param top Maximum number of records to return. @@ -1097,10 +1224,11 @@ private Mono> listQueryResultsForResourceGroupSi * @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 query results. + * @return query results as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listQueryResultsForResourceGroupAsync( + PolicyEventsResourceType policyEventsResource, String subscriptionId, String resourceGroupName, Integer top, @@ -1114,23 +1242,35 @@ private PagedFlux listQueryResultsForResourceGroupAsync( return new PagedFlux<>( () -> listQueryResultsForResourceGroupSinglePageAsync( - subscriptionId, resourceGroupName, top, orderBy, select, from, to, filter, apply, skipToken), + policyEventsResource, + subscriptionId, + resourceGroupName, + top, + orderBy, + select, + from, + to, + filter, + apply, + skipToken), nextLink -> nextLinkSinglePageAsync(nextLink)); } /** * Queries policy events for the resources under the resource group. * + * @param policyEventsResource The name of the virtual resource under PolicyEvents resource type; only "default" is + * allowed. * @param subscriptionId Microsoft Azure subscription ID. * @param resourceGroupName Resource group name. * @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 query results. + * @return query results as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listQueryResultsForResourceGroupAsync( - String subscriptionId, String resourceGroupName) { + PolicyEventsResourceType policyEventsResource, String subscriptionId, String resourceGroupName) { final Integer top = null; final String orderBy = null; final String select = null; @@ -1142,13 +1282,25 @@ private PagedFlux listQueryResultsForResourceGroupAsync( return new PagedFlux<>( () -> listQueryResultsForResourceGroupSinglePageAsync( - subscriptionId, resourceGroupName, top, orderBy, select, from, to, filter, apply, skipToken), + policyEventsResource, + subscriptionId, + resourceGroupName, + top, + orderBy, + select, + from, + to, + filter, + apply, + skipToken), nextLink -> nextLinkSinglePageAsync(nextLink)); } /** * Queries policy events for the resources under the resource group. * + * @param policyEventsResource The name of the virtual resource under PolicyEvents resource type; only "default" is + * allowed. * @param subscriptionId Microsoft Azure subscription ID. * @param resourceGroupName Resource group name. * @param top Maximum number of records to return. @@ -1168,10 +1320,11 @@ private PagedFlux listQueryResultsForResourceGroupAsync( * @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 query results. + * @return query results as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listQueryResultsForResourceGroupAsync( + PolicyEventsResourceType policyEventsResource, String subscriptionId, String resourceGroupName, Integer top, @@ -1186,6 +1339,7 @@ private PagedFlux listQueryResultsForResourceGroupAsync( return new PagedFlux<>( () -> listQueryResultsForResourceGroupSinglePageAsync( + policyEventsResource, subscriptionId, resourceGroupName, top, @@ -1203,16 +1357,18 @@ private PagedFlux listQueryResultsForResourceGroupAsync( /** * Queries policy events for the resources under the resource group. * + * @param policyEventsResource The name of the virtual resource under PolicyEvents resource type; only "default" is + * allowed. * @param subscriptionId Microsoft Azure subscription ID. * @param resourceGroupName Resource group name. * @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 query results. + * @return query results as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listQueryResultsForResourceGroup( - String subscriptionId, String resourceGroupName) { + PolicyEventsResourceType policyEventsResource, String subscriptionId, String resourceGroupName) { final Integer top = null; final String orderBy = null; final String select = null; @@ -1223,12 +1379,24 @@ public PagedIterable listQueryResultsForResourceGroup( final String skipToken = null; return new PagedIterable<>( listQueryResultsForResourceGroupAsync( - subscriptionId, resourceGroupName, top, orderBy, select, from, to, filter, apply, skipToken)); + policyEventsResource, + subscriptionId, + resourceGroupName, + top, + orderBy, + select, + from, + to, + filter, + apply, + skipToken)); } /** * Queries policy events for the resources under the resource group. * + * @param policyEventsResource The name of the virtual resource under PolicyEvents resource type; only "default" is + * allowed. * @param subscriptionId Microsoft Azure subscription ID. * @param resourceGroupName Resource group name. * @param top Maximum number of records to return. @@ -1248,10 +1416,11 @@ public PagedIterable listQueryResultsForResourceGroup( * @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 query results. + * @return query results as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listQueryResultsForResourceGroup( + PolicyEventsResourceType policyEventsResource, String subscriptionId, String resourceGroupName, Integer top, @@ -1265,12 +1434,25 @@ public PagedIterable listQueryResultsForResourceGroup( Context context) { return new PagedIterable<>( listQueryResultsForResourceGroupAsync( - subscriptionId, resourceGroupName, top, orderBy, select, from, to, filter, apply, skipToken, context)); + policyEventsResource, + subscriptionId, + resourceGroupName, + top, + orderBy, + select, + from, + to, + filter, + apply, + skipToken, + context)); } /** * Queries policy events for the resource. * + * @param policyEventsResource The name of the virtual resource under PolicyEvents resource type; only "default" is + * allowed. * @param resourceId Resource ID. * @param top Maximum number of records to return. * @param orderBy Ordering expression using OData notation. One or more comma-separated column names with an @@ -1289,10 +1471,11 @@ public PagedIterable listQueryResultsForResourceGroup( * @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 query results. + * @return query results along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listQueryResultsForResourceSinglePageAsync( + PolicyEventsResourceType policyEventsResource, String resourceId, Integer top, String orderBy, @@ -1309,10 +1492,13 @@ private Mono> listQueryResultsForResourceSingleP new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } + if (policyEventsResource == null) { + return Mono + .error(new IllegalArgumentException("Parameter policyEventsResource is required and cannot be null.")); + } if (resourceId == null) { return Mono.error(new IllegalArgumentException("Parameter resourceId is required and cannot be null.")); } - final String policyEventsResource = "default"; final String apiVersion = "2019-10-01"; final String accept = "application/json"; return FluxUtil @@ -1350,6 +1536,8 @@ private Mono> listQueryResultsForResourceSingleP /** * Queries policy events for the resource. * + * @param policyEventsResource The name of the virtual resource under PolicyEvents resource type; only "default" is + * allowed. * @param resourceId Resource ID. * @param top Maximum number of records to return. * @param orderBy Ordering expression using OData notation. One or more comma-separated column names with an @@ -1369,10 +1557,11 @@ private Mono> listQueryResultsForResourceSingleP * @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 query results. + * @return query results along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listQueryResultsForResourceSinglePageAsync( + PolicyEventsResourceType policyEventsResource, String resourceId, Integer top, String orderBy, @@ -1390,10 +1579,13 @@ private Mono> listQueryResultsForResourceSingleP new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } + if (policyEventsResource == null) { + return Mono + .error(new IllegalArgumentException("Parameter policyEventsResource is required and cannot be null.")); + } if (resourceId == null) { return Mono.error(new IllegalArgumentException("Parameter resourceId is required and cannot be null.")); } - final String policyEventsResource = "default"; final String apiVersion = "2019-10-01"; final String accept = "application/json"; context = this.client.mergeContext(context); @@ -1428,6 +1620,8 @@ private Mono> listQueryResultsForResourceSingleP /** * Queries policy events for the resource. * + * @param policyEventsResource The name of the virtual resource under PolicyEvents resource type; only "default" is + * allowed. * @param resourceId Resource ID. * @param top Maximum number of records to return. * @param orderBy Ordering expression using OData notation. One or more comma-separated column names with an @@ -1446,10 +1640,11 @@ private Mono> listQueryResultsForResourceSingleP * @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 query results. + * @return query results as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listQueryResultsForResourceAsync( + PolicyEventsResourceType policyEventsResource, String resourceId, Integer top, String orderBy, @@ -1463,21 +1658,24 @@ private PagedFlux listQueryResultsForResourceAsync( return new PagedFlux<>( () -> listQueryResultsForResourceSinglePageAsync( - resourceId, top, orderBy, select, from, to, filter, apply, expand, skipToken), + policyEventsResource, resourceId, top, orderBy, select, from, to, filter, apply, expand, skipToken), nextLink -> nextLinkSinglePageAsync(nextLink)); } /** * Queries policy events for the resource. * + * @param policyEventsResource The name of the virtual resource under PolicyEvents resource type; only "default" is + * allowed. * @param resourceId Resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return query results. + * @return query results as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listQueryResultsForResourceAsync(String resourceId) { + private PagedFlux listQueryResultsForResourceAsync( + PolicyEventsResourceType policyEventsResource, String resourceId) { final Integer top = null; final String orderBy = null; final String select = null; @@ -1490,13 +1688,15 @@ private PagedFlux listQueryResultsForResourceAsync(String reso return new PagedFlux<>( () -> listQueryResultsForResourceSinglePageAsync( - resourceId, top, orderBy, select, from, to, filter, apply, expand, skipToken), + policyEventsResource, resourceId, top, orderBy, select, from, to, filter, apply, expand, skipToken), nextLink -> nextLinkSinglePageAsync(nextLink)); } /** * Queries policy events for the resource. * + * @param policyEventsResource The name of the virtual resource under PolicyEvents resource type; only "default" is + * allowed. * @param resourceId Resource ID. * @param top Maximum number of records to return. * @param orderBy Ordering expression using OData notation. One or more comma-separated column names with an @@ -1516,10 +1716,11 @@ private PagedFlux listQueryResultsForResourceAsync(String reso * @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 query results. + * @return query results as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listQueryResultsForResourceAsync( + PolicyEventsResourceType policyEventsResource, String resourceId, Integer top, String orderBy, @@ -1534,21 +1735,35 @@ private PagedFlux listQueryResultsForResourceAsync( return new PagedFlux<>( () -> listQueryResultsForResourceSinglePageAsync( - resourceId, top, orderBy, select, from, to, filter, apply, expand, skipToken, context), + policyEventsResource, + resourceId, + top, + orderBy, + select, + from, + to, + filter, + apply, + expand, + skipToken, + context), nextLink -> nextLinkSinglePageAsync(nextLink, context)); } /** * Queries policy events for the resource. * + * @param policyEventsResource The name of the virtual resource under PolicyEvents resource type; only "default" is + * allowed. * @param resourceId Resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return query results. + * @return query results as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listQueryResultsForResource(String resourceId) { + public PagedIterable listQueryResultsForResource( + PolicyEventsResourceType policyEventsResource, String resourceId) { final Integer top = null; final String orderBy = null; final String select = null; @@ -1560,12 +1775,14 @@ public PagedIterable listQueryResultsForResource(String resour final String skipToken = null; return new PagedIterable<>( listQueryResultsForResourceAsync( - resourceId, top, orderBy, select, from, to, filter, apply, expand, skipToken)); + policyEventsResource, resourceId, top, orderBy, select, from, to, filter, apply, expand, skipToken)); } /** * Queries policy events for the resource. * + * @param policyEventsResource The name of the virtual resource under PolicyEvents resource type; only "default" is + * allowed. * @param resourceId Resource ID. * @param top Maximum number of records to return. * @param orderBy Ordering expression using OData notation. One or more comma-separated column names with an @@ -1585,10 +1802,11 @@ public PagedIterable listQueryResultsForResource(String resour * @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 query results. + * @return query results as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listQueryResultsForResource( + PolicyEventsResourceType policyEventsResource, String resourceId, Integer top, String orderBy, @@ -1602,12 +1820,25 @@ public PagedIterable listQueryResultsForResource( Context context) { return new PagedIterable<>( listQueryResultsForResourceAsync( - resourceId, top, orderBy, select, from, to, filter, apply, expand, skipToken, context)); + policyEventsResource, + resourceId, + top, + orderBy, + select, + from, + to, + filter, + apply, + expand, + skipToken, + context)); } /** * Queries policy events for the subscription level policy set definition. * + * @param policyEventsResource The name of the virtual resource under PolicyEvents resource type; only "default" is + * allowed. * @param subscriptionId Microsoft Azure subscription ID. * @param policySetDefinitionName Policy set definition name. * @param top Maximum number of records to return. @@ -1626,10 +1857,11 @@ public PagedIterable listQueryResultsForResource( * @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 query results. + * @return query results along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listQueryResultsForPolicySetDefinitionSinglePageAsync( + PolicyEventsResourceType policyEventsResource, String subscriptionId, String policySetDefinitionName, Integer top, @@ -1646,6 +1878,10 @@ private Mono> listQueryResultsForPolicySetDefini new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } + if (policyEventsResource == null) { + return Mono + .error(new IllegalArgumentException("Parameter policyEventsResource is required and cannot be null.")); + } if (subscriptionId == null) { return Mono.error(new IllegalArgumentException("Parameter subscriptionId is required and cannot be null.")); } @@ -1654,7 +1890,6 @@ private Mono> listQueryResultsForPolicySetDefini .error( new IllegalArgumentException("Parameter policySetDefinitionName is required and cannot be null.")); } - final String policyEventsResource = "default"; final String authorizationNamespace = "Microsoft.Authorization"; final String apiVersion = "2019-10-01"; final String accept = "application/json"; @@ -1694,6 +1929,8 @@ private Mono> listQueryResultsForPolicySetDefini /** * Queries policy events for the subscription level policy set definition. * + * @param policyEventsResource The name of the virtual resource under PolicyEvents resource type; only "default" is + * allowed. * @param subscriptionId Microsoft Azure subscription ID. * @param policySetDefinitionName Policy set definition name. * @param top Maximum number of records to return. @@ -1713,10 +1950,11 @@ private Mono> listQueryResultsForPolicySetDefini * @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 query results. + * @return query results along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listQueryResultsForPolicySetDefinitionSinglePageAsync( + PolicyEventsResourceType policyEventsResource, String subscriptionId, String policySetDefinitionName, Integer top, @@ -1734,6 +1972,10 @@ private Mono> listQueryResultsForPolicySetDefini new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } + if (policyEventsResource == null) { + return Mono + .error(new IllegalArgumentException("Parameter policyEventsResource is required and cannot be null.")); + } if (subscriptionId == null) { return Mono.error(new IllegalArgumentException("Parameter subscriptionId is required and cannot be null.")); } @@ -1742,7 +1984,6 @@ private Mono> listQueryResultsForPolicySetDefini .error( new IllegalArgumentException("Parameter policySetDefinitionName is required and cannot be null.")); } - final String policyEventsResource = "default"; final String authorizationNamespace = "Microsoft.Authorization"; final String apiVersion = "2019-10-01"; final String accept = "application/json"; @@ -1779,6 +2020,8 @@ private Mono> listQueryResultsForPolicySetDefini /** * Queries policy events for the subscription level policy set definition. * + * @param policyEventsResource The name of the virtual resource under PolicyEvents resource type; only "default" is + * allowed. * @param subscriptionId Microsoft Azure subscription ID. * @param policySetDefinitionName Policy set definition name. * @param top Maximum number of records to return. @@ -1797,10 +2040,11 @@ private Mono> listQueryResultsForPolicySetDefini * @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 query results. + * @return query results as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listQueryResultsForPolicySetDefinitionAsync( + PolicyEventsResourceType policyEventsResource, String subscriptionId, String policySetDefinitionName, Integer top, @@ -1814,23 +2058,35 @@ private PagedFlux listQueryResultsForPolicySetDefinitionAsync( return new PagedFlux<>( () -> listQueryResultsForPolicySetDefinitionSinglePageAsync( - subscriptionId, policySetDefinitionName, top, orderBy, select, from, to, filter, apply, skipToken), + policyEventsResource, + subscriptionId, + policySetDefinitionName, + top, + orderBy, + select, + from, + to, + filter, + apply, + skipToken), nextLink -> nextLinkSinglePageAsync(nextLink)); } /** * Queries policy events for the subscription level policy set definition. * + * @param policyEventsResource The name of the virtual resource under PolicyEvents resource type; only "default" is + * allowed. * @param subscriptionId Microsoft Azure subscription ID. * @param policySetDefinitionName Policy set definition name. * @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 query results. + * @return query results as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listQueryResultsForPolicySetDefinitionAsync( - String subscriptionId, String policySetDefinitionName) { + PolicyEventsResourceType policyEventsResource, String subscriptionId, String policySetDefinitionName) { final Integer top = null; final String orderBy = null; final String select = null; @@ -1842,13 +2098,25 @@ private PagedFlux listQueryResultsForPolicySetDefinitionAsync( return new PagedFlux<>( () -> listQueryResultsForPolicySetDefinitionSinglePageAsync( - subscriptionId, policySetDefinitionName, top, orderBy, select, from, to, filter, apply, skipToken), + policyEventsResource, + subscriptionId, + policySetDefinitionName, + top, + orderBy, + select, + from, + to, + filter, + apply, + skipToken), nextLink -> nextLinkSinglePageAsync(nextLink)); } /** * Queries policy events for the subscription level policy set definition. * + * @param policyEventsResource The name of the virtual resource under PolicyEvents resource type; only "default" is + * allowed. * @param subscriptionId Microsoft Azure subscription ID. * @param policySetDefinitionName Policy set definition name. * @param top Maximum number of records to return. @@ -1868,10 +2136,11 @@ private PagedFlux listQueryResultsForPolicySetDefinitionAsync( * @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 query results. + * @return query results as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listQueryResultsForPolicySetDefinitionAsync( + PolicyEventsResourceType policyEventsResource, String subscriptionId, String policySetDefinitionName, Integer top, @@ -1886,6 +2155,7 @@ private PagedFlux listQueryResultsForPolicySetDefinitionAsync( return new PagedFlux<>( () -> listQueryResultsForPolicySetDefinitionSinglePageAsync( + policyEventsResource, subscriptionId, policySetDefinitionName, top, @@ -1903,16 +2173,18 @@ private PagedFlux listQueryResultsForPolicySetDefinitionAsync( /** * Queries policy events for the subscription level policy set definition. * + * @param policyEventsResource The name of the virtual resource under PolicyEvents resource type; only "default" is + * allowed. * @param subscriptionId Microsoft Azure subscription ID. * @param policySetDefinitionName Policy set definition name. * @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 query results. + * @return query results as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listQueryResultsForPolicySetDefinition( - String subscriptionId, String policySetDefinitionName) { + PolicyEventsResourceType policyEventsResource, String subscriptionId, String policySetDefinitionName) { final Integer top = null; final String orderBy = null; final String select = null; @@ -1923,12 +2195,24 @@ public PagedIterable listQueryResultsForPolicySetDefinition( final String skipToken = null; return new PagedIterable<>( listQueryResultsForPolicySetDefinitionAsync( - subscriptionId, policySetDefinitionName, top, orderBy, select, from, to, filter, apply, skipToken)); + policyEventsResource, + subscriptionId, + policySetDefinitionName, + top, + orderBy, + select, + from, + to, + filter, + apply, + skipToken)); } /** * Queries policy events for the subscription level policy set definition. * + * @param policyEventsResource The name of the virtual resource under PolicyEvents resource type; only "default" is + * allowed. * @param subscriptionId Microsoft Azure subscription ID. * @param policySetDefinitionName Policy set definition name. * @param top Maximum number of records to return. @@ -1948,10 +2232,11 @@ public PagedIterable listQueryResultsForPolicySetDefinition( * @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 query results. + * @return query results as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listQueryResultsForPolicySetDefinition( + PolicyEventsResourceType policyEventsResource, String subscriptionId, String policySetDefinitionName, Integer top, @@ -1965,6 +2250,7 @@ public PagedIterable listQueryResultsForPolicySetDefinition( Context context) { return new PagedIterable<>( listQueryResultsForPolicySetDefinitionAsync( + policyEventsResource, subscriptionId, policySetDefinitionName, top, @@ -1981,6 +2267,8 @@ public PagedIterable listQueryResultsForPolicySetDefinition( /** * Queries policy events for the subscription level policy definition. * + * @param policyEventsResource The name of the virtual resource under PolicyEvents resource type; only "default" is + * allowed. * @param subscriptionId Microsoft Azure subscription ID. * @param policyDefinitionName Policy definition name. * @param top Maximum number of records to return. @@ -1999,10 +2287,11 @@ public PagedIterable listQueryResultsForPolicySetDefinition( * @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 query results. + * @return query results along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listQueryResultsForPolicyDefinitionSinglePageAsync( + PolicyEventsResourceType policyEventsResource, String subscriptionId, String policyDefinitionName, Integer top, @@ -2019,6 +2308,10 @@ private Mono> listQueryResultsForPolicyDefinitio new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } + if (policyEventsResource == null) { + return Mono + .error(new IllegalArgumentException("Parameter policyEventsResource is required and cannot be null.")); + } if (subscriptionId == null) { return Mono.error(new IllegalArgumentException("Parameter subscriptionId is required and cannot be null.")); } @@ -2026,7 +2319,6 @@ private Mono> listQueryResultsForPolicyDefinitio return Mono .error(new IllegalArgumentException("Parameter policyDefinitionName is required and cannot be null.")); } - final String policyEventsResource = "default"; final String authorizationNamespace = "Microsoft.Authorization"; final String apiVersion = "2019-10-01"; final String accept = "application/json"; @@ -2066,6 +2358,8 @@ private Mono> listQueryResultsForPolicyDefinitio /** * Queries policy events for the subscription level policy definition. * + * @param policyEventsResource The name of the virtual resource under PolicyEvents resource type; only "default" is + * allowed. * @param subscriptionId Microsoft Azure subscription ID. * @param policyDefinitionName Policy definition name. * @param top Maximum number of records to return. @@ -2085,10 +2379,11 @@ private Mono> listQueryResultsForPolicyDefinitio * @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 query results. + * @return query results along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listQueryResultsForPolicyDefinitionSinglePageAsync( + PolicyEventsResourceType policyEventsResource, String subscriptionId, String policyDefinitionName, Integer top, @@ -2106,6 +2401,10 @@ private Mono> listQueryResultsForPolicyDefinitio new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } + if (policyEventsResource == null) { + return Mono + .error(new IllegalArgumentException("Parameter policyEventsResource is required and cannot be null.")); + } if (subscriptionId == null) { return Mono.error(new IllegalArgumentException("Parameter subscriptionId is required and cannot be null.")); } @@ -2113,7 +2412,6 @@ private Mono> listQueryResultsForPolicyDefinitio return Mono .error(new IllegalArgumentException("Parameter policyDefinitionName is required and cannot be null.")); } - final String policyEventsResource = "default"; final String authorizationNamespace = "Microsoft.Authorization"; final String apiVersion = "2019-10-01"; final String accept = "application/json"; @@ -2150,6 +2448,8 @@ private Mono> listQueryResultsForPolicyDefinitio /** * Queries policy events for the subscription level policy definition. * + * @param policyEventsResource The name of the virtual resource under PolicyEvents resource type; only "default" is + * allowed. * @param subscriptionId Microsoft Azure subscription ID. * @param policyDefinitionName Policy definition name. * @param top Maximum number of records to return. @@ -2168,10 +2468,11 @@ private Mono> listQueryResultsForPolicyDefinitio * @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 query results. + * @return query results as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listQueryResultsForPolicyDefinitionAsync( + PolicyEventsResourceType policyEventsResource, String subscriptionId, String policyDefinitionName, Integer top, @@ -2185,23 +2486,35 @@ private PagedFlux listQueryResultsForPolicyDefinitionAsync( return new PagedFlux<>( () -> listQueryResultsForPolicyDefinitionSinglePageAsync( - subscriptionId, policyDefinitionName, top, orderBy, select, from, to, filter, apply, skipToken), + policyEventsResource, + subscriptionId, + policyDefinitionName, + top, + orderBy, + select, + from, + to, + filter, + apply, + skipToken), nextLink -> nextLinkSinglePageAsync(nextLink)); } /** * Queries policy events for the subscription level policy definition. * + * @param policyEventsResource The name of the virtual resource under PolicyEvents resource type; only "default" is + * allowed. * @param subscriptionId Microsoft Azure subscription ID. * @param policyDefinitionName Policy definition name. * @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 query results. + * @return query results as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listQueryResultsForPolicyDefinitionAsync( - String subscriptionId, String policyDefinitionName) { + PolicyEventsResourceType policyEventsResource, String subscriptionId, String policyDefinitionName) { final Integer top = null; final String orderBy = null; final String select = null; @@ -2213,13 +2526,25 @@ private PagedFlux listQueryResultsForPolicyDefinitionAsync( return new PagedFlux<>( () -> listQueryResultsForPolicyDefinitionSinglePageAsync( - subscriptionId, policyDefinitionName, top, orderBy, select, from, to, filter, apply, skipToken), + policyEventsResource, + subscriptionId, + policyDefinitionName, + top, + orderBy, + select, + from, + to, + filter, + apply, + skipToken), nextLink -> nextLinkSinglePageAsync(nextLink)); } /** * Queries policy events for the subscription level policy definition. * + * @param policyEventsResource The name of the virtual resource under PolicyEvents resource type; only "default" is + * allowed. * @param subscriptionId Microsoft Azure subscription ID. * @param policyDefinitionName Policy definition name. * @param top Maximum number of records to return. @@ -2239,10 +2564,11 @@ private PagedFlux listQueryResultsForPolicyDefinitionAsync( * @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 query results. + * @return query results as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listQueryResultsForPolicyDefinitionAsync( + PolicyEventsResourceType policyEventsResource, String subscriptionId, String policyDefinitionName, Integer top, @@ -2257,6 +2583,7 @@ private PagedFlux listQueryResultsForPolicyDefinitionAsync( return new PagedFlux<>( () -> listQueryResultsForPolicyDefinitionSinglePageAsync( + policyEventsResource, subscriptionId, policyDefinitionName, top, @@ -2274,16 +2601,18 @@ private PagedFlux listQueryResultsForPolicyDefinitionAsync( /** * Queries policy events for the subscription level policy definition. * + * @param policyEventsResource The name of the virtual resource under PolicyEvents resource type; only "default" is + * allowed. * @param subscriptionId Microsoft Azure subscription ID. * @param policyDefinitionName Policy definition name. * @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 query results. + * @return query results as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listQueryResultsForPolicyDefinition( - String subscriptionId, String policyDefinitionName) { + PolicyEventsResourceType policyEventsResource, String subscriptionId, String policyDefinitionName) { final Integer top = null; final String orderBy = null; final String select = null; @@ -2294,12 +2623,24 @@ public PagedIterable listQueryResultsForPolicyDefinition( final String skipToken = null; return new PagedIterable<>( listQueryResultsForPolicyDefinitionAsync( - subscriptionId, policyDefinitionName, top, orderBy, select, from, to, filter, apply, skipToken)); + policyEventsResource, + subscriptionId, + policyDefinitionName, + top, + orderBy, + select, + from, + to, + filter, + apply, + skipToken)); } /** * Queries policy events for the subscription level policy definition. * + * @param policyEventsResource The name of the virtual resource under PolicyEvents resource type; only "default" is + * allowed. * @param subscriptionId Microsoft Azure subscription ID. * @param policyDefinitionName Policy definition name. * @param top Maximum number of records to return. @@ -2319,10 +2660,11 @@ public PagedIterable listQueryResultsForPolicyDefinition( * @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 query results. + * @return query results as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listQueryResultsForPolicyDefinition( + PolicyEventsResourceType policyEventsResource, String subscriptionId, String policyDefinitionName, Integer top, @@ -2336,6 +2678,7 @@ public PagedIterable listQueryResultsForPolicyDefinition( Context context) { return new PagedIterable<>( listQueryResultsForPolicyDefinitionAsync( + policyEventsResource, subscriptionId, policyDefinitionName, top, @@ -2352,6 +2695,8 @@ public PagedIterable listQueryResultsForPolicyDefinition( /** * Queries policy events for the subscription level policy assignment. * + * @param policyEventsResource The name of the virtual resource under PolicyEvents resource type; only "default" is + * allowed. * @param subscriptionId Microsoft Azure subscription ID. * @param policyAssignmentName Policy assignment name. * @param top Maximum number of records to return. @@ -2370,10 +2715,11 @@ public PagedIterable listQueryResultsForPolicyDefinition( * @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 query results. + * @return query results along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listQueryResultsForSubscriptionLevelPolicyAssignmentSinglePageAsync( + PolicyEventsResourceType policyEventsResource, String subscriptionId, String policyAssignmentName, Integer top, @@ -2390,6 +2736,10 @@ private Mono> listQueryResultsForSubscriptionLev new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } + if (policyEventsResource == null) { + return Mono + .error(new IllegalArgumentException("Parameter policyEventsResource is required and cannot be null.")); + } if (subscriptionId == null) { return Mono.error(new IllegalArgumentException("Parameter subscriptionId is required and cannot be null.")); } @@ -2397,7 +2747,6 @@ private Mono> listQueryResultsForSubscriptionLev return Mono .error(new IllegalArgumentException("Parameter policyAssignmentName is required and cannot be null.")); } - final String policyEventsResource = "default"; final String authorizationNamespace = "Microsoft.Authorization"; final String apiVersion = "2019-10-01"; final String accept = "application/json"; @@ -2437,6 +2786,8 @@ private Mono> listQueryResultsForSubscriptionLev /** * Queries policy events for the subscription level policy assignment. * + * @param policyEventsResource The name of the virtual resource under PolicyEvents resource type; only "default" is + * allowed. * @param subscriptionId Microsoft Azure subscription ID. * @param policyAssignmentName Policy assignment name. * @param top Maximum number of records to return. @@ -2456,10 +2807,11 @@ private Mono> listQueryResultsForSubscriptionLev * @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 query results. + * @return query results along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listQueryResultsForSubscriptionLevelPolicyAssignmentSinglePageAsync( + PolicyEventsResourceType policyEventsResource, String subscriptionId, String policyAssignmentName, Integer top, @@ -2477,6 +2829,10 @@ private Mono> listQueryResultsForSubscriptionLev new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } + if (policyEventsResource == null) { + return Mono + .error(new IllegalArgumentException("Parameter policyEventsResource is required and cannot be null.")); + } if (subscriptionId == null) { return Mono.error(new IllegalArgumentException("Parameter subscriptionId is required and cannot be null.")); } @@ -2484,7 +2840,6 @@ private Mono> listQueryResultsForSubscriptionLev return Mono .error(new IllegalArgumentException("Parameter policyAssignmentName is required and cannot be null.")); } - final String policyEventsResource = "default"; final String authorizationNamespace = "Microsoft.Authorization"; final String apiVersion = "2019-10-01"; final String accept = "application/json"; @@ -2521,6 +2876,8 @@ private Mono> listQueryResultsForSubscriptionLev /** * Queries policy events for the subscription level policy assignment. * + * @param policyEventsResource The name of the virtual resource under PolicyEvents resource type; only "default" is + * allowed. * @param subscriptionId Microsoft Azure subscription ID. * @param policyAssignmentName Policy assignment name. * @param top Maximum number of records to return. @@ -2539,10 +2896,11 @@ private Mono> listQueryResultsForSubscriptionLev * @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 query results. + * @return query results as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listQueryResultsForSubscriptionLevelPolicyAssignmentAsync( + PolicyEventsResourceType policyEventsResource, String subscriptionId, String policyAssignmentName, Integer top, @@ -2556,23 +2914,35 @@ private PagedFlux listQueryResultsForSubscriptionLevelPolicyAs return new PagedFlux<>( () -> listQueryResultsForSubscriptionLevelPolicyAssignmentSinglePageAsync( - subscriptionId, policyAssignmentName, top, orderBy, select, from, to, filter, apply, skipToken), + policyEventsResource, + subscriptionId, + policyAssignmentName, + top, + orderBy, + select, + from, + to, + filter, + apply, + skipToken), nextLink -> nextLinkSinglePageAsync(nextLink)); } /** * Queries policy events for the subscription level policy assignment. * + * @param policyEventsResource The name of the virtual resource under PolicyEvents resource type; only "default" is + * allowed. * @param subscriptionId Microsoft Azure subscription ID. * @param policyAssignmentName Policy assignment name. * @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 query results. + * @return query results as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listQueryResultsForSubscriptionLevelPolicyAssignmentAsync( - String subscriptionId, String policyAssignmentName) { + PolicyEventsResourceType policyEventsResource, String subscriptionId, String policyAssignmentName) { final Integer top = null; final String orderBy = null; final String select = null; @@ -2584,13 +2954,25 @@ private PagedFlux listQueryResultsForSubscriptionLevelPolicyAs return new PagedFlux<>( () -> listQueryResultsForSubscriptionLevelPolicyAssignmentSinglePageAsync( - subscriptionId, policyAssignmentName, top, orderBy, select, from, to, filter, apply, skipToken), + policyEventsResource, + subscriptionId, + policyAssignmentName, + top, + orderBy, + select, + from, + to, + filter, + apply, + skipToken), nextLink -> nextLinkSinglePageAsync(nextLink)); } /** * Queries policy events for the subscription level policy assignment. * + * @param policyEventsResource The name of the virtual resource under PolicyEvents resource type; only "default" is + * allowed. * @param subscriptionId Microsoft Azure subscription ID. * @param policyAssignmentName Policy assignment name. * @param top Maximum number of records to return. @@ -2610,10 +2992,11 @@ private PagedFlux listQueryResultsForSubscriptionLevelPolicyAs * @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 query results. + * @return query results as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listQueryResultsForSubscriptionLevelPolicyAssignmentAsync( + PolicyEventsResourceType policyEventsResource, String subscriptionId, String policyAssignmentName, Integer top, @@ -2628,6 +3011,7 @@ private PagedFlux listQueryResultsForSubscriptionLevelPolicyAs return new PagedFlux<>( () -> listQueryResultsForSubscriptionLevelPolicyAssignmentSinglePageAsync( + policyEventsResource, subscriptionId, policyAssignmentName, top, @@ -2645,16 +3029,18 @@ private PagedFlux listQueryResultsForSubscriptionLevelPolicyAs /** * Queries policy events for the subscription level policy assignment. * + * @param policyEventsResource The name of the virtual resource under PolicyEvents resource type; only "default" is + * allowed. * @param subscriptionId Microsoft Azure subscription ID. * @param policyAssignmentName Policy assignment name. * @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 query results. + * @return query results as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listQueryResultsForSubscriptionLevelPolicyAssignment( - String subscriptionId, String policyAssignmentName) { + PolicyEventsResourceType policyEventsResource, String subscriptionId, String policyAssignmentName) { final Integer top = null; final String orderBy = null; final String select = null; @@ -2665,12 +3051,24 @@ public PagedIterable listQueryResultsForSubscriptionLevelPolic final String skipToken = null; return new PagedIterable<>( listQueryResultsForSubscriptionLevelPolicyAssignmentAsync( - subscriptionId, policyAssignmentName, top, orderBy, select, from, to, filter, apply, skipToken)); + policyEventsResource, + subscriptionId, + policyAssignmentName, + top, + orderBy, + select, + from, + to, + filter, + apply, + skipToken)); } /** * Queries policy events for the subscription level policy assignment. * + * @param policyEventsResource The name of the virtual resource under PolicyEvents resource type; only "default" is + * allowed. * @param subscriptionId Microsoft Azure subscription ID. * @param policyAssignmentName Policy assignment name. * @param top Maximum number of records to return. @@ -2690,10 +3088,11 @@ public PagedIterable listQueryResultsForSubscriptionLevelPolic * @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 query results. + * @return query results as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listQueryResultsForSubscriptionLevelPolicyAssignment( + PolicyEventsResourceType policyEventsResource, String subscriptionId, String policyAssignmentName, Integer top, @@ -2707,6 +3106,7 @@ public PagedIterable listQueryResultsForSubscriptionLevelPolic Context context) { return new PagedIterable<>( listQueryResultsForSubscriptionLevelPolicyAssignmentAsync( + policyEventsResource, subscriptionId, policyAssignmentName, top, @@ -2723,6 +3123,8 @@ public PagedIterable listQueryResultsForSubscriptionLevelPolic /** * Queries policy events for the resource group level policy assignment. * + * @param policyEventsResource The name of the virtual resource under PolicyEvents resource type; only "default" is + * allowed. * @param subscriptionId Microsoft Azure subscription ID. * @param resourceGroupName Resource group name. * @param policyAssignmentName Policy assignment name. @@ -2742,10 +3144,11 @@ public PagedIterable listQueryResultsForSubscriptionLevelPolic * @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 query results. + * @return query results along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listQueryResultsForResourceGroupLevelPolicyAssignmentSinglePageAsync( + PolicyEventsResourceType policyEventsResource, String subscriptionId, String resourceGroupName, String policyAssignmentName, @@ -2763,6 +3166,10 @@ private Mono> listQueryResultsForResourceGroupLe new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } + if (policyEventsResource == null) { + return Mono + .error(new IllegalArgumentException("Parameter policyEventsResource is required and cannot be null.")); + } if (subscriptionId == null) { return Mono.error(new IllegalArgumentException("Parameter subscriptionId is required and cannot be null.")); } @@ -2774,7 +3181,6 @@ private Mono> listQueryResultsForResourceGroupLe return Mono .error(new IllegalArgumentException("Parameter policyAssignmentName is required and cannot be null.")); } - final String policyEventsResource = "default"; final String authorizationNamespace = "Microsoft.Authorization"; final String apiVersion = "2019-10-01"; final String accept = "application/json"; @@ -2815,6 +3221,8 @@ private Mono> listQueryResultsForResourceGroupLe /** * Queries policy events for the resource group level policy assignment. * + * @param policyEventsResource The name of the virtual resource under PolicyEvents resource type; only "default" is + * allowed. * @param subscriptionId Microsoft Azure subscription ID. * @param resourceGroupName Resource group name. * @param policyAssignmentName Policy assignment name. @@ -2835,10 +3243,11 @@ private Mono> listQueryResultsForResourceGroupLe * @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 query results. + * @return query results along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listQueryResultsForResourceGroupLevelPolicyAssignmentSinglePageAsync( + PolicyEventsResourceType policyEventsResource, String subscriptionId, String resourceGroupName, String policyAssignmentName, @@ -2857,6 +3266,10 @@ private Mono> listQueryResultsForResourceGroupLe new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } + if (policyEventsResource == null) { + return Mono + .error(new IllegalArgumentException("Parameter policyEventsResource is required and cannot be null.")); + } if (subscriptionId == null) { return Mono.error(new IllegalArgumentException("Parameter subscriptionId is required and cannot be null.")); } @@ -2868,7 +3281,6 @@ private Mono> listQueryResultsForResourceGroupLe return Mono .error(new IllegalArgumentException("Parameter policyAssignmentName is required and cannot be null.")); } - final String policyEventsResource = "default"; final String authorizationNamespace = "Microsoft.Authorization"; final String apiVersion = "2019-10-01"; final String accept = "application/json"; @@ -2906,6 +3318,8 @@ private Mono> listQueryResultsForResourceGroupLe /** * Queries policy events for the resource group level policy assignment. * + * @param policyEventsResource The name of the virtual resource under PolicyEvents resource type; only "default" is + * allowed. * @param subscriptionId Microsoft Azure subscription ID. * @param resourceGroupName Resource group name. * @param policyAssignmentName Policy assignment name. @@ -2925,10 +3339,11 @@ private Mono> listQueryResultsForResourceGroupLe * @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 query results. + * @return query results as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listQueryResultsForResourceGroupLevelPolicyAssignmentAsync( + PolicyEventsResourceType policyEventsResource, String subscriptionId, String resourceGroupName, String policyAssignmentName, @@ -2943,6 +3358,7 @@ private PagedFlux listQueryResultsForResourceGroupLevelPolicyA return new PagedFlux<>( () -> listQueryResultsForResourceGroupLevelPolicyAssignmentSinglePageAsync( + policyEventsResource, subscriptionId, resourceGroupName, policyAssignmentName, @@ -2960,17 +3376,22 @@ private PagedFlux listQueryResultsForResourceGroupLevelPolicyA /** * Queries policy events for the resource group level policy assignment. * + * @param policyEventsResource The name of the virtual resource under PolicyEvents resource type; only "default" is + * allowed. * @param subscriptionId Microsoft Azure subscription ID. * @param resourceGroupName Resource group name. * @param policyAssignmentName Policy assignment name. * @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 query results. + * @return query results as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listQueryResultsForResourceGroupLevelPolicyAssignmentAsync( - String subscriptionId, String resourceGroupName, String policyAssignmentName) { + PolicyEventsResourceType policyEventsResource, + String subscriptionId, + String resourceGroupName, + String policyAssignmentName) { final Integer top = null; final String orderBy = null; final String select = null; @@ -2982,6 +3403,7 @@ private PagedFlux listQueryResultsForResourceGroupLevelPolicyA return new PagedFlux<>( () -> listQueryResultsForResourceGroupLevelPolicyAssignmentSinglePageAsync( + policyEventsResource, subscriptionId, resourceGroupName, policyAssignmentName, @@ -2999,6 +3421,8 @@ private PagedFlux listQueryResultsForResourceGroupLevelPolicyA /** * Queries policy events for the resource group level policy assignment. * + * @param policyEventsResource The name of the virtual resource under PolicyEvents resource type; only "default" is + * allowed. * @param subscriptionId Microsoft Azure subscription ID. * @param resourceGroupName Resource group name. * @param policyAssignmentName Policy assignment name. @@ -3019,10 +3443,11 @@ private PagedFlux listQueryResultsForResourceGroupLevelPolicyA * @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 query results. + * @return query results as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listQueryResultsForResourceGroupLevelPolicyAssignmentAsync( + PolicyEventsResourceType policyEventsResource, String subscriptionId, String resourceGroupName, String policyAssignmentName, @@ -3038,6 +3463,7 @@ private PagedFlux listQueryResultsForResourceGroupLevelPolicyA return new PagedFlux<>( () -> listQueryResultsForResourceGroupLevelPolicyAssignmentSinglePageAsync( + policyEventsResource, subscriptionId, resourceGroupName, policyAssignmentName, @@ -3056,17 +3482,22 @@ private PagedFlux listQueryResultsForResourceGroupLevelPolicyA /** * Queries policy events for the resource group level policy assignment. * + * @param policyEventsResource The name of the virtual resource under PolicyEvents resource type; only "default" is + * allowed. * @param subscriptionId Microsoft Azure subscription ID. * @param resourceGroupName Resource group name. * @param policyAssignmentName Policy assignment name. * @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 query results. + * @return query results as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listQueryResultsForResourceGroupLevelPolicyAssignment( - String subscriptionId, String resourceGroupName, String policyAssignmentName) { + PolicyEventsResourceType policyEventsResource, + String subscriptionId, + String resourceGroupName, + String policyAssignmentName) { final Integer top = null; final String orderBy = null; final String select = null; @@ -3077,6 +3508,7 @@ public PagedIterable listQueryResultsForResourceGroupLevelPoli final String skipToken = null; return new PagedIterable<>( listQueryResultsForResourceGroupLevelPolicyAssignmentAsync( + policyEventsResource, subscriptionId, resourceGroupName, policyAssignmentName, @@ -3093,6 +3525,8 @@ public PagedIterable listQueryResultsForResourceGroupLevelPoli /** * Queries policy events for the resource group level policy assignment. * + * @param policyEventsResource The name of the virtual resource under PolicyEvents resource type; only "default" is + * allowed. * @param subscriptionId Microsoft Azure subscription ID. * @param resourceGroupName Resource group name. * @param policyAssignmentName Policy assignment name. @@ -3113,10 +3547,11 @@ public PagedIterable listQueryResultsForResourceGroupLevelPoli * @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 query results. + * @return query results as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listQueryResultsForResourceGroupLevelPolicyAssignment( + PolicyEventsResourceType policyEventsResource, String subscriptionId, String resourceGroupName, String policyAssignmentName, @@ -3131,6 +3566,7 @@ public PagedIterable listQueryResultsForResourceGroupLevelPoli Context context) { return new PagedIterable<>( listQueryResultsForResourceGroupLevelPolicyAssignmentAsync( + policyEventsResource, subscriptionId, resourceGroupName, policyAssignmentName, @@ -3152,7 +3588,7 @@ public PagedIterable listQueryResultsForResourceGroupLevelPoli * @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 query results. + * @return query results along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> nextLinkSinglePageAsync(String nextLink) { @@ -3181,7 +3617,7 @@ private Mono> nextLinkSinglePageAsync(String nex * @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 query results. + * @return query results along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> nextLinkSinglePageAsync(String nextLink, Context context) { diff --git a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/implementation/PolicyEventsImpl.java b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/implementation/PolicyEventsImpl.java index 6c29f0f188588..c25cb77f2d454 100644 --- a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/implementation/PolicyEventsImpl.java +++ b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/implementation/PolicyEventsImpl.java @@ -11,6 +11,7 @@ import com.azure.resourcemanager.policyinsights.fluent.models.PolicyEventInner; import com.azure.resourcemanager.policyinsights.models.PolicyEvent; import com.azure.resourcemanager.policyinsights.models.PolicyEvents; +import com.azure.resourcemanager.policyinsights.models.PolicyEventsResourceType; import com.fasterxml.jackson.annotation.JsonIgnore; import java.time.OffsetDateTime; @@ -27,13 +28,15 @@ public PolicyEventsImpl( this.serviceManager = serviceManager; } - public PagedIterable listQueryResultsForManagementGroup(String managementGroupName) { + public PagedIterable listQueryResultsForManagementGroup( + PolicyEventsResourceType policyEventsResource, String managementGroupName) { PagedIterable inner = - this.serviceClient().listQueryResultsForManagementGroup(managementGroupName); + this.serviceClient().listQueryResultsForManagementGroup(policyEventsResource, managementGroupName); return Utils.mapPage(inner, inner1 -> new PolicyEventImpl(inner1, this.manager())); } public PagedIterable listQueryResultsForManagementGroup( + PolicyEventsResourceType policyEventsResource, String managementGroupName, Integer top, String orderBy, @@ -48,16 +51,29 @@ public PagedIterable listQueryResultsForManagementGroup( this .serviceClient() .listQueryResultsForManagementGroup( - managementGroupName, top, orderBy, select, from, to, filter, apply, skipToken, context); + policyEventsResource, + managementGroupName, + top, + orderBy, + select, + from, + to, + filter, + apply, + skipToken, + context); return Utils.mapPage(inner, inner1 -> new PolicyEventImpl(inner1, this.manager())); } - public PagedIterable listQueryResultsForSubscription(String subscriptionId) { - PagedIterable inner = this.serviceClient().listQueryResultsForSubscription(subscriptionId); + public PagedIterable listQueryResultsForSubscription( + PolicyEventsResourceType policyEventsResource, String subscriptionId) { + PagedIterable inner = + this.serviceClient().listQueryResultsForSubscription(policyEventsResource, subscriptionId); return Utils.mapPage(inner, inner1 -> new PolicyEventImpl(inner1, this.manager())); } public PagedIterable listQueryResultsForSubscription( + PolicyEventsResourceType policyEventsResource, String subscriptionId, Integer top, String orderBy, @@ -72,18 +88,31 @@ public PagedIterable listQueryResultsForSubscription( this .serviceClient() .listQueryResultsForSubscription( - subscriptionId, top, orderBy, select, from, to, filter, apply, skipToken, context); + policyEventsResource, + subscriptionId, + top, + orderBy, + select, + from, + to, + filter, + apply, + skipToken, + context); return Utils.mapPage(inner, inner1 -> new PolicyEventImpl(inner1, this.manager())); } public PagedIterable listQueryResultsForResourceGroup( - String subscriptionId, String resourceGroupName) { + PolicyEventsResourceType policyEventsResource, String subscriptionId, String resourceGroupName) { PagedIterable inner = - this.serviceClient().listQueryResultsForResourceGroup(subscriptionId, resourceGroupName); + this + .serviceClient() + .listQueryResultsForResourceGroup(policyEventsResource, subscriptionId, resourceGroupName); return Utils.mapPage(inner, inner1 -> new PolicyEventImpl(inner1, this.manager())); } public PagedIterable listQueryResultsForResourceGroup( + PolicyEventsResourceType policyEventsResource, String subscriptionId, String resourceGroupName, Integer top, @@ -99,6 +128,7 @@ public PagedIterable listQueryResultsForResourceGroup( this .serviceClient() .listQueryResultsForResourceGroup( + policyEventsResource, subscriptionId, resourceGroupName, top, @@ -113,12 +143,15 @@ public PagedIterable listQueryResultsForResourceGroup( return Utils.mapPage(inner, inner1 -> new PolicyEventImpl(inner1, this.manager())); } - public PagedIterable listQueryResultsForResource(String resourceId) { - PagedIterable inner = this.serviceClient().listQueryResultsForResource(resourceId); + public PagedIterable listQueryResultsForResource( + PolicyEventsResourceType policyEventsResource, String resourceId) { + PagedIterable inner = + this.serviceClient().listQueryResultsForResource(policyEventsResource, resourceId); return Utils.mapPage(inner, inner1 -> new PolicyEventImpl(inner1, this.manager())); } public PagedIterable listQueryResultsForResource( + PolicyEventsResourceType policyEventsResource, String resourceId, Integer top, String orderBy, @@ -134,18 +167,32 @@ public PagedIterable listQueryResultsForResource( this .serviceClient() .listQueryResultsForResource( - resourceId, top, orderBy, select, from, to, filter, apply, expand, skipToken, context); + policyEventsResource, + resourceId, + top, + orderBy, + select, + from, + to, + filter, + apply, + expand, + skipToken, + context); return Utils.mapPage(inner, inner1 -> new PolicyEventImpl(inner1, this.manager())); } public PagedIterable listQueryResultsForPolicySetDefinition( - String subscriptionId, String policySetDefinitionName) { + PolicyEventsResourceType policyEventsResource, String subscriptionId, String policySetDefinitionName) { PagedIterable inner = - this.serviceClient().listQueryResultsForPolicySetDefinition(subscriptionId, policySetDefinitionName); + this + .serviceClient() + .listQueryResultsForPolicySetDefinition(policyEventsResource, subscriptionId, policySetDefinitionName); return Utils.mapPage(inner, inner1 -> new PolicyEventImpl(inner1, this.manager())); } public PagedIterable listQueryResultsForPolicySetDefinition( + PolicyEventsResourceType policyEventsResource, String subscriptionId, String policySetDefinitionName, Integer top, @@ -161,6 +208,7 @@ public PagedIterable listQueryResultsForPolicySetDefinition( this .serviceClient() .listQueryResultsForPolicySetDefinition( + policyEventsResource, subscriptionId, policySetDefinitionName, top, @@ -176,13 +224,16 @@ public PagedIterable listQueryResultsForPolicySetDefinition( } public PagedIterable listQueryResultsForPolicyDefinition( - String subscriptionId, String policyDefinitionName) { + PolicyEventsResourceType policyEventsResource, String subscriptionId, String policyDefinitionName) { PagedIterable inner = - this.serviceClient().listQueryResultsForPolicyDefinition(subscriptionId, policyDefinitionName); + this + .serviceClient() + .listQueryResultsForPolicyDefinition(policyEventsResource, subscriptionId, policyDefinitionName); return Utils.mapPage(inner, inner1 -> new PolicyEventImpl(inner1, this.manager())); } public PagedIterable listQueryResultsForPolicyDefinition( + PolicyEventsResourceType policyEventsResource, String subscriptionId, String policyDefinitionName, Integer top, @@ -198,6 +249,7 @@ public PagedIterable listQueryResultsForPolicyDefinition( this .serviceClient() .listQueryResultsForPolicyDefinition( + policyEventsResource, subscriptionId, policyDefinitionName, top, @@ -213,15 +265,17 @@ public PagedIterable listQueryResultsForPolicyDefinition( } public PagedIterable listQueryResultsForSubscriptionLevelPolicyAssignment( - String subscriptionId, String policyAssignmentName) { + PolicyEventsResourceType policyEventsResource, String subscriptionId, String policyAssignmentName) { PagedIterable inner = this .serviceClient() - .listQueryResultsForSubscriptionLevelPolicyAssignment(subscriptionId, policyAssignmentName); + .listQueryResultsForSubscriptionLevelPolicyAssignment( + policyEventsResource, subscriptionId, policyAssignmentName); return Utils.mapPage(inner, inner1 -> new PolicyEventImpl(inner1, this.manager())); } public PagedIterable listQueryResultsForSubscriptionLevelPolicyAssignment( + PolicyEventsResourceType policyEventsResource, String subscriptionId, String policyAssignmentName, Integer top, @@ -237,6 +291,7 @@ public PagedIterable listQueryResultsForSubscriptionLevelPolicyAssi this .serviceClient() .listQueryResultsForSubscriptionLevelPolicyAssignment( + policyEventsResource, subscriptionId, policyAssignmentName, top, @@ -252,16 +307,20 @@ public PagedIterable listQueryResultsForSubscriptionLevelPolicyAssi } public PagedIterable listQueryResultsForResourceGroupLevelPolicyAssignment( - String subscriptionId, String resourceGroupName, String policyAssignmentName) { + PolicyEventsResourceType policyEventsResource, + String subscriptionId, + String resourceGroupName, + String policyAssignmentName) { PagedIterable inner = this .serviceClient() .listQueryResultsForResourceGroupLevelPolicyAssignment( - subscriptionId, resourceGroupName, policyAssignmentName); + policyEventsResource, subscriptionId, resourceGroupName, policyAssignmentName); return Utils.mapPage(inner, inner1 -> new PolicyEventImpl(inner1, this.manager())); } public PagedIterable listQueryResultsForResourceGroupLevelPolicyAssignment( + PolicyEventsResourceType policyEventsResource, String subscriptionId, String resourceGroupName, String policyAssignmentName, @@ -278,6 +337,7 @@ public PagedIterable listQueryResultsForResourceGroupLevelPolicyAss this .serviceClient() .listQueryResultsForResourceGroupLevelPolicyAssignment( + policyEventsResource, subscriptionId, resourceGroupName, policyAssignmentName, diff --git a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/implementation/PolicyMetadatasClientImpl.java b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/implementation/PolicyMetadatasClientImpl.java index 2d2a19c27e150..68d554dfa6031 100644 --- a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/implementation/PolicyMetadatasClientImpl.java +++ b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/implementation/PolicyMetadatasClientImpl.java @@ -100,7 +100,7 @@ Mono> listNext( * @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 policy metadata resource. + * @return policy metadata resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getResourceWithResponseAsync(String resourceName) { @@ -129,7 +129,7 @@ private Mono> getResourceWithResponseAsync(String * @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 policy metadata resource. + * @return policy metadata resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getResourceWithResponseAsync(String resourceName, Context context) { @@ -155,7 +155,7 @@ private Mono> getResourceWithResponseAsync(String * @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 policy metadata resource. + * @return policy metadata resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getResourceAsync(String resourceName) { @@ -192,7 +192,7 @@ public PolicyMetadataInner getResource(String resourceName) { * @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 policy metadata resource. + * @return policy metadata resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getResourceWithResponse(String resourceName, Context context) { @@ -206,7 +206,8 @@ public Response getResourceWithResponse(String resourceName * @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 the policy metadata resources. + * @return a list of the policy metadata resources along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Integer top) { @@ -240,7 +241,8 @@ private Mono> listSinglePageAsync(Integer * @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 the policy metadata resources. + * @return a list of the policy metadata resources along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Integer top, Context context) { @@ -273,7 +275,7 @@ private Mono> listSinglePageAsync(Integer * @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 the policy metadata resources. + * @return a list of the policy metadata resources as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Integer top) { @@ -285,7 +287,7 @@ private PagedFlux listAsync(Integer top) { * * @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 the policy metadata resources. + * @return a list of the policy metadata resources as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { @@ -301,7 +303,7 @@ private PagedFlux listAsync() { * @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 the policy metadata resources. + * @return a list of the policy metadata resources as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Integer top, Context context) { @@ -314,7 +316,7 @@ private PagedFlux listAsync(Integer top, Context contex * * @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 the policy metadata resources. + * @return a list of the policy metadata resources as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { @@ -330,7 +332,7 @@ public PagedIterable list() { * @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 the policy metadata resources. + * @return a list of the policy metadata resources as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Integer top, Context context) { @@ -344,7 +346,8 @@ public PagedIterable list(Integer top, 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 collection of policy metadata resources. + * @return collection of policy metadata resources along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -380,7 +383,8 @@ private Mono> listNextSinglePageAsync(Str * @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 collection of policy metadata resources. + * @return collection of policy metadata resources along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { diff --git a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/implementation/PolicyRestrictionsClientImpl.java b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/implementation/PolicyRestrictionsClientImpl.java index a072a599a08aa..63179c6660492 100644 --- a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/implementation/PolicyRestrictionsClientImpl.java +++ b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/implementation/PolicyRestrictionsClientImpl.java @@ -91,7 +91,8 @@ Mono> checkAtResourceGroupScope( * @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 result of a check policy restrictions evaluation on a resource. + * @return the result of a check policy restrictions evaluation on a resource along with {@link Response} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> checkAtSubscriptionScopeWithResponseAsync( @@ -137,7 +138,8 @@ private Mono> checkAtSubscriptionScopeWit * @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 result of a check policy restrictions evaluation on a resource. + * @return the result of a check policy restrictions evaluation on a resource along with {@link Response} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> checkAtSubscriptionScopeWithResponseAsync( @@ -174,7 +176,8 @@ private Mono> checkAtSubscriptionScopeWit * @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 result of a check policy restrictions evaluation on a resource. + * @return the result of a check policy restrictions evaluation on a resource on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono checkAtSubscriptionScopeAsync(CheckRestrictionsRequest parameters) { @@ -211,7 +214,7 @@ public CheckRestrictionsResultInner checkAtSubscriptionScope(CheckRestrictionsRe * @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 result of a check policy restrictions evaluation on a resource. + * @return the result of a check policy restrictions evaluation on a resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response checkAtSubscriptionScopeWithResponse( @@ -228,7 +231,8 @@ public Response checkAtSubscriptionScopeWithRespon * @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 result of a check policy restrictions evaluation on a resource. + * @return the result of a check policy restrictions evaluation on a resource along with {@link Response} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> checkAtResourceGroupScopeWithResponseAsync( @@ -281,7 +285,8 @@ private Mono> checkAtResourceGroupScopeWi * @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 result of a check policy restrictions evaluation on a resource. + * @return the result of a check policy restrictions evaluation on a resource along with {@link Response} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> checkAtResourceGroupScopeWithResponseAsync( @@ -330,7 +335,8 @@ private Mono> checkAtResourceGroupScopeWi * @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 result of a check policy restrictions evaluation on a resource. + * @return the result of a check policy restrictions evaluation on a resource on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono checkAtResourceGroupScopeAsync( @@ -373,7 +379,7 @@ public CheckRestrictionsResultInner checkAtResourceGroupScope( * @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 result of a check policy restrictions evaluation on a resource. + * @return the result of a check policy restrictions evaluation on a resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response checkAtResourceGroupScopeWithResponse( diff --git a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/implementation/PolicyStatesClientImpl.java b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/implementation/PolicyStatesClientImpl.java index af1660f69c5ae..24710001920ad 100644 --- a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/implementation/PolicyStatesClientImpl.java +++ b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/implementation/PolicyStatesClientImpl.java @@ -35,6 +35,7 @@ import com.azure.resourcemanager.policyinsights.fluent.models.SummarizeResultsInner; import com.azure.resourcemanager.policyinsights.models.PolicyStatesQueryResults; import com.azure.resourcemanager.policyinsights.models.PolicyStatesResource; +import com.azure.resourcemanager.policyinsights.models.PolicyStatesSummaryResourceType; import java.nio.ByteBuffer; import java.time.OffsetDateTime; import reactor.core.publisher.Flux; @@ -99,7 +100,7 @@ Mono> listQueryResultsForManagementGroup( @UnexpectedResponseExceptionType(ManagementException.class) Mono> summarizeForManagementGroup( @HostParam("$host") String endpoint, - @PathParam("policyStatesSummaryResource") String policyStatesSummaryResource, + @PathParam("policyStatesSummaryResource") PolicyStatesSummaryResourceType policyStatesSummaryResource, @PathParam("managementGroupsNamespace") String managementGroupsNamespace, @PathParam("managementGroupName") String managementGroupName, @QueryParam("api-version") String apiVersion, @@ -140,7 +141,7 @@ Mono> listQueryResultsForSubscription( @UnexpectedResponseExceptionType(ManagementException.class) Mono> summarizeForSubscription( @HostParam("$host") String endpoint, - @PathParam("policyStatesSummaryResource") String policyStatesSummaryResource, + @PathParam("policyStatesSummaryResource") PolicyStatesSummaryResourceType policyStatesSummaryResource, @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @QueryParam("$top") Integer top, @@ -181,7 +182,7 @@ Mono> listQueryResultsForResourceGroup( @UnexpectedResponseExceptionType(ManagementException.class) Mono> summarizeForResourceGroup( @HostParam("$host") String endpoint, - @PathParam("policyStatesSummaryResource") String policyStatesSummaryResource, + @PathParam("policyStatesSummaryResource") PolicyStatesSummaryResourceType policyStatesSummaryResource, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, @@ -219,7 +220,7 @@ Mono> listQueryResultsForResource( @UnexpectedResponseExceptionType(ManagementException.class) Mono> summarizeForResource( @HostParam("$host") String endpoint, - @PathParam("policyStatesSummaryResource") String policyStatesSummaryResource, + @PathParam("policyStatesSummaryResource") PolicyStatesSummaryResourceType policyStatesSummaryResource, @PathParam(value = "resourceId", encoded = true) String resourceId, @QueryParam("api-version") String apiVersion, @QueryParam("$top") Integer top, @@ -289,7 +290,7 @@ Mono> listQueryResultsForPolicySetDefinition( @UnexpectedResponseExceptionType(ManagementException.class) Mono> summarizeForPolicySetDefinition( @HostParam("$host") String endpoint, - @PathParam("policyStatesSummaryResource") String policyStatesSummaryResource, + @PathParam("policyStatesSummaryResource") PolicyStatesSummaryResourceType policyStatesSummaryResource, @PathParam("subscriptionId") String subscriptionId, @PathParam("authorizationNamespace") String authorizationNamespace, @PathParam("policySetDefinitionName") String policySetDefinitionName, @@ -335,7 +336,7 @@ Mono> listQueryResultsForPolicyDefinition( @UnexpectedResponseExceptionType(ManagementException.class) Mono> summarizeForPolicyDefinition( @HostParam("$host") String endpoint, - @PathParam("policyStatesSummaryResource") String policyStatesSummaryResource, + @PathParam("policyStatesSummaryResource") PolicyStatesSummaryResourceType policyStatesSummaryResource, @PathParam("subscriptionId") String subscriptionId, @PathParam("authorizationNamespace") String authorizationNamespace, @PathParam("policyDefinitionName") String policyDefinitionName, @@ -381,7 +382,7 @@ Mono> listQueryResultsForSubscriptionLevelPol @UnexpectedResponseExceptionType(ManagementException.class) Mono> summarizeForSubscriptionLevelPolicyAssignment( @HostParam("$host") String endpoint, - @PathParam("policyStatesSummaryResource") String policyStatesSummaryResource, + @PathParam("policyStatesSummaryResource") PolicyStatesSummaryResourceType policyStatesSummaryResource, @PathParam("subscriptionId") String subscriptionId, @PathParam("authorizationNamespace") String authorizationNamespace, @PathParam("policyAssignmentName") String policyAssignmentName, @@ -428,7 +429,7 @@ Mono> listQueryResultsForResourceGroupLevelPo @UnexpectedResponseExceptionType(ManagementException.class) Mono> summarizeForResourceGroupLevelPolicyAssignment( @HostParam("$host") String endpoint, - @PathParam("policyStatesSummaryResource") String policyStatesSummaryResource, + @PathParam("policyStatesSummaryResource") PolicyStatesSummaryResourceType policyStatesSummaryResource, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("authorizationNamespace") String authorizationNamespace, @@ -471,7 +472,7 @@ Mono> nextLink( * @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 query results. + * @return query results along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listQueryResultsForManagementGroupSinglePageAsync( @@ -557,7 +558,7 @@ private Mono> listQueryResultsForManagementGroup * @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 query results. + * @return query results along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listQueryResultsForManagementGroupSinglePageAsync( @@ -640,7 +641,7 @@ private Mono> listQueryResultsForManagementGroup * @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 query results. + * @return query results as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listQueryResultsForManagementGroupAsync( @@ -679,7 +680,7 @@ private PagedFlux listQueryResultsForManagementGroupAsync( * @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 query results. + * @return query results as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listQueryResultsForManagementGroupAsync( @@ -731,7 +732,7 @@ private PagedFlux listQueryResultsForManagementGroupAsync( * @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 query results. + * @return query results as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listQueryResultsForManagementGroupAsync( @@ -772,7 +773,7 @@ private PagedFlux listQueryResultsForManagementGroupAsync( * @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 query results. + * @return query results as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listQueryResultsForManagementGroup( @@ -813,7 +814,7 @@ public PagedIterable listQueryResultsForManagementGroup( * @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 query results. + * @return query results as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listQueryResultsForManagementGroup( @@ -846,6 +847,8 @@ public PagedIterable listQueryResultsForManagementGroup( /** * Summarizes policy states for the resources under the management group. * + * @param policyStatesSummaryResource The virtual resource under PolicyStates resource type for summarize action. In + * a given time range, 'latest' represents the latest policy state(s) and is the only allowed value. * @param managementGroupName Management group name. * @param top Maximum number of records to return. * @param from ISO 8601 formatted timestamp specifying the start time of the interval to query. When not specified, @@ -856,22 +859,32 @@ public PagedIterable listQueryResultsForManagementGroup( * @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 summarize action results. + * @return summarize action results along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> summarizeForManagementGroupWithResponseAsync( - String managementGroupName, Integer top, OffsetDateTime from, OffsetDateTime to, String filter) { + PolicyStatesSummaryResourceType policyStatesSummaryResource, + String managementGroupName, + Integer top, + OffsetDateTime from, + OffsetDateTime to, + String filter) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } + if (policyStatesSummaryResource == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter policyStatesSummaryResource is required and cannot be null.")); + } if (managementGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter managementGroupName is required and cannot be null.")); } - final String policyStatesSummaryResource = "latest"; final String managementGroupsNamespace = "Microsoft.Management"; final String apiVersion = "2019-10-01"; final String accept = "application/json"; @@ -897,6 +910,8 @@ private Mono> summarizeForManagementGroupWithRes /** * Summarizes policy states for the resources under the management group. * + * @param policyStatesSummaryResource The virtual resource under PolicyStates resource type for summarize action. In + * a given time range, 'latest' represents the latest policy state(s) and is the only allowed value. * @param managementGroupName Management group name. * @param top Maximum number of records to return. * @param from ISO 8601 formatted timestamp specifying the start time of the interval to query. When not specified, @@ -908,10 +923,11 @@ private Mono> summarizeForManagementGroupWithRes * @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 summarize action results. + * @return summarize action results along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> summarizeForManagementGroupWithResponseAsync( + PolicyStatesSummaryResourceType policyStatesSummaryResource, String managementGroupName, Integer top, OffsetDateTime from, @@ -924,11 +940,16 @@ private Mono> summarizeForManagementGroupWithRes new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } + if (policyStatesSummaryResource == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter policyStatesSummaryResource is required and cannot be null.")); + } if (managementGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter managementGroupName is required and cannot be null.")); } - final String policyStatesSummaryResource = "latest"; final String managementGroupsNamespace = "Microsoft.Management"; final String apiVersion = "2019-10-01"; final String accept = "application/json"; @@ -951,6 +972,8 @@ private Mono> summarizeForManagementGroupWithRes /** * Summarizes policy states for the resources under the management group. * + * @param policyStatesSummaryResource The virtual resource under PolicyStates resource type for summarize action. In + * a given time range, 'latest' represents the latest policy state(s) and is the only allowed value. * @param managementGroupName Management group name. * @param top Maximum number of records to return. * @param from ISO 8601 formatted timestamp specifying the start time of the interval to query. When not specified, @@ -961,12 +984,18 @@ private Mono> summarizeForManagementGroupWithRes * @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 summarize action results. + * @return summarize action results on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono summarizeForManagementGroupAsync( - String managementGroupName, Integer top, OffsetDateTime from, OffsetDateTime to, String filter) { - return summarizeForManagementGroupWithResponseAsync(managementGroupName, top, from, to, filter) + PolicyStatesSummaryResourceType policyStatesSummaryResource, + String managementGroupName, + Integer top, + OffsetDateTime from, + OffsetDateTime to, + String filter) { + return summarizeForManagementGroupWithResponseAsync( + policyStatesSummaryResource, managementGroupName, top, from, to, filter) .flatMap( (Response res) -> { if (res.getValue() != null) { @@ -980,19 +1009,23 @@ private Mono summarizeForManagementGroupAsync( /** * Summarizes policy states for the resources under the management group. * + * @param policyStatesSummaryResource The virtual resource under PolicyStates resource type for summarize action. In + * a given time range, 'latest' represents the latest policy state(s) and is the only allowed value. * @param managementGroupName Management group name. * @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 summarize action results. + * @return summarize action results on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono summarizeForManagementGroupAsync(String managementGroupName) { + private Mono summarizeForManagementGroupAsync( + PolicyStatesSummaryResourceType policyStatesSummaryResource, String managementGroupName) { final Integer top = null; final OffsetDateTime from = null; final OffsetDateTime to = null; final String filter = null; - return summarizeForManagementGroupWithResponseAsync(managementGroupName, top, from, to, filter) + return summarizeForManagementGroupWithResponseAsync( + policyStatesSummaryResource, managementGroupName, top, from, to, filter) .flatMap( (Response res) -> { if (res.getValue() != null) { @@ -1006,6 +1039,8 @@ private Mono summarizeForManagementGroupAsync(String mana /** * Summarizes policy states for the resources under the management group. * + * @param policyStatesSummaryResource The virtual resource under PolicyStates resource type for summarize action. In + * a given time range, 'latest' represents the latest policy state(s) and is the only allowed value. * @param managementGroupName Management group name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1013,17 +1048,21 @@ private Mono summarizeForManagementGroupAsync(String mana * @return summarize action results. */ @ServiceMethod(returns = ReturnType.SINGLE) - public SummarizeResultsInner summarizeForManagementGroup(String managementGroupName) { + public SummarizeResultsInner summarizeForManagementGroup( + PolicyStatesSummaryResourceType policyStatesSummaryResource, String managementGroupName) { final Integer top = null; final OffsetDateTime from = null; final OffsetDateTime to = null; final String filter = null; - return summarizeForManagementGroupAsync(managementGroupName, top, from, to, filter).block(); + return summarizeForManagementGroupAsync(policyStatesSummaryResource, managementGroupName, top, from, to, filter) + .block(); } /** * Summarizes policy states for the resources under the management group. * + * @param policyStatesSummaryResource The virtual resource under PolicyStates resource type for summarize action. In + * a given time range, 'latest' represents the latest policy state(s) and is the only allowed value. * @param managementGroupName Management group name. * @param top Maximum number of records to return. * @param from ISO 8601 formatted timestamp specifying the start time of the interval to query. When not specified, @@ -1035,17 +1074,19 @@ public SummarizeResultsInner summarizeForManagementGroup(String managementGroupN * @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 summarize action results. + * @return summarize action results along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response summarizeForManagementGroupWithResponse( + PolicyStatesSummaryResourceType policyStatesSummaryResource, String managementGroupName, Integer top, OffsetDateTime from, OffsetDateTime to, String filter, Context context) { - return summarizeForManagementGroupWithResponseAsync(managementGroupName, top, from, to, filter, context) + return summarizeForManagementGroupWithResponseAsync( + policyStatesSummaryResource, managementGroupName, top, from, to, filter, context) .block(); } @@ -1071,7 +1112,7 @@ public Response summarizeForManagementGroupWithResponse( * @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 query results. + * @return query results along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listQueryResultsForSubscriptionSinglePageAsync( @@ -1154,7 +1195,7 @@ private Mono> listQueryResultsForSubscriptionSin * @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 query results. + * @return query results along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listQueryResultsForSubscriptionSinglePageAsync( @@ -1234,7 +1275,7 @@ private Mono> listQueryResultsForSubscriptionSin * @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 query results. + * @return query results as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listQueryResultsForSubscriptionAsync( @@ -1264,7 +1305,7 @@ private PagedFlux listQueryResultsForSubscriptionAsync( * @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 query results. + * @return query results as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listQueryResultsForSubscriptionAsync( @@ -1307,7 +1348,7 @@ private PagedFlux listQueryResultsForSubscriptionAsync( * @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 query results. + * @return query results as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listQueryResultsForSubscriptionAsync( @@ -1348,7 +1389,7 @@ private PagedFlux listQueryResultsForSubscriptionAsync( * @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 query results. + * @return query results as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listQueryResultsForSubscription( @@ -1389,7 +1430,7 @@ public PagedIterable listQueryResultsForSubscription( * @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 query results. + * @return query results as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listQueryResultsForSubscription( @@ -1422,6 +1463,8 @@ public PagedIterable listQueryResultsForSubscription( /** * Summarizes policy states for the resources under the subscription. * + * @param policyStatesSummaryResource The virtual resource under PolicyStates resource type for summarize action. In + * a given time range, 'latest' represents the latest policy state(s) and is the only allowed value. * @param subscriptionId Microsoft Azure subscription ID. * @param top Maximum number of records to return. * @param from ISO 8601 formatted timestamp specifying the start time of the interval to query. When not specified, @@ -1432,21 +1475,31 @@ public PagedIterable listQueryResultsForSubscription( * @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 summarize action results. + * @return summarize action results along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> summarizeForSubscriptionWithResponseAsync( - String subscriptionId, Integer top, OffsetDateTime from, OffsetDateTime to, String filter) { + PolicyStatesSummaryResourceType policyStatesSummaryResource, + String subscriptionId, + Integer top, + OffsetDateTime from, + OffsetDateTime to, + String filter) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } + if (policyStatesSummaryResource == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter policyStatesSummaryResource is required and cannot be null.")); + } if (subscriptionId == null) { return Mono.error(new IllegalArgumentException("Parameter subscriptionId is required and cannot be null.")); } - final String policyStatesSummaryResource = "latest"; final String apiVersion = "2019-10-01"; final String accept = "application/json"; return FluxUtil @@ -1470,6 +1523,8 @@ private Mono> summarizeForSubscriptionWithRespon /** * Summarizes policy states for the resources under the subscription. * + * @param policyStatesSummaryResource The virtual resource under PolicyStates resource type for summarize action. In + * a given time range, 'latest' represents the latest policy state(s) and is the only allowed value. * @param subscriptionId Microsoft Azure subscription ID. * @param top Maximum number of records to return. * @param from ISO 8601 formatted timestamp specifying the start time of the interval to query. When not specified, @@ -1481,21 +1536,32 @@ private Mono> summarizeForSubscriptionWithRespon * @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 summarize action results. + * @return summarize action results along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> summarizeForSubscriptionWithResponseAsync( - String subscriptionId, Integer top, OffsetDateTime from, OffsetDateTime to, String filter, Context context) { + PolicyStatesSummaryResourceType policyStatesSummaryResource, + String subscriptionId, + Integer top, + OffsetDateTime from, + OffsetDateTime to, + String filter, + Context context) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } + if (policyStatesSummaryResource == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter policyStatesSummaryResource is required and cannot be null.")); + } if (subscriptionId == null) { return Mono.error(new IllegalArgumentException("Parameter subscriptionId is required and cannot be null.")); } - final String policyStatesSummaryResource = "latest"; final String apiVersion = "2019-10-01"; final String accept = "application/json"; context = this.client.mergeContext(context); @@ -1516,6 +1582,8 @@ private Mono> summarizeForSubscriptionWithRespon /** * Summarizes policy states for the resources under the subscription. * + * @param policyStatesSummaryResource The virtual resource under PolicyStates resource type for summarize action. In + * a given time range, 'latest' represents the latest policy state(s) and is the only allowed value. * @param subscriptionId Microsoft Azure subscription ID. * @param top Maximum number of records to return. * @param from ISO 8601 formatted timestamp specifying the start time of the interval to query. When not specified, @@ -1526,12 +1594,18 @@ private Mono> summarizeForSubscriptionWithRespon * @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 summarize action results. + * @return summarize action results on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono summarizeForSubscriptionAsync( - String subscriptionId, Integer top, OffsetDateTime from, OffsetDateTime to, String filter) { - return summarizeForSubscriptionWithResponseAsync(subscriptionId, top, from, to, filter) + PolicyStatesSummaryResourceType policyStatesSummaryResource, + String subscriptionId, + Integer top, + OffsetDateTime from, + OffsetDateTime to, + String filter) { + return summarizeForSubscriptionWithResponseAsync( + policyStatesSummaryResource, subscriptionId, top, from, to, filter) .flatMap( (Response res) -> { if (res.getValue() != null) { @@ -1545,19 +1619,23 @@ private Mono summarizeForSubscriptionAsync( /** * Summarizes policy states for the resources under the subscription. * + * @param policyStatesSummaryResource The virtual resource under PolicyStates resource type for summarize action. In + * a given time range, 'latest' represents the latest policy state(s) and is the only allowed value. * @param subscriptionId Microsoft Azure subscription ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return summarize action results. + * @return summarize action results on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono summarizeForSubscriptionAsync(String subscriptionId) { + private Mono summarizeForSubscriptionAsync( + PolicyStatesSummaryResourceType policyStatesSummaryResource, String subscriptionId) { final Integer top = null; final OffsetDateTime from = null; final OffsetDateTime to = null; final String filter = null; - return summarizeForSubscriptionWithResponseAsync(subscriptionId, top, from, to, filter) + return summarizeForSubscriptionWithResponseAsync( + policyStatesSummaryResource, subscriptionId, top, from, to, filter) .flatMap( (Response res) -> { if (res.getValue() != null) { @@ -1571,6 +1649,8 @@ private Mono summarizeForSubscriptionAsync(String subscri /** * Summarizes policy states for the resources under the subscription. * + * @param policyStatesSummaryResource The virtual resource under PolicyStates resource type for summarize action. In + * a given time range, 'latest' represents the latest policy state(s) and is the only allowed value. * @param subscriptionId Microsoft Azure subscription ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1578,17 +1658,21 @@ private Mono summarizeForSubscriptionAsync(String subscri * @return summarize action results. */ @ServiceMethod(returns = ReturnType.SINGLE) - public SummarizeResultsInner summarizeForSubscription(String subscriptionId) { + public SummarizeResultsInner summarizeForSubscription( + PolicyStatesSummaryResourceType policyStatesSummaryResource, String subscriptionId) { final Integer top = null; final OffsetDateTime from = null; final OffsetDateTime to = null; final String filter = null; - return summarizeForSubscriptionAsync(subscriptionId, top, from, to, filter).block(); + return summarizeForSubscriptionAsync(policyStatesSummaryResource, subscriptionId, top, from, to, filter) + .block(); } /** * Summarizes policy states for the resources under the subscription. * + * @param policyStatesSummaryResource The virtual resource under PolicyStates resource type for summarize action. In + * a given time range, 'latest' represents the latest policy state(s) and is the only allowed value. * @param subscriptionId Microsoft Azure subscription ID. * @param top Maximum number of records to return. * @param from ISO 8601 formatted timestamp specifying the start time of the interval to query. When not specified, @@ -1600,12 +1684,20 @@ public SummarizeResultsInner summarizeForSubscription(String subscriptionId) { * @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 summarize action results. + * @return summarize action results along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response summarizeForSubscriptionWithResponse( - String subscriptionId, Integer top, OffsetDateTime from, OffsetDateTime to, String filter, Context context) { - return summarizeForSubscriptionWithResponseAsync(subscriptionId, top, from, to, filter, context).block(); + PolicyStatesSummaryResourceType policyStatesSummaryResource, + String subscriptionId, + Integer top, + OffsetDateTime from, + OffsetDateTime to, + String filter, + Context context) { + return summarizeForSubscriptionWithResponseAsync( + policyStatesSummaryResource, subscriptionId, top, from, to, filter, context) + .block(); } /** @@ -1631,7 +1723,7 @@ public Response summarizeForSubscriptionWithResponse( * @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 query results. + * @return query results along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listQueryResultsForResourceGroupSinglePageAsync( @@ -1721,7 +1813,7 @@ private Mono> listQueryResultsForResourceGroupSi * @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 query results. + * @return query results along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listQueryResultsForResourceGroupSinglePageAsync( @@ -1808,7 +1900,7 @@ private Mono> listQueryResultsForResourceGroupSi * @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 query results. + * @return query results as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listQueryResultsForResourceGroupAsync( @@ -1850,7 +1942,7 @@ private PagedFlux listQueryResultsForResourceGroupAsync( * @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 query results. + * @return query results as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listQueryResultsForResourceGroupAsync( @@ -1904,7 +1996,7 @@ private PagedFlux listQueryResultsForResourceGroupAsync( * @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 query results. + * @return query results as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listQueryResultsForResourceGroupAsync( @@ -1948,7 +2040,7 @@ private PagedFlux listQueryResultsForResourceGroupAsync( * @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 query results. + * @return query results as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listQueryResultsForResourceGroup( @@ -2000,7 +2092,7 @@ public PagedIterable listQueryResultsForResourceGroup( * @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 query results. + * @return query results as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listQueryResultsForResourceGroup( @@ -2035,6 +2127,8 @@ public PagedIterable listQueryResultsForResourceGroup( /** * Summarizes policy states for the resources under the resource group. * + * @param policyStatesSummaryResource The virtual resource under PolicyStates resource type for summarize action. In + * a given time range, 'latest' represents the latest policy state(s) and is the only allowed value. * @param subscriptionId Microsoft Azure subscription ID. * @param resourceGroupName Resource group name. * @param top Maximum number of records to return. @@ -2046,10 +2140,11 @@ public PagedIterable listQueryResultsForResourceGroup( * @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 summarize action results. + * @return summarize action results along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> summarizeForResourceGroupWithResponseAsync( + PolicyStatesSummaryResourceType policyStatesSummaryResource, String subscriptionId, String resourceGroupName, Integer top, @@ -2062,6 +2157,12 @@ private Mono> summarizeForResourceGroupWithRespo new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } + if (policyStatesSummaryResource == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter policyStatesSummaryResource is required and cannot be null.")); + } if (subscriptionId == null) { return Mono.error(new IllegalArgumentException("Parameter subscriptionId is required and cannot be null.")); } @@ -2069,7 +2170,6 @@ private Mono> summarizeForResourceGroupWithRespo return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } - final String policyStatesSummaryResource = "latest"; final String apiVersion = "2019-10-01"; final String accept = "application/json"; return FluxUtil @@ -2094,6 +2194,8 @@ private Mono> summarizeForResourceGroupWithRespo /** * Summarizes policy states for the resources under the resource group. * + * @param policyStatesSummaryResource The virtual resource under PolicyStates resource type for summarize action. In + * a given time range, 'latest' represents the latest policy state(s) and is the only allowed value. * @param subscriptionId Microsoft Azure subscription ID. * @param resourceGroupName Resource group name. * @param top Maximum number of records to return. @@ -2106,10 +2208,11 @@ private Mono> summarizeForResourceGroupWithRespo * @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 summarize action results. + * @return summarize action results along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> summarizeForResourceGroupWithResponseAsync( + PolicyStatesSummaryResourceType policyStatesSummaryResource, String subscriptionId, String resourceGroupName, Integer top, @@ -2123,6 +2226,12 @@ private Mono> summarizeForResourceGroupWithRespo new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } + if (policyStatesSummaryResource == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter policyStatesSummaryResource is required and cannot be null.")); + } if (subscriptionId == null) { return Mono.error(new IllegalArgumentException("Parameter subscriptionId is required and cannot be null.")); } @@ -2130,7 +2239,6 @@ private Mono> summarizeForResourceGroupWithRespo return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } - final String policyStatesSummaryResource = "latest"; final String apiVersion = "2019-10-01"; final String accept = "application/json"; context = this.client.mergeContext(context); @@ -2152,6 +2260,8 @@ private Mono> summarizeForResourceGroupWithRespo /** * Summarizes policy states for the resources under the resource group. * + * @param policyStatesSummaryResource The virtual resource under PolicyStates resource type for summarize action. In + * a given time range, 'latest' represents the latest policy state(s) and is the only allowed value. * @param subscriptionId Microsoft Azure subscription ID. * @param resourceGroupName Resource group name. * @param top Maximum number of records to return. @@ -2163,17 +2273,19 @@ private Mono> summarizeForResourceGroupWithRespo * @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 summarize action results. + * @return summarize action results on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono summarizeForResourceGroupAsync( + PolicyStatesSummaryResourceType policyStatesSummaryResource, String subscriptionId, String resourceGroupName, Integer top, OffsetDateTime from, OffsetDateTime to, String filter) { - return summarizeForResourceGroupWithResponseAsync(subscriptionId, resourceGroupName, top, from, to, filter) + return summarizeForResourceGroupWithResponseAsync( + policyStatesSummaryResource, subscriptionId, resourceGroupName, top, from, to, filter) .flatMap( (Response res) -> { if (res.getValue() != null) { @@ -2187,21 +2299,24 @@ private Mono summarizeForResourceGroupAsync( /** * Summarizes policy states for the resources under the resource group. * + * @param policyStatesSummaryResource The virtual resource under PolicyStates resource type for summarize action. In + * a given time range, 'latest' represents the latest policy state(s) and is the only allowed value. * @param subscriptionId Microsoft Azure subscription ID. * @param resourceGroupName Resource group name. * @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 summarize action results. + * @return summarize action results on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono summarizeForResourceGroupAsync( - String subscriptionId, String resourceGroupName) { + PolicyStatesSummaryResourceType policyStatesSummaryResource, String subscriptionId, String resourceGroupName) { final Integer top = null; final OffsetDateTime from = null; final OffsetDateTime to = null; final String filter = null; - return summarizeForResourceGroupWithResponseAsync(subscriptionId, resourceGroupName, top, from, to, filter) + return summarizeForResourceGroupWithResponseAsync( + policyStatesSummaryResource, subscriptionId, resourceGroupName, top, from, to, filter) .flatMap( (Response res) -> { if (res.getValue() != null) { @@ -2215,6 +2330,8 @@ private Mono summarizeForResourceGroupAsync( /** * Summarizes policy states for the resources under the resource group. * + * @param policyStatesSummaryResource The virtual resource under PolicyStates resource type for summarize action. In + * a given time range, 'latest' represents the latest policy state(s) and is the only allowed value. * @param subscriptionId Microsoft Azure subscription ID. * @param resourceGroupName Resource group name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2223,17 +2340,22 @@ private Mono summarizeForResourceGroupAsync( * @return summarize action results. */ @ServiceMethod(returns = ReturnType.SINGLE) - public SummarizeResultsInner summarizeForResourceGroup(String subscriptionId, String resourceGroupName) { + public SummarizeResultsInner summarizeForResourceGroup( + PolicyStatesSummaryResourceType policyStatesSummaryResource, String subscriptionId, String resourceGroupName) { final Integer top = null; final OffsetDateTime from = null; final OffsetDateTime to = null; final String filter = null; - return summarizeForResourceGroupAsync(subscriptionId, resourceGroupName, top, from, to, filter).block(); + return summarizeForResourceGroupAsync( + policyStatesSummaryResource, subscriptionId, resourceGroupName, top, from, to, filter) + .block(); } /** * Summarizes policy states for the resources under the resource group. * + * @param policyStatesSummaryResource The virtual resource under PolicyStates resource type for summarize action. In + * a given time range, 'latest' represents the latest policy state(s) and is the only allowed value. * @param subscriptionId Microsoft Azure subscription ID. * @param resourceGroupName Resource group name. * @param top Maximum number of records to return. @@ -2246,10 +2368,11 @@ public SummarizeResultsInner summarizeForResourceGroup(String subscriptionId, St * @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 summarize action results. + * @return summarize action results along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response summarizeForResourceGroupWithResponse( + PolicyStatesSummaryResourceType policyStatesSummaryResource, String subscriptionId, String resourceGroupName, Integer top, @@ -2258,7 +2381,7 @@ public Response summarizeForResourceGroupWithResponse( String filter, Context context) { return summarizeForResourceGroupWithResponseAsync( - subscriptionId, resourceGroupName, top, from, to, filter, context) + policyStatesSummaryResource, subscriptionId, resourceGroupName, top, from, to, filter, context) .block(); } @@ -2285,7 +2408,7 @@ public Response summarizeForResourceGroupWithResponse( * @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 query results. + * @return query results along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listQueryResultsForResourceSinglePageAsync( @@ -2371,7 +2494,7 @@ private Mono> listQueryResultsForResourceSingleP * @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 query results. + * @return query results along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listQueryResultsForResourceSinglePageAsync( @@ -2454,7 +2577,7 @@ private Mono> listQueryResultsForResourceSingleP * @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 query results. + * @return query results as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listQueryResultsForResourceAsync( @@ -2485,7 +2608,7 @@ private PagedFlux listQueryResultsForResourceAsync( * @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 query results. + * @return query results as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listQueryResultsForResourceAsync( @@ -2530,7 +2653,7 @@ private PagedFlux listQueryResultsForResourceAsync( * @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 query results. + * @return query results as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listQueryResultsForResourceAsync( @@ -2573,7 +2696,7 @@ private PagedFlux listQueryResultsForResourceAsync( * @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 query results. + * @return query results as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listQueryResultsForResource( @@ -2616,7 +2739,7 @@ public PagedIterable listQueryResultsForResource( * @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 query results. + * @return query results as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listQueryResultsForResource( @@ -2651,6 +2774,8 @@ public PagedIterable listQueryResultsForResource( /** * Summarizes policy states for the resource. * + * @param policyStatesSummaryResource The virtual resource under PolicyStates resource type for summarize action. In + * a given time range, 'latest' represents the latest policy state(s) and is the only allowed value. * @param resourceId Resource ID. * @param top Maximum number of records to return. * @param from ISO 8601 formatted timestamp specifying the start time of the interval to query. When not specified, @@ -2661,21 +2786,31 @@ public PagedIterable listQueryResultsForResource( * @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 summarize action results. + * @return summarize action results along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> summarizeForResourceWithResponseAsync( - String resourceId, Integer top, OffsetDateTime from, OffsetDateTime to, String filter) { + PolicyStatesSummaryResourceType policyStatesSummaryResource, + String resourceId, + Integer top, + OffsetDateTime from, + OffsetDateTime to, + String filter) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } + if (policyStatesSummaryResource == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter policyStatesSummaryResource is required and cannot be null.")); + } if (resourceId == null) { return Mono.error(new IllegalArgumentException("Parameter resourceId is required and cannot be null.")); } - final String policyStatesSummaryResource = "latest"; final String apiVersion = "2019-10-01"; final String accept = "application/json"; return FluxUtil @@ -2699,6 +2834,8 @@ private Mono> summarizeForResourceWithResponseAs /** * Summarizes policy states for the resource. * + * @param policyStatesSummaryResource The virtual resource under PolicyStates resource type for summarize action. In + * a given time range, 'latest' represents the latest policy state(s) and is the only allowed value. * @param resourceId Resource ID. * @param top Maximum number of records to return. * @param from ISO 8601 formatted timestamp specifying the start time of the interval to query. When not specified, @@ -2710,21 +2847,32 @@ private Mono> summarizeForResourceWithResponseAs * @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 summarize action results. + * @return summarize action results along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> summarizeForResourceWithResponseAsync( - String resourceId, Integer top, OffsetDateTime from, OffsetDateTime to, String filter, Context context) { + PolicyStatesSummaryResourceType policyStatesSummaryResource, + String resourceId, + Integer top, + OffsetDateTime from, + OffsetDateTime to, + String filter, + Context context) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } + if (policyStatesSummaryResource == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter policyStatesSummaryResource is required and cannot be null.")); + } if (resourceId == null) { return Mono.error(new IllegalArgumentException("Parameter resourceId is required and cannot be null.")); } - final String policyStatesSummaryResource = "latest"; final String apiVersion = "2019-10-01"; final String accept = "application/json"; context = this.client.mergeContext(context); @@ -2745,6 +2893,8 @@ private Mono> summarizeForResourceWithResponseAs /** * Summarizes policy states for the resource. * + * @param policyStatesSummaryResource The virtual resource under PolicyStates resource type for summarize action. In + * a given time range, 'latest' represents the latest policy state(s) and is the only allowed value. * @param resourceId Resource ID. * @param top Maximum number of records to return. * @param from ISO 8601 formatted timestamp specifying the start time of the interval to query. When not specified, @@ -2755,12 +2905,17 @@ private Mono> summarizeForResourceWithResponseAs * @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 summarize action results. + * @return summarize action results on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono summarizeForResourceAsync( - String resourceId, Integer top, OffsetDateTime from, OffsetDateTime to, String filter) { - return summarizeForResourceWithResponseAsync(resourceId, top, from, to, filter) + PolicyStatesSummaryResourceType policyStatesSummaryResource, + String resourceId, + Integer top, + OffsetDateTime from, + OffsetDateTime to, + String filter) { + return summarizeForResourceWithResponseAsync(policyStatesSummaryResource, resourceId, top, from, to, filter) .flatMap( (Response res) -> { if (res.getValue() != null) { @@ -2774,19 +2929,22 @@ private Mono summarizeForResourceAsync( /** * Summarizes policy states for the resource. * + * @param policyStatesSummaryResource The virtual resource under PolicyStates resource type for summarize action. In + * a given time range, 'latest' represents the latest policy state(s) and is the only allowed value. * @param resourceId Resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return summarize action results. + * @return summarize action results on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono summarizeForResourceAsync(String resourceId) { + private Mono summarizeForResourceAsync( + PolicyStatesSummaryResourceType policyStatesSummaryResource, String resourceId) { final Integer top = null; final OffsetDateTime from = null; final OffsetDateTime to = null; final String filter = null; - return summarizeForResourceWithResponseAsync(resourceId, top, from, to, filter) + return summarizeForResourceWithResponseAsync(policyStatesSummaryResource, resourceId, top, from, to, filter) .flatMap( (Response res) -> { if (res.getValue() != null) { @@ -2800,6 +2958,8 @@ private Mono summarizeForResourceAsync(String resourceId) /** * Summarizes policy states for the resource. * + * @param policyStatesSummaryResource The virtual resource under PolicyStates resource type for summarize action. In + * a given time range, 'latest' represents the latest policy state(s) and is the only allowed value. * @param resourceId Resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -2807,17 +2967,20 @@ private Mono summarizeForResourceAsync(String resourceId) * @return summarize action results. */ @ServiceMethod(returns = ReturnType.SINGLE) - public SummarizeResultsInner summarizeForResource(String resourceId) { + public SummarizeResultsInner summarizeForResource( + PolicyStatesSummaryResourceType policyStatesSummaryResource, String resourceId) { final Integer top = null; final OffsetDateTime from = null; final OffsetDateTime to = null; final String filter = null; - return summarizeForResourceAsync(resourceId, top, from, to, filter).block(); + return summarizeForResourceAsync(policyStatesSummaryResource, resourceId, top, from, to, filter).block(); } /** * Summarizes policy states for the resource. * + * @param policyStatesSummaryResource The virtual resource under PolicyStates resource type for summarize action. In + * a given time range, 'latest' represents the latest policy state(s) and is the only allowed value. * @param resourceId Resource ID. * @param top Maximum number of records to return. * @param from ISO 8601 formatted timestamp specifying the start time of the interval to query. When not specified, @@ -2829,12 +2992,20 @@ public SummarizeResultsInner summarizeForResource(String resourceId) { * @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 summarize action results. + * @return summarize action results along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response summarizeForResourceWithResponse( - String resourceId, Integer top, OffsetDateTime from, OffsetDateTime to, String filter, Context context) { - return summarizeForResourceWithResponseAsync(resourceId, top, from, to, filter, context).block(); + PolicyStatesSummaryResourceType policyStatesSummaryResource, + String resourceId, + Integer top, + OffsetDateTime from, + OffsetDateTime to, + String filter, + Context context) { + return summarizeForResourceWithResponseAsync( + policyStatesSummaryResource, resourceId, top, from, to, filter, context) + .block(); } /** @@ -2844,7 +3015,7 @@ public Response summarizeForResourceWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> triggerSubscriptionEvaluationWithResponseAsync(String subscriptionId) { @@ -2876,7 +3047,7 @@ private Mono>> triggerSubscriptionEvaluationWithRespon * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> triggerSubscriptionEvaluationWithResponseAsync( @@ -2904,7 +3075,7 @@ private Mono>> triggerSubscriptionEvaluationWithRespon * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginTriggerSubscriptionEvaluationAsync(String subscriptionId) { @@ -2923,7 +3094,7 @@ private PollerFlux, Void> beginTriggerSubscriptionEvaluationAsy * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginTriggerSubscriptionEvaluationAsync( @@ -2942,7 +3113,7 @@ private PollerFlux, Void> beginTriggerSubscriptionEvaluationAsy * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginTriggerSubscriptionEvaluation(String subscriptionId) { @@ -2957,7 +3128,7 @@ public SyncPoller, Void> beginTriggerSubscriptionEvaluation(Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginTriggerSubscriptionEvaluation( @@ -2972,7 +3143,7 @@ public SyncPoller, Void> beginTriggerSubscriptionEvaluation( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono triggerSubscriptionEvaluationAsync(String subscriptionId) { @@ -2989,7 +3160,7 @@ private Mono triggerSubscriptionEvaluationAsync(String subscriptionId) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono triggerSubscriptionEvaluationAsync(String subscriptionId, Context context) { @@ -3033,7 +3204,7 @@ public void triggerSubscriptionEvaluation(String subscriptionId, 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 completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> triggerResourceGroupEvaluationWithResponseAsync( @@ -3071,7 +3242,7 @@ private Mono>> triggerResourceGroupEvaluationWithRespo * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> triggerResourceGroupEvaluationWithResponseAsync( @@ -3105,7 +3276,7 @@ private Mono>> triggerResourceGroupEvaluationWithRespo * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginTriggerResourceGroupEvaluationAsync( @@ -3127,7 +3298,7 @@ private PollerFlux, Void> beginTriggerResourceGroupEvaluationAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginTriggerResourceGroupEvaluationAsync( @@ -3148,7 +3319,7 @@ private PollerFlux, Void> beginTriggerResourceGroupEvaluationAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginTriggerResourceGroupEvaluation( @@ -3165,7 +3336,7 @@ public SyncPoller, Void> beginTriggerResourceGroupEvaluation( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginTriggerResourceGroupEvaluation( @@ -3181,7 +3352,7 @@ public SyncPoller, Void> beginTriggerResourceGroupEvaluation( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono triggerResourceGroupEvaluationAsync(String subscriptionId, String resourceGroupName) { @@ -3199,7 +3370,7 @@ private Mono triggerResourceGroupEvaluationAsync(String subscriptionId, St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono triggerResourceGroupEvaluationAsync( @@ -3261,7 +3432,7 @@ public void triggerResourceGroupEvaluation(String subscriptionId, String resourc * @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 query results. + * @return query results along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listQueryResultsForPolicySetDefinitionSinglePageAsync( @@ -3354,7 +3525,7 @@ private Mono> listQueryResultsForPolicySetDefini * @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 query results. + * @return query results along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listQueryResultsForPolicySetDefinitionSinglePageAsync( @@ -3444,7 +3615,7 @@ private Mono> listQueryResultsForPolicySetDefini * @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 query results. + * @return query results as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listQueryResultsForPolicySetDefinitionAsync( @@ -3486,7 +3657,7 @@ private PagedFlux listQueryResultsForPolicySetDefinitionAsync( * @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 query results. + * @return query results as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listQueryResultsForPolicySetDefinitionAsync( @@ -3540,7 +3711,7 @@ private PagedFlux listQueryResultsForPolicySetDefinitionAsync( * @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 query results. + * @return query results as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listQueryResultsForPolicySetDefinitionAsync( @@ -3584,7 +3755,7 @@ private PagedFlux listQueryResultsForPolicySetDefinitionAsync( * @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 query results. + * @return query results as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listQueryResultsForPolicySetDefinition( @@ -3636,7 +3807,7 @@ public PagedIterable listQueryResultsForPolicySetDefinition( * @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 query results. + * @return query results as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listQueryResultsForPolicySetDefinition( @@ -3671,6 +3842,8 @@ public PagedIterable listQueryResultsForPolicySetDefinition( /** * Summarizes policy states for the subscription level policy set definition. * + * @param policyStatesSummaryResource The virtual resource under PolicyStates resource type for summarize action. In + * a given time range, 'latest' represents the latest policy state(s) and is the only allowed value. * @param subscriptionId Microsoft Azure subscription ID. * @param policySetDefinitionName Policy set definition name. * @param top Maximum number of records to return. @@ -3682,10 +3855,11 @@ public PagedIterable listQueryResultsForPolicySetDefinition( * @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 summarize action results. + * @return summarize action results along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> summarizeForPolicySetDefinitionWithResponseAsync( + PolicyStatesSummaryResourceType policyStatesSummaryResource, String subscriptionId, String policySetDefinitionName, Integer top, @@ -3698,6 +3872,12 @@ private Mono> summarizeForPolicySetDefinitionWit new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } + if (policyStatesSummaryResource == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter policyStatesSummaryResource is required and cannot be null.")); + } if (subscriptionId == null) { return Mono.error(new IllegalArgumentException("Parameter subscriptionId is required and cannot be null.")); } @@ -3706,7 +3886,6 @@ private Mono> summarizeForPolicySetDefinitionWit .error( new IllegalArgumentException("Parameter policySetDefinitionName is required and cannot be null.")); } - final String policyStatesSummaryResource = "latest"; final String authorizationNamespace = "Microsoft.Authorization"; final String apiVersion = "2019-10-01"; final String accept = "application/json"; @@ -3733,6 +3912,8 @@ private Mono> summarizeForPolicySetDefinitionWit /** * Summarizes policy states for the subscription level policy set definition. * + * @param policyStatesSummaryResource The virtual resource under PolicyStates resource type for summarize action. In + * a given time range, 'latest' represents the latest policy state(s) and is the only allowed value. * @param subscriptionId Microsoft Azure subscription ID. * @param policySetDefinitionName Policy set definition name. * @param top Maximum number of records to return. @@ -3745,10 +3926,11 @@ private Mono> summarizeForPolicySetDefinitionWit * @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 summarize action results. + * @return summarize action results along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> summarizeForPolicySetDefinitionWithResponseAsync( + PolicyStatesSummaryResourceType policyStatesSummaryResource, String subscriptionId, String policySetDefinitionName, Integer top, @@ -3762,6 +3944,12 @@ private Mono> summarizeForPolicySetDefinitionWit new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } + if (policyStatesSummaryResource == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter policyStatesSummaryResource is required and cannot be null.")); + } if (subscriptionId == null) { return Mono.error(new IllegalArgumentException("Parameter subscriptionId is required and cannot be null.")); } @@ -3770,7 +3958,6 @@ private Mono> summarizeForPolicySetDefinitionWit .error( new IllegalArgumentException("Parameter policySetDefinitionName is required and cannot be null.")); } - final String policyStatesSummaryResource = "latest"; final String authorizationNamespace = "Microsoft.Authorization"; final String apiVersion = "2019-10-01"; final String accept = "application/json"; @@ -3794,6 +3981,8 @@ private Mono> summarizeForPolicySetDefinitionWit /** * Summarizes policy states for the subscription level policy set definition. * + * @param policyStatesSummaryResource The virtual resource under PolicyStates resource type for summarize action. In + * a given time range, 'latest' represents the latest policy state(s) and is the only allowed value. * @param subscriptionId Microsoft Azure subscription ID. * @param policySetDefinitionName Policy set definition name. * @param top Maximum number of records to return. @@ -3805,10 +3994,11 @@ private Mono> summarizeForPolicySetDefinitionWit * @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 summarize action results. + * @return summarize action results on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono summarizeForPolicySetDefinitionAsync( + PolicyStatesSummaryResourceType policyStatesSummaryResource, String subscriptionId, String policySetDefinitionName, Integer top, @@ -3816,7 +4006,7 @@ private Mono summarizeForPolicySetDefinitionAsync( OffsetDateTime to, String filter) { return summarizeForPolicySetDefinitionWithResponseAsync( - subscriptionId, policySetDefinitionName, top, from, to, filter) + policyStatesSummaryResource, subscriptionId, policySetDefinitionName, top, from, to, filter) .flatMap( (Response res) -> { if (res.getValue() != null) { @@ -3830,22 +4020,26 @@ private Mono summarizeForPolicySetDefinitionAsync( /** * Summarizes policy states for the subscription level policy set definition. * + * @param policyStatesSummaryResource The virtual resource under PolicyStates resource type for summarize action. In + * a given time range, 'latest' represents the latest policy state(s) and is the only allowed value. * @param subscriptionId Microsoft Azure subscription ID. * @param policySetDefinitionName Policy set definition name. * @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 summarize action results. + * @return summarize action results on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono summarizeForPolicySetDefinitionAsync( - String subscriptionId, String policySetDefinitionName) { + PolicyStatesSummaryResourceType policyStatesSummaryResource, + String subscriptionId, + String policySetDefinitionName) { final Integer top = null; final OffsetDateTime from = null; final OffsetDateTime to = null; final String filter = null; return summarizeForPolicySetDefinitionWithResponseAsync( - subscriptionId, policySetDefinitionName, top, from, to, filter) + policyStatesSummaryResource, subscriptionId, policySetDefinitionName, top, from, to, filter) .flatMap( (Response res) -> { if (res.getValue() != null) { @@ -3859,6 +4053,8 @@ private Mono summarizeForPolicySetDefinitionAsync( /** * Summarizes policy states for the subscription level policy set definition. * + * @param policyStatesSummaryResource The virtual resource under PolicyStates resource type for summarize action. In + * a given time range, 'latest' represents the latest policy state(s) and is the only allowed value. * @param subscriptionId Microsoft Azure subscription ID. * @param policySetDefinitionName Policy set definition name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -3868,18 +4064,23 @@ private Mono summarizeForPolicySetDefinitionAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) public SummarizeResultsInner summarizeForPolicySetDefinition( - String subscriptionId, String policySetDefinitionName) { + PolicyStatesSummaryResourceType policyStatesSummaryResource, + String subscriptionId, + String policySetDefinitionName) { final Integer top = null; final OffsetDateTime from = null; final OffsetDateTime to = null; final String filter = null; - return summarizeForPolicySetDefinitionAsync(subscriptionId, policySetDefinitionName, top, from, to, filter) + return summarizeForPolicySetDefinitionAsync( + policyStatesSummaryResource, subscriptionId, policySetDefinitionName, top, from, to, filter) .block(); } /** * Summarizes policy states for the subscription level policy set definition. * + * @param policyStatesSummaryResource The virtual resource under PolicyStates resource type for summarize action. In + * a given time range, 'latest' represents the latest policy state(s) and is the only allowed value. * @param subscriptionId Microsoft Azure subscription ID. * @param policySetDefinitionName Policy set definition name. * @param top Maximum number of records to return. @@ -3892,10 +4093,11 @@ public SummarizeResultsInner summarizeForPolicySetDefinition( * @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 summarize action results. + * @return summarize action results along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response summarizeForPolicySetDefinitionWithResponse( + PolicyStatesSummaryResourceType policyStatesSummaryResource, String subscriptionId, String policySetDefinitionName, Integer top, @@ -3904,7 +4106,7 @@ public Response summarizeForPolicySetDefinitionWithRespon String filter, Context context) { return summarizeForPolicySetDefinitionWithResponseAsync( - subscriptionId, policySetDefinitionName, top, from, to, filter, context) + policyStatesSummaryResource, subscriptionId, policySetDefinitionName, top, from, to, filter, context) .block(); } @@ -3931,7 +4133,7 @@ public Response summarizeForPolicySetDefinitionWithRespon * @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 query results. + * @return query results along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listQueryResultsForPolicyDefinitionSinglePageAsync( @@ -4023,7 +4225,7 @@ private Mono> listQueryResultsForPolicyDefinitio * @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 query results. + * @return query results along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listQueryResultsForPolicyDefinitionSinglePageAsync( @@ -4112,7 +4314,7 @@ private Mono> listQueryResultsForPolicyDefinitio * @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 query results. + * @return query results as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listQueryResultsForPolicyDefinitionAsync( @@ -4154,7 +4356,7 @@ private PagedFlux listQueryResultsForPolicyDefinitionAsync( * @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 query results. + * @return query results as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listQueryResultsForPolicyDefinitionAsync( @@ -4208,7 +4410,7 @@ private PagedFlux listQueryResultsForPolicyDefinitionAsync( * @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 query results. + * @return query results as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listQueryResultsForPolicyDefinitionAsync( @@ -4252,7 +4454,7 @@ private PagedFlux listQueryResultsForPolicyDefinitionAsync( * @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 query results. + * @return query results as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listQueryResultsForPolicyDefinition( @@ -4304,7 +4506,7 @@ public PagedIterable listQueryResultsForPolicyDefinition( * @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 query results. + * @return query results as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listQueryResultsForPolicyDefinition( @@ -4339,6 +4541,8 @@ public PagedIterable listQueryResultsForPolicyDefinition( /** * Summarizes policy states for the subscription level policy definition. * + * @param policyStatesSummaryResource The virtual resource under PolicyStates resource type for summarize action. In + * a given time range, 'latest' represents the latest policy state(s) and is the only allowed value. * @param subscriptionId Microsoft Azure subscription ID. * @param policyDefinitionName Policy definition name. * @param top Maximum number of records to return. @@ -4350,10 +4554,11 @@ public PagedIterable listQueryResultsForPolicyDefinition( * @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 summarize action results. + * @return summarize action results along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> summarizeForPolicyDefinitionWithResponseAsync( + PolicyStatesSummaryResourceType policyStatesSummaryResource, String subscriptionId, String policyDefinitionName, Integer top, @@ -4366,6 +4571,12 @@ private Mono> summarizeForPolicyDefinitionWithRe new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } + if (policyStatesSummaryResource == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter policyStatesSummaryResource is required and cannot be null.")); + } if (subscriptionId == null) { return Mono.error(new IllegalArgumentException("Parameter subscriptionId is required and cannot be null.")); } @@ -4373,7 +4584,6 @@ private Mono> summarizeForPolicyDefinitionWithRe return Mono .error(new IllegalArgumentException("Parameter policyDefinitionName is required and cannot be null.")); } - final String policyStatesSummaryResource = "latest"; final String authorizationNamespace = "Microsoft.Authorization"; final String apiVersion = "2019-10-01"; final String accept = "application/json"; @@ -4400,6 +4610,8 @@ private Mono> summarizeForPolicyDefinitionWithRe /** * Summarizes policy states for the subscription level policy definition. * + * @param policyStatesSummaryResource The virtual resource under PolicyStates resource type for summarize action. In + * a given time range, 'latest' represents the latest policy state(s) and is the only allowed value. * @param subscriptionId Microsoft Azure subscription ID. * @param policyDefinitionName Policy definition name. * @param top Maximum number of records to return. @@ -4412,10 +4624,11 @@ private Mono> summarizeForPolicyDefinitionWithRe * @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 summarize action results. + * @return summarize action results along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> summarizeForPolicyDefinitionWithResponseAsync( + PolicyStatesSummaryResourceType policyStatesSummaryResource, String subscriptionId, String policyDefinitionName, Integer top, @@ -4429,6 +4642,12 @@ private Mono> summarizeForPolicyDefinitionWithRe new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } + if (policyStatesSummaryResource == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter policyStatesSummaryResource is required and cannot be null.")); + } if (subscriptionId == null) { return Mono.error(new IllegalArgumentException("Parameter subscriptionId is required and cannot be null.")); } @@ -4436,7 +4655,6 @@ private Mono> summarizeForPolicyDefinitionWithRe return Mono .error(new IllegalArgumentException("Parameter policyDefinitionName is required and cannot be null.")); } - final String policyStatesSummaryResource = "latest"; final String authorizationNamespace = "Microsoft.Authorization"; final String apiVersion = "2019-10-01"; final String accept = "application/json"; @@ -4460,6 +4678,8 @@ private Mono> summarizeForPolicyDefinitionWithRe /** * Summarizes policy states for the subscription level policy definition. * + * @param policyStatesSummaryResource The virtual resource under PolicyStates resource type for summarize action. In + * a given time range, 'latest' represents the latest policy state(s) and is the only allowed value. * @param subscriptionId Microsoft Azure subscription ID. * @param policyDefinitionName Policy definition name. * @param top Maximum number of records to return. @@ -4471,10 +4691,11 @@ private Mono> summarizeForPolicyDefinitionWithRe * @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 summarize action results. + * @return summarize action results on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono summarizeForPolicyDefinitionAsync( + PolicyStatesSummaryResourceType policyStatesSummaryResource, String subscriptionId, String policyDefinitionName, Integer top, @@ -4482,7 +4703,7 @@ private Mono summarizeForPolicyDefinitionAsync( OffsetDateTime to, String filter) { return summarizeForPolicyDefinitionWithResponseAsync( - subscriptionId, policyDefinitionName, top, from, to, filter) + policyStatesSummaryResource, subscriptionId, policyDefinitionName, top, from, to, filter) .flatMap( (Response res) -> { if (res.getValue() != null) { @@ -4496,22 +4717,26 @@ private Mono summarizeForPolicyDefinitionAsync( /** * Summarizes policy states for the subscription level policy definition. * + * @param policyStatesSummaryResource The virtual resource under PolicyStates resource type for summarize action. In + * a given time range, 'latest' represents the latest policy state(s) and is the only allowed value. * @param subscriptionId Microsoft Azure subscription ID. * @param policyDefinitionName Policy definition name. * @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 summarize action results. + * @return summarize action results on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono summarizeForPolicyDefinitionAsync( - String subscriptionId, String policyDefinitionName) { + PolicyStatesSummaryResourceType policyStatesSummaryResource, + String subscriptionId, + String policyDefinitionName) { final Integer top = null; final OffsetDateTime from = null; final OffsetDateTime to = null; final String filter = null; return summarizeForPolicyDefinitionWithResponseAsync( - subscriptionId, policyDefinitionName, top, from, to, filter) + policyStatesSummaryResource, subscriptionId, policyDefinitionName, top, from, to, filter) .flatMap( (Response res) -> { if (res.getValue() != null) { @@ -4525,6 +4750,8 @@ private Mono summarizeForPolicyDefinitionAsync( /** * Summarizes policy states for the subscription level policy definition. * + * @param policyStatesSummaryResource The virtual resource under PolicyStates resource type for summarize action. In + * a given time range, 'latest' represents the latest policy state(s) and is the only allowed value. * @param subscriptionId Microsoft Azure subscription ID. * @param policyDefinitionName Policy definition name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -4533,17 +4760,24 @@ private Mono summarizeForPolicyDefinitionAsync( * @return summarize action results. */ @ServiceMethod(returns = ReturnType.SINGLE) - public SummarizeResultsInner summarizeForPolicyDefinition(String subscriptionId, String policyDefinitionName) { + public SummarizeResultsInner summarizeForPolicyDefinition( + PolicyStatesSummaryResourceType policyStatesSummaryResource, + String subscriptionId, + String policyDefinitionName) { final Integer top = null; final OffsetDateTime from = null; final OffsetDateTime to = null; final String filter = null; - return summarizeForPolicyDefinitionAsync(subscriptionId, policyDefinitionName, top, from, to, filter).block(); + return summarizeForPolicyDefinitionAsync( + policyStatesSummaryResource, subscriptionId, policyDefinitionName, top, from, to, filter) + .block(); } /** * Summarizes policy states for the subscription level policy definition. * + * @param policyStatesSummaryResource The virtual resource under PolicyStates resource type for summarize action. In + * a given time range, 'latest' represents the latest policy state(s) and is the only allowed value. * @param subscriptionId Microsoft Azure subscription ID. * @param policyDefinitionName Policy definition name. * @param top Maximum number of records to return. @@ -4556,10 +4790,11 @@ public SummarizeResultsInner summarizeForPolicyDefinition(String subscriptionId, * @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 summarize action results. + * @return summarize action results along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response summarizeForPolicyDefinitionWithResponse( + PolicyStatesSummaryResourceType policyStatesSummaryResource, String subscriptionId, String policyDefinitionName, Integer top, @@ -4568,7 +4803,7 @@ public Response summarizeForPolicyDefinitionWithResponse( String filter, Context context) { return summarizeForPolicyDefinitionWithResponseAsync( - subscriptionId, policyDefinitionName, top, from, to, filter, context) + policyStatesSummaryResource, subscriptionId, policyDefinitionName, top, from, to, filter, context) .block(); } @@ -4595,7 +4830,7 @@ public Response summarizeForPolicyDefinitionWithResponse( * @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 query results. + * @return query results along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listQueryResultsForSubscriptionLevelPolicyAssignmentSinglePageAsync( @@ -4687,7 +4922,7 @@ private Mono> listQueryResultsForSubscriptionLev * @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 query results. + * @return query results along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listQueryResultsForSubscriptionLevelPolicyAssignmentSinglePageAsync( @@ -4776,7 +5011,7 @@ private Mono> listQueryResultsForSubscriptionLev * @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 query results. + * @return query results as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listQueryResultsForSubscriptionLevelPolicyAssignmentAsync( @@ -4818,7 +5053,7 @@ private PagedFlux listQueryResultsForSubscriptionLevelPolicyAs * @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 query results. + * @return query results as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listQueryResultsForSubscriptionLevelPolicyAssignmentAsync( @@ -4872,7 +5107,7 @@ private PagedFlux listQueryResultsForSubscriptionLevelPolicyAs * @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 query results. + * @return query results as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listQueryResultsForSubscriptionLevelPolicyAssignmentAsync( @@ -4916,7 +5151,7 @@ private PagedFlux listQueryResultsForSubscriptionLevelPolicyAs * @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 query results. + * @return query results as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listQueryResultsForSubscriptionLevelPolicyAssignment( @@ -4968,7 +5203,7 @@ public PagedIterable listQueryResultsForSubscriptionLevelPolic * @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 query results. + * @return query results as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listQueryResultsForSubscriptionLevelPolicyAssignment( @@ -5003,6 +5238,8 @@ public PagedIterable listQueryResultsForSubscriptionLevelPolic /** * Summarizes policy states for the subscription level policy assignment. * + * @param policyStatesSummaryResource The virtual resource under PolicyStates resource type for summarize action. In + * a given time range, 'latest' represents the latest policy state(s) and is the only allowed value. * @param subscriptionId Microsoft Azure subscription ID. * @param policyAssignmentName Policy assignment name. * @param top Maximum number of records to return. @@ -5014,10 +5251,11 @@ public PagedIterable listQueryResultsForSubscriptionLevelPolic * @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 summarize action results. + * @return summarize action results along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> summarizeForSubscriptionLevelPolicyAssignmentWithResponseAsync( + PolicyStatesSummaryResourceType policyStatesSummaryResource, String subscriptionId, String policyAssignmentName, Integer top, @@ -5030,6 +5268,12 @@ private Mono> summarizeForSubscriptionLevelPolic new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } + if (policyStatesSummaryResource == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter policyStatesSummaryResource is required and cannot be null.")); + } if (subscriptionId == null) { return Mono.error(new IllegalArgumentException("Parameter subscriptionId is required and cannot be null.")); } @@ -5037,7 +5281,6 @@ private Mono> summarizeForSubscriptionLevelPolic return Mono .error(new IllegalArgumentException("Parameter policyAssignmentName is required and cannot be null.")); } - final String policyStatesSummaryResource = "latest"; final String authorizationNamespace = "Microsoft.Authorization"; final String apiVersion = "2019-10-01"; final String accept = "application/json"; @@ -5064,6 +5307,8 @@ private Mono> summarizeForSubscriptionLevelPolic /** * Summarizes policy states for the subscription level policy assignment. * + * @param policyStatesSummaryResource The virtual resource under PolicyStates resource type for summarize action. In + * a given time range, 'latest' represents the latest policy state(s) and is the only allowed value. * @param subscriptionId Microsoft Azure subscription ID. * @param policyAssignmentName Policy assignment name. * @param top Maximum number of records to return. @@ -5076,10 +5321,11 @@ private Mono> summarizeForSubscriptionLevelPolic * @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 summarize action results. + * @return summarize action results along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> summarizeForSubscriptionLevelPolicyAssignmentWithResponseAsync( + PolicyStatesSummaryResourceType policyStatesSummaryResource, String subscriptionId, String policyAssignmentName, Integer top, @@ -5093,6 +5339,12 @@ private Mono> summarizeForSubscriptionLevelPolic new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } + if (policyStatesSummaryResource == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter policyStatesSummaryResource is required and cannot be null.")); + } if (subscriptionId == null) { return Mono.error(new IllegalArgumentException("Parameter subscriptionId is required and cannot be null.")); } @@ -5100,7 +5352,6 @@ private Mono> summarizeForSubscriptionLevelPolic return Mono .error(new IllegalArgumentException("Parameter policyAssignmentName is required and cannot be null.")); } - final String policyStatesSummaryResource = "latest"; final String authorizationNamespace = "Microsoft.Authorization"; final String apiVersion = "2019-10-01"; final String accept = "application/json"; @@ -5124,6 +5375,8 @@ private Mono> summarizeForSubscriptionLevelPolic /** * Summarizes policy states for the subscription level policy assignment. * + * @param policyStatesSummaryResource The virtual resource under PolicyStates resource type for summarize action. In + * a given time range, 'latest' represents the latest policy state(s) and is the only allowed value. * @param subscriptionId Microsoft Azure subscription ID. * @param policyAssignmentName Policy assignment name. * @param top Maximum number of records to return. @@ -5135,10 +5388,11 @@ private Mono> summarizeForSubscriptionLevelPolic * @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 summarize action results. + * @return summarize action results on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono summarizeForSubscriptionLevelPolicyAssignmentAsync( + PolicyStatesSummaryResourceType policyStatesSummaryResource, String subscriptionId, String policyAssignmentName, Integer top, @@ -5146,7 +5400,7 @@ private Mono summarizeForSubscriptionLevelPolicyAssignmen OffsetDateTime to, String filter) { return summarizeForSubscriptionLevelPolicyAssignmentWithResponseAsync( - subscriptionId, policyAssignmentName, top, from, to, filter) + policyStatesSummaryResource, subscriptionId, policyAssignmentName, top, from, to, filter) .flatMap( (Response res) -> { if (res.getValue() != null) { @@ -5160,22 +5414,26 @@ private Mono summarizeForSubscriptionLevelPolicyAssignmen /** * Summarizes policy states for the subscription level policy assignment. * + * @param policyStatesSummaryResource The virtual resource under PolicyStates resource type for summarize action. In + * a given time range, 'latest' represents the latest policy state(s) and is the only allowed value. * @param subscriptionId Microsoft Azure subscription ID. * @param policyAssignmentName Policy assignment name. * @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 summarize action results. + * @return summarize action results on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono summarizeForSubscriptionLevelPolicyAssignmentAsync( - String subscriptionId, String policyAssignmentName) { + PolicyStatesSummaryResourceType policyStatesSummaryResource, + String subscriptionId, + String policyAssignmentName) { final Integer top = null; final OffsetDateTime from = null; final OffsetDateTime to = null; final String filter = null; return summarizeForSubscriptionLevelPolicyAssignmentWithResponseAsync( - subscriptionId, policyAssignmentName, top, from, to, filter) + policyStatesSummaryResource, subscriptionId, policyAssignmentName, top, from, to, filter) .flatMap( (Response res) -> { if (res.getValue() != null) { @@ -5189,6 +5447,8 @@ private Mono summarizeForSubscriptionLevelPolicyAssignmen /** * Summarizes policy states for the subscription level policy assignment. * + * @param policyStatesSummaryResource The virtual resource under PolicyStates resource type for summarize action. In + * a given time range, 'latest' represents the latest policy state(s) and is the only allowed value. * @param subscriptionId Microsoft Azure subscription ID. * @param policyAssignmentName Policy assignment name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -5198,19 +5458,23 @@ private Mono summarizeForSubscriptionLevelPolicyAssignmen */ @ServiceMethod(returns = ReturnType.SINGLE) public SummarizeResultsInner summarizeForSubscriptionLevelPolicyAssignment( - String subscriptionId, String policyAssignmentName) { + PolicyStatesSummaryResourceType policyStatesSummaryResource, + String subscriptionId, + String policyAssignmentName) { final Integer top = null; final OffsetDateTime from = null; final OffsetDateTime to = null; final String filter = null; return summarizeForSubscriptionLevelPolicyAssignmentAsync( - subscriptionId, policyAssignmentName, top, from, to, filter) + policyStatesSummaryResource, subscriptionId, policyAssignmentName, top, from, to, filter) .block(); } /** * Summarizes policy states for the subscription level policy assignment. * + * @param policyStatesSummaryResource The virtual resource under PolicyStates resource type for summarize action. In + * a given time range, 'latest' represents the latest policy state(s) and is the only allowed value. * @param subscriptionId Microsoft Azure subscription ID. * @param policyAssignmentName Policy assignment name. * @param top Maximum number of records to return. @@ -5223,10 +5487,11 @@ public SummarizeResultsInner summarizeForSubscriptionLevelPolicyAssignment( * @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 summarize action results. + * @return summarize action results along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response summarizeForSubscriptionLevelPolicyAssignmentWithResponse( + PolicyStatesSummaryResourceType policyStatesSummaryResource, String subscriptionId, String policyAssignmentName, Integer top, @@ -5235,7 +5500,7 @@ public Response summarizeForSubscriptionLevelPolicyAssign String filter, Context context) { return summarizeForSubscriptionLevelPolicyAssignmentWithResponseAsync( - subscriptionId, policyAssignmentName, top, from, to, filter, context) + policyStatesSummaryResource, subscriptionId, policyAssignmentName, top, from, to, filter, context) .block(); } @@ -5263,7 +5528,7 @@ public Response summarizeForSubscriptionLevelPolicyAssign * @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 query results. + * @return query results along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listQueryResultsForResourceGroupLevelPolicyAssignmentSinglePageAsync( @@ -5362,7 +5627,7 @@ private Mono> listQueryResultsForResourceGroupLe * @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 query results. + * @return query results along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listQueryResultsForResourceGroupLevelPolicyAssignmentSinglePageAsync( @@ -5458,7 +5723,7 @@ private Mono> listQueryResultsForResourceGroupLe * @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 query results. + * @return query results as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listQueryResultsForResourceGroupLevelPolicyAssignmentAsync( @@ -5503,7 +5768,7 @@ private PagedFlux listQueryResultsForResourceGroupLevelPolicyA * @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 query results. + * @return query results as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listQueryResultsForResourceGroupLevelPolicyAssignmentAsync( @@ -5562,7 +5827,7 @@ private PagedFlux listQueryResultsForResourceGroupLevelPolicyA * @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 query results. + * @return query results as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listQueryResultsForResourceGroupLevelPolicyAssignmentAsync( @@ -5609,7 +5874,7 @@ private PagedFlux listQueryResultsForResourceGroupLevelPolicyA * @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 query results. + * @return query results as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listQueryResultsForResourceGroupLevelPolicyAssignment( @@ -5666,7 +5931,7 @@ public PagedIterable listQueryResultsForResourceGroupLevelPoli * @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 query results. + * @return query results as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listQueryResultsForResourceGroupLevelPolicyAssignment( @@ -5703,6 +5968,8 @@ public PagedIterable listQueryResultsForResourceGroupLevelPoli /** * Summarizes policy states for the resource group level policy assignment. * + * @param policyStatesSummaryResource The virtual resource under PolicyStates resource type for summarize action. In + * a given time range, 'latest' represents the latest policy state(s) and is the only allowed value. * @param subscriptionId Microsoft Azure subscription ID. * @param resourceGroupName Resource group name. * @param policyAssignmentName Policy assignment name. @@ -5715,10 +5982,11 @@ public PagedIterable listQueryResultsForResourceGroupLevelPoli * @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 summarize action results. + * @return summarize action results along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> summarizeForResourceGroupLevelPolicyAssignmentWithResponseAsync( + PolicyStatesSummaryResourceType policyStatesSummaryResource, String subscriptionId, String resourceGroupName, String policyAssignmentName, @@ -5732,6 +6000,12 @@ private Mono> summarizeForResourceGroupLevelPoli new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } + if (policyStatesSummaryResource == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter policyStatesSummaryResource is required and cannot be null.")); + } if (subscriptionId == null) { return Mono.error(new IllegalArgumentException("Parameter subscriptionId is required and cannot be null.")); } @@ -5743,7 +6017,6 @@ private Mono> summarizeForResourceGroupLevelPoli return Mono .error(new IllegalArgumentException("Parameter policyAssignmentName is required and cannot be null.")); } - final String policyStatesSummaryResource = "latest"; final String authorizationNamespace = "Microsoft.Authorization"; final String apiVersion = "2019-10-01"; final String accept = "application/json"; @@ -5771,6 +6044,8 @@ private Mono> summarizeForResourceGroupLevelPoli /** * Summarizes policy states for the resource group level policy assignment. * + * @param policyStatesSummaryResource The virtual resource under PolicyStates resource type for summarize action. In + * a given time range, 'latest' represents the latest policy state(s) and is the only allowed value. * @param subscriptionId Microsoft Azure subscription ID. * @param resourceGroupName Resource group name. * @param policyAssignmentName Policy assignment name. @@ -5784,10 +6059,11 @@ private Mono> summarizeForResourceGroupLevelPoli * @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 summarize action results. + * @return summarize action results along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> summarizeForResourceGroupLevelPolicyAssignmentWithResponseAsync( + PolicyStatesSummaryResourceType policyStatesSummaryResource, String subscriptionId, String resourceGroupName, String policyAssignmentName, @@ -5802,6 +6078,12 @@ private Mono> summarizeForResourceGroupLevelPoli new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } + if (policyStatesSummaryResource == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter policyStatesSummaryResource is required and cannot be null.")); + } if (subscriptionId == null) { return Mono.error(new IllegalArgumentException("Parameter subscriptionId is required and cannot be null.")); } @@ -5813,7 +6095,6 @@ private Mono> summarizeForResourceGroupLevelPoli return Mono .error(new IllegalArgumentException("Parameter policyAssignmentName is required and cannot be null.")); } - final String policyStatesSummaryResource = "latest"; final String authorizationNamespace = "Microsoft.Authorization"; final String apiVersion = "2019-10-01"; final String accept = "application/json"; @@ -5838,6 +6119,8 @@ private Mono> summarizeForResourceGroupLevelPoli /** * Summarizes policy states for the resource group level policy assignment. * + * @param policyStatesSummaryResource The virtual resource under PolicyStates resource type for summarize action. In + * a given time range, 'latest' represents the latest policy state(s) and is the only allowed value. * @param subscriptionId Microsoft Azure subscription ID. * @param resourceGroupName Resource group name. * @param policyAssignmentName Policy assignment name. @@ -5850,10 +6133,11 @@ private Mono> summarizeForResourceGroupLevelPoli * @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 summarize action results. + * @return summarize action results on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono summarizeForResourceGroupLevelPolicyAssignmentAsync( + PolicyStatesSummaryResourceType policyStatesSummaryResource, String subscriptionId, String resourceGroupName, String policyAssignmentName, @@ -5862,7 +6146,14 @@ private Mono summarizeForResourceGroupLevelPolicyAssignme OffsetDateTime to, String filter) { return summarizeForResourceGroupLevelPolicyAssignmentWithResponseAsync( - subscriptionId, resourceGroupName, policyAssignmentName, top, from, to, filter) + policyStatesSummaryResource, + subscriptionId, + resourceGroupName, + policyAssignmentName, + top, + from, + to, + filter) .flatMap( (Response res) -> { if (res.getValue() != null) { @@ -5876,23 +6167,35 @@ private Mono summarizeForResourceGroupLevelPolicyAssignme /** * Summarizes policy states for the resource group level policy assignment. * + * @param policyStatesSummaryResource The virtual resource under PolicyStates resource type for summarize action. In + * a given time range, 'latest' represents the latest policy state(s) and is the only allowed value. * @param subscriptionId Microsoft Azure subscription ID. * @param resourceGroupName Resource group name. * @param policyAssignmentName Policy assignment name. * @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 summarize action results. + * @return summarize action results on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono summarizeForResourceGroupLevelPolicyAssignmentAsync( - String subscriptionId, String resourceGroupName, String policyAssignmentName) { + PolicyStatesSummaryResourceType policyStatesSummaryResource, + String subscriptionId, + String resourceGroupName, + String policyAssignmentName) { final Integer top = null; final OffsetDateTime from = null; final OffsetDateTime to = null; final String filter = null; return summarizeForResourceGroupLevelPolicyAssignmentWithResponseAsync( - subscriptionId, resourceGroupName, policyAssignmentName, top, from, to, filter) + policyStatesSummaryResource, + subscriptionId, + resourceGroupName, + policyAssignmentName, + top, + from, + to, + filter) .flatMap( (Response res) -> { if (res.getValue() != null) { @@ -5906,6 +6209,8 @@ private Mono summarizeForResourceGroupLevelPolicyAssignme /** * Summarizes policy states for the resource group level policy assignment. * + * @param policyStatesSummaryResource The virtual resource under PolicyStates resource type for summarize action. In + * a given time range, 'latest' represents the latest policy state(s) and is the only allowed value. * @param subscriptionId Microsoft Azure subscription ID. * @param resourceGroupName Resource group name. * @param policyAssignmentName Policy assignment name. @@ -5916,19 +6221,31 @@ private Mono summarizeForResourceGroupLevelPolicyAssignme */ @ServiceMethod(returns = ReturnType.SINGLE) public SummarizeResultsInner summarizeForResourceGroupLevelPolicyAssignment( - String subscriptionId, String resourceGroupName, String policyAssignmentName) { + PolicyStatesSummaryResourceType policyStatesSummaryResource, + String subscriptionId, + String resourceGroupName, + String policyAssignmentName) { final Integer top = null; final OffsetDateTime from = null; final OffsetDateTime to = null; final String filter = null; return summarizeForResourceGroupLevelPolicyAssignmentAsync( - subscriptionId, resourceGroupName, policyAssignmentName, top, from, to, filter) + policyStatesSummaryResource, + subscriptionId, + resourceGroupName, + policyAssignmentName, + top, + from, + to, + filter) .block(); } /** * Summarizes policy states for the resource group level policy assignment. * + * @param policyStatesSummaryResource The virtual resource under PolicyStates resource type for summarize action. In + * a given time range, 'latest' represents the latest policy state(s) and is the only allowed value. * @param subscriptionId Microsoft Azure subscription ID. * @param resourceGroupName Resource group name. * @param policyAssignmentName Policy assignment name. @@ -5942,10 +6259,11 @@ public SummarizeResultsInner summarizeForResourceGroupLevelPolicyAssignment( * @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 summarize action results. + * @return summarize action results along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response summarizeForResourceGroupLevelPolicyAssignmentWithResponse( + PolicyStatesSummaryResourceType policyStatesSummaryResource, String subscriptionId, String resourceGroupName, String policyAssignmentName, @@ -5955,7 +6273,15 @@ public Response summarizeForResourceGroupLevelPolicyAssig String filter, Context context) { return summarizeForResourceGroupLevelPolicyAssignmentWithResponseAsync( - subscriptionId, resourceGroupName, policyAssignmentName, top, from, to, filter, context) + policyStatesSummaryResource, + subscriptionId, + resourceGroupName, + policyAssignmentName, + top, + from, + to, + filter, + context) .block(); } @@ -5966,7 +6292,7 @@ public Response summarizeForResourceGroupLevelPolicyAssig * @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 query results. + * @return query results along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> nextLinkSinglePageAsync(String nextLink) { @@ -5995,7 +6321,7 @@ private Mono> nextLinkSinglePageAsync(String nex * @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 query results. + * @return query results along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> nextLinkSinglePageAsync(String nextLink, Context context) { diff --git a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/implementation/PolicyStatesImpl.java b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/implementation/PolicyStatesImpl.java index c9891b3a616d2..41c68e7031575 100644 --- a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/implementation/PolicyStatesImpl.java +++ b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/implementation/PolicyStatesImpl.java @@ -15,6 +15,7 @@ import com.azure.resourcemanager.policyinsights.models.PolicyState; import com.azure.resourcemanager.policyinsights.models.PolicyStates; import com.azure.resourcemanager.policyinsights.models.PolicyStatesResource; +import com.azure.resourcemanager.policyinsights.models.PolicyStatesSummaryResourceType; import com.azure.resourcemanager.policyinsights.models.SummarizeResults; import com.fasterxml.jackson.annotation.JsonIgnore; import java.time.OffsetDateTime; @@ -69,8 +70,10 @@ public PagedIterable listQueryResultsForManagementGroup( return Utils.mapPage(inner, inner1 -> new PolicyStateImpl(inner1, this.manager())); } - public SummarizeResults summarizeForManagementGroup(String managementGroupName) { - SummarizeResultsInner inner = this.serviceClient().summarizeForManagementGroup(managementGroupName); + public SummarizeResults summarizeForManagementGroup( + PolicyStatesSummaryResourceType policyStatesSummaryResource, String managementGroupName) { + SummarizeResultsInner inner = + this.serviceClient().summarizeForManagementGroup(policyStatesSummaryResource, managementGroupName); if (inner != null) { return new SummarizeResultsImpl(inner, this.manager()); } else { @@ -79,6 +82,7 @@ public SummarizeResults summarizeForManagementGroup(String managementGroupName) } public Response summarizeForManagementGroupWithResponse( + PolicyStatesSummaryResourceType policyStatesSummaryResource, String managementGroupName, Integer top, OffsetDateTime from, @@ -88,7 +92,8 @@ public Response summarizeForManagementGroupWithResponse( Response inner = this .serviceClient() - .summarizeForManagementGroupWithResponse(managementGroupName, top, from, to, filter, context); + .summarizeForManagementGroupWithResponse( + policyStatesSummaryResource, managementGroupName, top, from, to, filter, context); if (inner != null) { return new SimpleResponse<>( inner.getRequest(), @@ -137,8 +142,10 @@ public PagedIterable listQueryResultsForSubscription( return Utils.mapPage(inner, inner1 -> new PolicyStateImpl(inner1, this.manager())); } - public SummarizeResults summarizeForSubscription(String subscriptionId) { - SummarizeResultsInner inner = this.serviceClient().summarizeForSubscription(subscriptionId); + public SummarizeResults summarizeForSubscription( + PolicyStatesSummaryResourceType policyStatesSummaryResource, String subscriptionId) { + SummarizeResultsInner inner = + this.serviceClient().summarizeForSubscription(policyStatesSummaryResource, subscriptionId); if (inner != null) { return new SummarizeResultsImpl(inner, this.manager()); } else { @@ -147,9 +154,18 @@ public SummarizeResults summarizeForSubscription(String subscriptionId) { } public Response summarizeForSubscriptionWithResponse( - String subscriptionId, Integer top, OffsetDateTime from, OffsetDateTime to, String filter, Context context) { + PolicyStatesSummaryResourceType policyStatesSummaryResource, + String subscriptionId, + Integer top, + OffsetDateTime from, + OffsetDateTime to, + String filter, + Context context) { Response inner = - this.serviceClient().summarizeForSubscriptionWithResponse(subscriptionId, top, from, to, filter, context); + this + .serviceClient() + .summarizeForSubscriptionWithResponse( + policyStatesSummaryResource, subscriptionId, top, from, to, filter, context); if (inner != null) { return new SimpleResponse<>( inner.getRequest(), @@ -202,8 +218,12 @@ public PagedIterable listQueryResultsForResourceGroup( return Utils.mapPage(inner, inner1 -> new PolicyStateImpl(inner1, this.manager())); } - public SummarizeResults summarizeForResourceGroup(String subscriptionId, String resourceGroupName) { - SummarizeResultsInner inner = this.serviceClient().summarizeForResourceGroup(subscriptionId, resourceGroupName); + public SummarizeResults summarizeForResourceGroup( + PolicyStatesSummaryResourceType policyStatesSummaryResource, String subscriptionId, String resourceGroupName) { + SummarizeResultsInner inner = + this + .serviceClient() + .summarizeForResourceGroup(policyStatesSummaryResource, subscriptionId, resourceGroupName); if (inner != null) { return new SummarizeResultsImpl(inner, this.manager()); } else { @@ -212,6 +232,7 @@ public SummarizeResults summarizeForResourceGroup(String subscriptionId, String } public Response summarizeForResourceGroupWithResponse( + PolicyStatesSummaryResourceType policyStatesSummaryResource, String subscriptionId, String resourceGroupName, Integer top, @@ -223,7 +244,7 @@ public Response summarizeForResourceGroupWithResponse( this .serviceClient() .summarizeForResourceGroupWithResponse( - subscriptionId, resourceGroupName, top, from, to, filter, context); + policyStatesSummaryResource, subscriptionId, resourceGroupName, top, from, to, filter, context); if (inner != null) { return new SimpleResponse<>( inner.getRequest(), @@ -274,8 +295,10 @@ public PagedIterable listQueryResultsForResource( return Utils.mapPage(inner, inner1 -> new PolicyStateImpl(inner1, this.manager())); } - public SummarizeResults summarizeForResource(String resourceId) { - SummarizeResultsInner inner = this.serviceClient().summarizeForResource(resourceId); + public SummarizeResults summarizeForResource( + PolicyStatesSummaryResourceType policyStatesSummaryResource, String resourceId) { + SummarizeResultsInner inner = + this.serviceClient().summarizeForResource(policyStatesSummaryResource, resourceId); if (inner != null) { return new SummarizeResultsImpl(inner, this.manager()); } else { @@ -284,9 +307,18 @@ public SummarizeResults summarizeForResource(String resourceId) { } public Response summarizeForResourceWithResponse( - String resourceId, Integer top, OffsetDateTime from, OffsetDateTime to, String filter, Context context) { + PolicyStatesSummaryResourceType policyStatesSummaryResource, + String resourceId, + Integer top, + OffsetDateTime from, + OffsetDateTime to, + String filter, + Context context) { Response inner = - this.serviceClient().summarizeForResourceWithResponse(resourceId, top, from, to, filter, context); + this + .serviceClient() + .summarizeForResourceWithResponse( + policyStatesSummaryResource, resourceId, top, from, to, filter, context); if (inner != null) { return new SimpleResponse<>( inner.getRequest(), @@ -355,9 +387,14 @@ public PagedIterable listQueryResultsForPolicySetDefinition( return Utils.mapPage(inner, inner1 -> new PolicyStateImpl(inner1, this.manager())); } - public SummarizeResults summarizeForPolicySetDefinition(String subscriptionId, String policySetDefinitionName) { + public SummarizeResults summarizeForPolicySetDefinition( + PolicyStatesSummaryResourceType policyStatesSummaryResource, + String subscriptionId, + String policySetDefinitionName) { SummarizeResultsInner inner = - this.serviceClient().summarizeForPolicySetDefinition(subscriptionId, policySetDefinitionName); + this + .serviceClient() + .summarizeForPolicySetDefinition(policyStatesSummaryResource, subscriptionId, policySetDefinitionName); if (inner != null) { return new SummarizeResultsImpl(inner, this.manager()); } else { @@ -366,6 +403,7 @@ public SummarizeResults summarizeForPolicySetDefinition(String subscriptionId, S } public Response summarizeForPolicySetDefinitionWithResponse( + PolicyStatesSummaryResourceType policyStatesSummaryResource, String subscriptionId, String policySetDefinitionName, Integer top, @@ -377,7 +415,14 @@ public Response summarizeForPolicySetDefinitionWithResponse( this .serviceClient() .summarizeForPolicySetDefinitionWithResponse( - subscriptionId, policySetDefinitionName, top, from, to, filter, context); + policyStatesSummaryResource, + subscriptionId, + policySetDefinitionName, + top, + from, + to, + filter, + context); if (inner != null) { return new SimpleResponse<>( inner.getRequest(), @@ -430,9 +475,14 @@ public PagedIterable listQueryResultsForPolicyDefinition( return Utils.mapPage(inner, inner1 -> new PolicyStateImpl(inner1, this.manager())); } - public SummarizeResults summarizeForPolicyDefinition(String subscriptionId, String policyDefinitionName) { + public SummarizeResults summarizeForPolicyDefinition( + PolicyStatesSummaryResourceType policyStatesSummaryResource, + String subscriptionId, + String policyDefinitionName) { SummarizeResultsInner inner = - this.serviceClient().summarizeForPolicyDefinition(subscriptionId, policyDefinitionName); + this + .serviceClient() + .summarizeForPolicyDefinition(policyStatesSummaryResource, subscriptionId, policyDefinitionName); if (inner != null) { return new SummarizeResultsImpl(inner, this.manager()); } else { @@ -441,6 +491,7 @@ public SummarizeResults summarizeForPolicyDefinition(String subscriptionId, Stri } public Response summarizeForPolicyDefinitionWithResponse( + PolicyStatesSummaryResourceType policyStatesSummaryResource, String subscriptionId, String policyDefinitionName, Integer top, @@ -452,7 +503,7 @@ public Response summarizeForPolicyDefinitionWithResponse( this .serviceClient() .summarizeForPolicyDefinitionWithResponse( - subscriptionId, policyDefinitionName, top, from, to, filter, context); + policyStatesSummaryResource, subscriptionId, policyDefinitionName, top, from, to, filter, context); if (inner != null) { return new SimpleResponse<>( inner.getRequest(), @@ -507,9 +558,14 @@ public PagedIterable listQueryResultsForSubscriptionLevelPolicyAssi } public SummarizeResults summarizeForSubscriptionLevelPolicyAssignment( - String subscriptionId, String policyAssignmentName) { + PolicyStatesSummaryResourceType policyStatesSummaryResource, + String subscriptionId, + String policyAssignmentName) { SummarizeResultsInner inner = - this.serviceClient().summarizeForSubscriptionLevelPolicyAssignment(subscriptionId, policyAssignmentName); + this + .serviceClient() + .summarizeForSubscriptionLevelPolicyAssignment( + policyStatesSummaryResource, subscriptionId, policyAssignmentName); if (inner != null) { return new SummarizeResultsImpl(inner, this.manager()); } else { @@ -518,6 +574,7 @@ public SummarizeResults summarizeForSubscriptionLevelPolicyAssignment( } public Response summarizeForSubscriptionLevelPolicyAssignmentWithResponse( + PolicyStatesSummaryResourceType policyStatesSummaryResource, String subscriptionId, String policyAssignmentName, Integer top, @@ -529,7 +586,7 @@ public Response summarizeForSubscriptionLevelPolicyAssignmentW this .serviceClient() .summarizeForSubscriptionLevelPolicyAssignmentWithResponse( - subscriptionId, policyAssignmentName, top, from, to, filter, context); + policyStatesSummaryResource, subscriptionId, policyAssignmentName, top, from, to, filter, context); if (inner != null) { return new SimpleResponse<>( inner.getRequest(), @@ -589,12 +646,15 @@ public PagedIterable listQueryResultsForResourceGroupLevelPolicyAss } public SummarizeResults summarizeForResourceGroupLevelPolicyAssignment( - String subscriptionId, String resourceGroupName, String policyAssignmentName) { + PolicyStatesSummaryResourceType policyStatesSummaryResource, + String subscriptionId, + String resourceGroupName, + String policyAssignmentName) { SummarizeResultsInner inner = this .serviceClient() .summarizeForResourceGroupLevelPolicyAssignment( - subscriptionId, resourceGroupName, policyAssignmentName); + policyStatesSummaryResource, subscriptionId, resourceGroupName, policyAssignmentName); if (inner != null) { return new SummarizeResultsImpl(inner, this.manager()); } else { @@ -603,6 +663,7 @@ public SummarizeResults summarizeForResourceGroupLevelPolicyAssignment( } public Response summarizeForResourceGroupLevelPolicyAssignmentWithResponse( + PolicyStatesSummaryResourceType policyStatesSummaryResource, String subscriptionId, String resourceGroupName, String policyAssignmentName, @@ -615,7 +676,15 @@ public Response summarizeForResourceGroupLevelPolicyAssignment this .serviceClient() .summarizeForResourceGroupLevelPolicyAssignmentWithResponse( - subscriptionId, resourceGroupName, policyAssignmentName, top, from, to, filter, context); + policyStatesSummaryResource, + subscriptionId, + resourceGroupName, + policyAssignmentName, + top, + from, + to, + filter, + context); if (inner != null) { return new SimpleResponse<>( inner.getRequest(), diff --git a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/implementation/PolicyTrackedResourcesClientImpl.java b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/implementation/PolicyTrackedResourcesClientImpl.java index d9d2ada0359de..7814fdec5c673 100644 --- a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/implementation/PolicyTrackedResourcesClientImpl.java +++ b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/implementation/PolicyTrackedResourcesClientImpl.java @@ -30,6 +30,7 @@ import com.azure.resourcemanager.policyinsights.fluent.PolicyTrackedResourcesClient; import com.azure.resourcemanager.policyinsights.fluent.models.PolicyTrackedResourceInner; import com.azure.resourcemanager.policyinsights.models.PolicyTrackedResourcesQueryResults; +import com.azure.resourcemanager.policyinsights.models.PolicyTrackedResourcesResourceType; import reactor.core.publisher.Mono; /** An instance of this class provides access to all the operations defined in PolicyTrackedResourcesClient. */ @@ -71,7 +72,8 @@ Mono> listQueryResultsForManagement @HostParam("$host") String endpoint, @PathParam("managementGroupsNamespace") String managementGroupsNamespace, @PathParam("managementGroupName") String managementGroupName, - @PathParam("policyTrackedResourcesResource") String policyTrackedResourcesResource, + @PathParam("policyTrackedResourcesResource") + PolicyTrackedResourcesResourceType policyTrackedResourcesResource, @QueryParam("$top") Integer top, @QueryParam("$filter") String filter, @QueryParam("api-version") String apiVersion, @@ -86,7 +88,8 @@ Mono> listQueryResultsForManagement @UnexpectedResponseExceptionType(ManagementException.class) Mono> listQueryResultsForSubscription( @HostParam("$host") String endpoint, - @PathParam("policyTrackedResourcesResource") String policyTrackedResourcesResource, + @PathParam("policyTrackedResourcesResource") + PolicyTrackedResourcesResourceType policyTrackedResourcesResource, @QueryParam("$top") Integer top, @QueryParam("$filter") String filter, @PathParam("subscriptionId") String subscriptionId, @@ -103,7 +106,8 @@ Mono> listQueryResultsForSubscripti Mono> listQueryResultsForResourceGroup( @HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("policyTrackedResourcesResource") String policyTrackedResourcesResource, + @PathParam("policyTrackedResourcesResource") + PolicyTrackedResourcesResourceType policyTrackedResourcesResource, @QueryParam("$top") Integer top, @QueryParam("$filter") String filter, @PathParam("subscriptionId") String subscriptionId, @@ -120,7 +124,8 @@ Mono> listQueryResultsForResourceGr Mono> listQueryResultsForResource( @HostParam("$host") String endpoint, @PathParam(value = "resourceId", encoded = true) String resourceId, - @PathParam("policyTrackedResourcesResource") String policyTrackedResourcesResource, + @PathParam("policyTrackedResourcesResource") + PolicyTrackedResourcesResourceType policyTrackedResourcesResource, @QueryParam("$top") Integer top, @QueryParam("$filter") String filter, @QueryParam("api-version") String apiVersion, @@ -172,16 +177,21 @@ Mono> listQueryResultsForResourceNe * Queries policy tracked resources under the management group. * * @param managementGroupName Management group name. + * @param policyTrackedResourcesResource The name of the virtual resource under PolicyTrackedResources resource + * type; only "default" is allowed. * @param top Maximum number of records to return. * @param filter OData filter expression. * @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 query results. + * @return query results along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listQueryResultsForManagementGroupSinglePageAsync( - String managementGroupName, Integer top, String filter) { + String managementGroupName, + PolicyTrackedResourcesResourceType policyTrackedResourcesResource, + Integer top, + String filter) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -192,8 +202,13 @@ private Mono> listQueryResultsForManag return Mono .error(new IllegalArgumentException("Parameter managementGroupName is required and cannot be null.")); } + if (policyTrackedResourcesResource == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter policyTrackedResourcesResource is required and cannot be null.")); + } final String managementGroupsNamespace = "Microsoft.Management"; - final String policyTrackedResourcesResource = "default"; final String apiVersion = "2018-07-01-preview"; final String accept = "application/json"; return FluxUtil @@ -226,17 +241,23 @@ private Mono> listQueryResultsForManag * Queries policy tracked resources under the management group. * * @param managementGroupName Management group name. + * @param policyTrackedResourcesResource The name of the virtual resource under PolicyTrackedResources resource + * type; only "default" is allowed. * @param top Maximum number of records to return. * @param filter OData filter expression. * @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 query results. + * @return query results along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listQueryResultsForManagementGroupSinglePageAsync( - String managementGroupName, Integer top, String filter, Context context) { + String managementGroupName, + PolicyTrackedResourcesResourceType policyTrackedResourcesResource, + Integer top, + String filter, + Context context) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -247,8 +268,13 @@ private Mono> listQueryResultsForManag return Mono .error(new IllegalArgumentException("Parameter managementGroupName is required and cannot be null.")); } + if (policyTrackedResourcesResource == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter policyTrackedResourcesResource is required and cannot be null.")); + } final String managementGroupsNamespace = "Microsoft.Management"; - final String policyTrackedResourcesResource = "default"; final String apiVersion = "2018-07-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); @@ -278,18 +304,25 @@ private Mono> listQueryResultsForManag * Queries policy tracked resources under the management group. * * @param managementGroupName Management group name. + * @param policyTrackedResourcesResource The name of the virtual resource under PolicyTrackedResources resource + * type; only "default" is allowed. * @param top Maximum number of records to return. * @param filter OData filter expression. * @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 query results. + * @return query results as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listQueryResultsForManagementGroupAsync( - String managementGroupName, Integer top, String filter) { + String managementGroupName, + PolicyTrackedResourcesResourceType policyTrackedResourcesResource, + Integer top, + String filter) { return new PagedFlux<>( - () -> listQueryResultsForManagementGroupSinglePageAsync(managementGroupName, top, filter), + () -> + listQueryResultsForManagementGroupSinglePageAsync( + managementGroupName, policyTrackedResourcesResource, top, filter), nextLink -> listQueryResultsForManagementGroupNextSinglePageAsync(nextLink)); } @@ -297,17 +330,22 @@ private PagedFlux listQueryResultsForManagementGroup * Queries policy tracked resources under the management group. * * @param managementGroupName Management group name. + * @param policyTrackedResourcesResource The name of the virtual resource under PolicyTrackedResources resource + * type; only "default" is allowed. * @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 query results. + * @return query results as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listQueryResultsForManagementGroupAsync(String managementGroupName) { + private PagedFlux listQueryResultsForManagementGroupAsync( + String managementGroupName, PolicyTrackedResourcesResourceType policyTrackedResourcesResource) { final Integer top = null; final String filter = null; return new PagedFlux<>( - () -> listQueryResultsForManagementGroupSinglePageAsync(managementGroupName, top, filter), + () -> + listQueryResultsForManagementGroupSinglePageAsync( + managementGroupName, policyTrackedResourcesResource, top, filter), nextLink -> listQueryResultsForManagementGroupNextSinglePageAsync(nextLink)); } @@ -315,19 +353,27 @@ private PagedFlux listQueryResultsForManagementGroup * Queries policy tracked resources under the management group. * * @param managementGroupName Management group name. + * @param policyTrackedResourcesResource The name of the virtual resource under PolicyTrackedResources resource + * type; only "default" is allowed. * @param top Maximum number of records to return. * @param filter OData filter expression. * @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 query results. + * @return query results as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listQueryResultsForManagementGroupAsync( - String managementGroupName, Integer top, String filter, Context context) { + String managementGroupName, + PolicyTrackedResourcesResourceType policyTrackedResourcesResource, + Integer top, + String filter, + Context context) { return new PagedFlux<>( - () -> listQueryResultsForManagementGroupSinglePageAsync(managementGroupName, top, filter, context), + () -> + listQueryResultsForManagementGroupSinglePageAsync( + managementGroupName, policyTrackedResourcesResource, top, filter, context), nextLink -> listQueryResultsForManagementGroupNextSinglePageAsync(nextLink, context)); } @@ -335,62 +381,81 @@ private PagedFlux listQueryResultsForManagementGroup * Queries policy tracked resources under the management group. * * @param managementGroupName Management group name. + * @param policyTrackedResourcesResource The name of the virtual resource under PolicyTrackedResources resource + * type; only "default" is allowed. * @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 query results. + * @return query results as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listQueryResultsForManagementGroup(String managementGroupName) { + public PagedIterable listQueryResultsForManagementGroup( + String managementGroupName, PolicyTrackedResourcesResourceType policyTrackedResourcesResource) { final Integer top = null; final String filter = null; - return new PagedIterable<>(listQueryResultsForManagementGroupAsync(managementGroupName, top, filter)); + return new PagedIterable<>( + listQueryResultsForManagementGroupAsync(managementGroupName, policyTrackedResourcesResource, top, filter)); } /** * Queries policy tracked resources under the management group. * * @param managementGroupName Management group name. + * @param policyTrackedResourcesResource The name of the virtual resource under PolicyTrackedResources resource + * type; only "default" is allowed. * @param top Maximum number of records to return. * @param filter OData filter expression. * @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 query results. + * @return query results as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listQueryResultsForManagementGroup( - String managementGroupName, Integer top, String filter, Context context) { - return new PagedIterable<>(listQueryResultsForManagementGroupAsync(managementGroupName, top, filter, context)); + String managementGroupName, + PolicyTrackedResourcesResourceType policyTrackedResourcesResource, + Integer top, + String filter, + Context context) { + return new PagedIterable<>( + listQueryResultsForManagementGroupAsync( + managementGroupName, policyTrackedResourcesResource, top, filter, context)); } /** * Queries policy tracked resources under the subscription. * + * @param policyTrackedResourcesResource The name of the virtual resource under PolicyTrackedResources resource + * type; only "default" is allowed. * @param top Maximum number of records to return. * @param filter OData filter expression. * @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 query results. + * @return query results along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listQueryResultsForSubscriptionSinglePageAsync( - Integer top, String filter) { + PolicyTrackedResourcesResourceType policyTrackedResourcesResource, Integer top, String filter) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } + if (policyTrackedResourcesResource == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter policyTrackedResourcesResource is required and cannot be null.")); + } if (this.client.getSubscriptionId() == null) { return Mono .error( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String policyTrackedResourcesResource = "default"; final String apiVersion = "2018-07-01-preview"; final String accept = "application/json"; return FluxUtil @@ -421,30 +486,40 @@ private Mono> listQueryResultsForSubsc /** * Queries policy tracked resources under the subscription. * + * @param policyTrackedResourcesResource The name of the virtual resource under PolicyTrackedResources resource + * type; only "default" is allowed. * @param top Maximum number of records to return. * @param filter OData filter expression. * @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 query results. + * @return query results along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listQueryResultsForSubscriptionSinglePageAsync( - Integer top, String filter, Context context) { + PolicyTrackedResourcesResourceType policyTrackedResourcesResource, + Integer top, + String filter, + Context context) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } + if (policyTrackedResourcesResource == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter policyTrackedResourcesResource is required and cannot be null.")); + } if (this.client.getSubscriptionId() == null) { return Mono .error( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String policyTrackedResourcesResource = "default"; final String apiVersion = "2018-07-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); @@ -472,100 +547,127 @@ private Mono> listQueryResultsForSubsc /** * Queries policy tracked resources under the subscription. * + * @param policyTrackedResourcesResource The name of the virtual resource under PolicyTrackedResources resource + * type; only "default" is allowed. * @param top Maximum number of records to return. * @param filter OData filter expression. * @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 query results. + * @return query results as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listQueryResultsForSubscriptionAsync(Integer top, String filter) { + private PagedFlux listQueryResultsForSubscriptionAsync( + PolicyTrackedResourcesResourceType policyTrackedResourcesResource, Integer top, String filter) { return new PagedFlux<>( - () -> listQueryResultsForSubscriptionSinglePageAsync(top, filter), + () -> listQueryResultsForSubscriptionSinglePageAsync(policyTrackedResourcesResource, top, filter), nextLink -> listQueryResultsForSubscriptionNextSinglePageAsync(nextLink)); } /** * Queries policy tracked resources under the subscription. * + * @param policyTrackedResourcesResource The name of the virtual resource under PolicyTrackedResources resource + * type; only "default" is allowed. + * @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 query results. + * @return query results as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listQueryResultsForSubscriptionAsync() { + private PagedFlux listQueryResultsForSubscriptionAsync( + PolicyTrackedResourcesResourceType policyTrackedResourcesResource) { final Integer top = null; final String filter = null; return new PagedFlux<>( - () -> listQueryResultsForSubscriptionSinglePageAsync(top, filter), + () -> listQueryResultsForSubscriptionSinglePageAsync(policyTrackedResourcesResource, top, filter), nextLink -> listQueryResultsForSubscriptionNextSinglePageAsync(nextLink)); } /** * Queries policy tracked resources under the subscription. * + * @param policyTrackedResourcesResource The name of the virtual resource under PolicyTrackedResources resource + * type; only "default" is allowed. * @param top Maximum number of records to return. * @param filter OData filter expression. * @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 query results. + * @return query results as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listQueryResultsForSubscriptionAsync( - Integer top, String filter, Context context) { + PolicyTrackedResourcesResourceType policyTrackedResourcesResource, + Integer top, + String filter, + Context context) { return new PagedFlux<>( - () -> listQueryResultsForSubscriptionSinglePageAsync(top, filter, context), + () -> listQueryResultsForSubscriptionSinglePageAsync(policyTrackedResourcesResource, top, filter, context), nextLink -> listQueryResultsForSubscriptionNextSinglePageAsync(nextLink, context)); } /** * Queries policy tracked resources under the subscription. * + * @param policyTrackedResourcesResource The name of the virtual resource under PolicyTrackedResources resource + * type; only "default" is allowed. + * @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 query results. + * @return query results as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listQueryResultsForSubscription() { + public PagedIterable listQueryResultsForSubscription( + PolicyTrackedResourcesResourceType policyTrackedResourcesResource) { final Integer top = null; final String filter = null; - return new PagedIterable<>(listQueryResultsForSubscriptionAsync(top, filter)); + return new PagedIterable<>(listQueryResultsForSubscriptionAsync(policyTrackedResourcesResource, top, filter)); } /** * Queries policy tracked resources under the subscription. * + * @param policyTrackedResourcesResource The name of the virtual resource under PolicyTrackedResources resource + * type; only "default" is allowed. * @param top Maximum number of records to return. * @param filter OData filter expression. * @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 query results. + * @return query results as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listQueryResultsForSubscription( - Integer top, String filter, Context context) { - return new PagedIterable<>(listQueryResultsForSubscriptionAsync(top, filter, context)); + PolicyTrackedResourcesResourceType policyTrackedResourcesResource, + Integer top, + String filter, + Context context) { + return new PagedIterable<>( + listQueryResultsForSubscriptionAsync(policyTrackedResourcesResource, top, filter, context)); } /** * Queries policy tracked resources under the resource group. * * @param resourceGroupName Resource group name. + * @param policyTrackedResourcesResource The name of the virtual resource under PolicyTrackedResources resource + * type; only "default" is allowed. * @param top Maximum number of records to return. * @param filter OData filter expression. * @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 query results. + * @return query results along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listQueryResultsForResourceGroupSinglePageAsync( - String resourceGroupName, Integer top, String filter) { + String resourceGroupName, + PolicyTrackedResourcesResourceType policyTrackedResourcesResource, + Integer top, + String filter) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -576,13 +678,18 @@ private Mono> listQueryResultsForResou return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } + if (policyTrackedResourcesResource == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter policyTrackedResourcesResource is required and cannot be null.")); + } if (this.client.getSubscriptionId() == null) { return Mono .error( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String policyTrackedResourcesResource = "default"; final String apiVersion = "2018-07-01-preview"; final String accept = "application/json"; return FluxUtil @@ -615,17 +722,23 @@ private Mono> listQueryResultsForResou * Queries policy tracked resources under the resource group. * * @param resourceGroupName Resource group name. + * @param policyTrackedResourcesResource The name of the virtual resource under PolicyTrackedResources resource + * type; only "default" is allowed. * @param top Maximum number of records to return. * @param filter OData filter expression. * @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 query results. + * @return query results along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listQueryResultsForResourceGroupSinglePageAsync( - String resourceGroupName, Integer top, String filter, Context context) { + String resourceGroupName, + PolicyTrackedResourcesResourceType policyTrackedResourcesResource, + Integer top, + String filter, + Context context) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -636,13 +749,18 @@ private Mono> listQueryResultsForResou return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } + if (policyTrackedResourcesResource == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter policyTrackedResourcesResource is required and cannot be null.")); + } if (this.client.getSubscriptionId() == null) { return Mono .error( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String policyTrackedResourcesResource = "default"; final String apiVersion = "2018-07-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); @@ -672,18 +790,25 @@ private Mono> listQueryResultsForResou * Queries policy tracked resources under the resource group. * * @param resourceGroupName Resource group name. + * @param policyTrackedResourcesResource The name of the virtual resource under PolicyTrackedResources resource + * type; only "default" is allowed. * @param top Maximum number of records to return. * @param filter OData filter expression. * @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 query results. + * @return query results as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listQueryResultsForResourceGroupAsync( - String resourceGroupName, Integer top, String filter) { + String resourceGroupName, + PolicyTrackedResourcesResourceType policyTrackedResourcesResource, + Integer top, + String filter) { return new PagedFlux<>( - () -> listQueryResultsForResourceGroupSinglePageAsync(resourceGroupName, top, filter), + () -> + listQueryResultsForResourceGroupSinglePageAsync( + resourceGroupName, policyTrackedResourcesResource, top, filter), nextLink -> listQueryResultsForResourceGroupNextSinglePageAsync(nextLink)); } @@ -691,17 +816,22 @@ private PagedFlux listQueryResultsForResourceGroupAs * Queries policy tracked resources under the resource group. * * @param resourceGroupName Resource group name. + * @param policyTrackedResourcesResource The name of the virtual resource under PolicyTrackedResources resource + * type; only "default" is allowed. * @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 query results. + * @return query results as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listQueryResultsForResourceGroupAsync(String resourceGroupName) { + private PagedFlux listQueryResultsForResourceGroupAsync( + String resourceGroupName, PolicyTrackedResourcesResourceType policyTrackedResourcesResource) { final Integer top = null; final String filter = null; return new PagedFlux<>( - () -> listQueryResultsForResourceGroupSinglePageAsync(resourceGroupName, top, filter), + () -> + listQueryResultsForResourceGroupSinglePageAsync( + resourceGroupName, policyTrackedResourcesResource, top, filter), nextLink -> listQueryResultsForResourceGroupNextSinglePageAsync(nextLink)); } @@ -709,19 +839,27 @@ private PagedFlux listQueryResultsForResourceGroupAs * Queries policy tracked resources under the resource group. * * @param resourceGroupName Resource group name. + * @param policyTrackedResourcesResource The name of the virtual resource under PolicyTrackedResources resource + * type; only "default" is allowed. * @param top Maximum number of records to return. * @param filter OData filter expression. * @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 query results. + * @return query results as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listQueryResultsForResourceGroupAsync( - String resourceGroupName, Integer top, String filter, Context context) { + String resourceGroupName, + PolicyTrackedResourcesResourceType policyTrackedResourcesResource, + Integer top, + String filter, + Context context) { return new PagedFlux<>( - () -> listQueryResultsForResourceGroupSinglePageAsync(resourceGroupName, top, filter, context), + () -> + listQueryResultsForResourceGroupSinglePageAsync( + resourceGroupName, policyTrackedResourcesResource, top, filter, context), nextLink -> listQueryResultsForResourceGroupNextSinglePageAsync(nextLink, context)); } @@ -729,50 +867,67 @@ private PagedFlux listQueryResultsForResourceGroupAs * Queries policy tracked resources under the resource group. * * @param resourceGroupName Resource group name. + * @param policyTrackedResourcesResource The name of the virtual resource under PolicyTrackedResources resource + * type; only "default" is allowed. * @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 query results. + * @return query results as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listQueryResultsForResourceGroup(String resourceGroupName) { + public PagedIterable listQueryResultsForResourceGroup( + String resourceGroupName, PolicyTrackedResourcesResourceType policyTrackedResourcesResource) { final Integer top = null; final String filter = null; - return new PagedIterable<>(listQueryResultsForResourceGroupAsync(resourceGroupName, top, filter)); + return new PagedIterable<>( + listQueryResultsForResourceGroupAsync(resourceGroupName, policyTrackedResourcesResource, top, filter)); } /** * Queries policy tracked resources under the resource group. * * @param resourceGroupName Resource group name. + * @param policyTrackedResourcesResource The name of the virtual resource under PolicyTrackedResources resource + * type; only "default" is allowed. * @param top Maximum number of records to return. * @param filter OData filter expression. * @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 query results. + * @return query results as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listQueryResultsForResourceGroup( - String resourceGroupName, Integer top, String filter, Context context) { - return new PagedIterable<>(listQueryResultsForResourceGroupAsync(resourceGroupName, top, filter, context)); + String resourceGroupName, + PolicyTrackedResourcesResourceType policyTrackedResourcesResource, + Integer top, + String filter, + Context context) { + return new PagedIterable<>( + listQueryResultsForResourceGroupAsync( + resourceGroupName, policyTrackedResourcesResource, top, filter, context)); } /** * Queries policy tracked resources under the resource. * * @param resourceId Resource ID. + * @param policyTrackedResourcesResource The name of the virtual resource under PolicyTrackedResources resource + * type; only "default" is allowed. * @param top Maximum number of records to return. * @param filter OData filter expression. * @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 query results. + * @return query results along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listQueryResultsForResourceSinglePageAsync( - String resourceId, Integer top, String filter) { + String resourceId, + PolicyTrackedResourcesResourceType policyTrackedResourcesResource, + Integer top, + String filter) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -782,7 +937,12 @@ private Mono> listQueryResultsForResou if (resourceId == null) { return Mono.error(new IllegalArgumentException("Parameter resourceId is required and cannot be null.")); } - final String policyTrackedResourcesResource = "default"; + if (policyTrackedResourcesResource == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter policyTrackedResourcesResource is required and cannot be null.")); + } final String apiVersion = "2018-07-01-preview"; final String accept = "application/json"; return FluxUtil @@ -814,17 +974,23 @@ private Mono> listQueryResultsForResou * Queries policy tracked resources under the resource. * * @param resourceId Resource ID. + * @param policyTrackedResourcesResource The name of the virtual resource under PolicyTrackedResources resource + * type; only "default" is allowed. * @param top Maximum number of records to return. * @param filter OData filter expression. * @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 query results. + * @return query results along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listQueryResultsForResourceSinglePageAsync( - String resourceId, Integer top, String filter, Context context) { + String resourceId, + PolicyTrackedResourcesResourceType policyTrackedResourcesResource, + Integer top, + String filter, + Context context) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -834,7 +1000,12 @@ private Mono> listQueryResultsForResou if (resourceId == null) { return Mono.error(new IllegalArgumentException("Parameter resourceId is required and cannot be null.")); } - final String policyTrackedResourcesResource = "default"; + if (policyTrackedResourcesResource == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter policyTrackedResourcesResource is required and cannot be null.")); + } final String apiVersion = "2018-07-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); @@ -863,18 +1034,23 @@ private Mono> listQueryResultsForResou * Queries policy tracked resources under the resource. * * @param resourceId Resource ID. + * @param policyTrackedResourcesResource The name of the virtual resource under PolicyTrackedResources resource + * type; only "default" is allowed. * @param top Maximum number of records to return. * @param filter OData filter expression. * @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 query results. + * @return query results as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listQueryResultsForResourceAsync( - String resourceId, Integer top, String filter) { + String resourceId, + PolicyTrackedResourcesResourceType policyTrackedResourcesResource, + Integer top, + String filter) { return new PagedFlux<>( - () -> listQueryResultsForResourceSinglePageAsync(resourceId, top, filter), + () -> listQueryResultsForResourceSinglePageAsync(resourceId, policyTrackedResourcesResource, top, filter), nextLink -> listQueryResultsForResourceNextSinglePageAsync(nextLink)); } @@ -882,17 +1058,20 @@ private PagedFlux listQueryResultsForResourceAsync( * Queries policy tracked resources under the resource. * * @param resourceId Resource ID. + * @param policyTrackedResourcesResource The name of the virtual resource under PolicyTrackedResources resource + * type; only "default" is allowed. * @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 query results. + * @return query results as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listQueryResultsForResourceAsync(String resourceId) { + private PagedFlux listQueryResultsForResourceAsync( + String resourceId, PolicyTrackedResourcesResourceType policyTrackedResourcesResource) { final Integer top = null; final String filter = null; return new PagedFlux<>( - () -> listQueryResultsForResourceSinglePageAsync(resourceId, top, filter), + () -> listQueryResultsForResourceSinglePageAsync(resourceId, policyTrackedResourcesResource, top, filter), nextLink -> listQueryResultsForResourceNextSinglePageAsync(nextLink)); } @@ -900,19 +1079,27 @@ private PagedFlux listQueryResultsForResourceAsync(S * Queries policy tracked resources under the resource. * * @param resourceId Resource ID. + * @param policyTrackedResourcesResource The name of the virtual resource under PolicyTrackedResources resource + * type; only "default" is allowed. * @param top Maximum number of records to return. * @param filter OData filter expression. * @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 query results. + * @return query results as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listQueryResultsForResourceAsync( - String resourceId, Integer top, String filter, Context context) { + String resourceId, + PolicyTrackedResourcesResourceType policyTrackedResourcesResource, + Integer top, + String filter, + Context context) { return new PagedFlux<>( - () -> listQueryResultsForResourceSinglePageAsync(resourceId, top, filter, context), + () -> + listQueryResultsForResourceSinglePageAsync( + resourceId, policyTrackedResourcesResource, top, filter, context), nextLink -> listQueryResultsForResourceNextSinglePageAsync(nextLink, context)); } @@ -920,34 +1107,45 @@ private PagedFlux listQueryResultsForResourceAsync( * Queries policy tracked resources under the resource. * * @param resourceId Resource ID. + * @param policyTrackedResourcesResource The name of the virtual resource under PolicyTrackedResources resource + * type; only "default" is allowed. * @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 query results. + * @return query results as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listQueryResultsForResource(String resourceId) { + public PagedIterable listQueryResultsForResource( + String resourceId, PolicyTrackedResourcesResourceType policyTrackedResourcesResource) { final Integer top = null; final String filter = null; - return new PagedIterable<>(listQueryResultsForResourceAsync(resourceId, top, filter)); + return new PagedIterable<>( + listQueryResultsForResourceAsync(resourceId, policyTrackedResourcesResource, top, filter)); } /** * Queries policy tracked resources under the resource. * * @param resourceId Resource ID. + * @param policyTrackedResourcesResource The name of the virtual resource under PolicyTrackedResources resource + * type; only "default" is allowed. * @param top Maximum number of records to return. * @param filter OData filter expression. * @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 query results. + * @return query results as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listQueryResultsForResource( - String resourceId, Integer top, String filter, Context context) { - return new PagedIterable<>(listQueryResultsForResourceAsync(resourceId, top, filter, context)); + String resourceId, + PolicyTrackedResourcesResourceType policyTrackedResourcesResource, + Integer top, + String filter, + Context context) { + return new PagedIterable<>( + listQueryResultsForResourceAsync(resourceId, policyTrackedResourcesResource, top, filter, context)); } /** @@ -957,7 +1155,7 @@ public PagedIterable listQueryResultsForResource( * @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 query results. + * @return query results along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listQueryResultsForManagementGroupNextSinglePageAsync( @@ -997,7 +1195,7 @@ private Mono> listQueryResultsForManag * @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 query results. + * @return query results along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listQueryResultsForManagementGroupNextSinglePageAsync( @@ -1033,7 +1231,7 @@ private Mono> listQueryResultsForManag * @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 query results. + * @return query results along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listQueryResultsForSubscriptionNextSinglePageAsync( @@ -1072,7 +1270,7 @@ private Mono> listQueryResultsForSubsc * @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 query results. + * @return query results along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listQueryResultsForSubscriptionNextSinglePageAsync( @@ -1108,7 +1306,7 @@ private Mono> listQueryResultsForSubsc * @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 query results. + * @return query results along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listQueryResultsForResourceGroupNextSinglePageAsync( @@ -1147,7 +1345,7 @@ private Mono> listQueryResultsForResou * @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 query results. + * @return query results along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listQueryResultsForResourceGroupNextSinglePageAsync( @@ -1183,7 +1381,7 @@ private Mono> listQueryResultsForResou * @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 query results. + * @return query results along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listQueryResultsForResourceNextSinglePageAsync( @@ -1222,7 +1420,7 @@ private Mono> listQueryResultsForResou * @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 query results. + * @return query results along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listQueryResultsForResourceNextSinglePageAsync( diff --git a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/implementation/PolicyTrackedResourcesImpl.java b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/implementation/PolicyTrackedResourcesImpl.java index 90c7c3d56356b..f6e0e5251df71 100644 --- a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/implementation/PolicyTrackedResourcesImpl.java +++ b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/implementation/PolicyTrackedResourcesImpl.java @@ -11,6 +11,7 @@ import com.azure.resourcemanager.policyinsights.fluent.models.PolicyTrackedResourceInner; import com.azure.resourcemanager.policyinsights.models.PolicyTrackedResource; import com.azure.resourcemanager.policyinsights.models.PolicyTrackedResources; +import com.azure.resourcemanager.policyinsights.models.PolicyTrackedResourcesResourceType; import com.fasterxml.jackson.annotation.JsonIgnore; public final class PolicyTrackedResourcesImpl implements PolicyTrackedResources { @@ -27,53 +28,84 @@ public PolicyTrackedResourcesImpl( this.serviceManager = serviceManager; } - public PagedIterable listQueryResultsForManagementGroup(String managementGroupName) { + public PagedIterable listQueryResultsForManagementGroup( + String managementGroupName, PolicyTrackedResourcesResourceType policyTrackedResourcesResource) { PagedIterable inner = - this.serviceClient().listQueryResultsForManagementGroup(managementGroupName); + this + .serviceClient() + .listQueryResultsForManagementGroup(managementGroupName, policyTrackedResourcesResource); return Utils.mapPage(inner, inner1 -> new PolicyTrackedResourceImpl(inner1, this.manager())); } public PagedIterable listQueryResultsForManagementGroup( - String managementGroupName, Integer top, String filter, Context context) { + String managementGroupName, + PolicyTrackedResourcesResourceType policyTrackedResourcesResource, + Integer top, + String filter, + Context context) { PagedIterable inner = - this.serviceClient().listQueryResultsForManagementGroup(managementGroupName, top, filter, context); + this + .serviceClient() + .listQueryResultsForManagementGroup( + managementGroupName, policyTrackedResourcesResource, top, filter, context); return Utils.mapPage(inner, inner1 -> new PolicyTrackedResourceImpl(inner1, this.manager())); } - public PagedIterable listQueryResultsForSubscription() { - PagedIterable inner = this.serviceClient().listQueryResultsForSubscription(); + public PagedIterable listQueryResultsForSubscription( + PolicyTrackedResourcesResourceType policyTrackedResourcesResource) { + PagedIterable inner = + this.serviceClient().listQueryResultsForSubscription(policyTrackedResourcesResource); return Utils.mapPage(inner, inner1 -> new PolicyTrackedResourceImpl(inner1, this.manager())); } public PagedIterable listQueryResultsForSubscription( - Integer top, String filter, Context context) { + PolicyTrackedResourcesResourceType policyTrackedResourcesResource, + Integer top, + String filter, + Context context) { PagedIterable inner = - this.serviceClient().listQueryResultsForSubscription(top, filter, context); + this.serviceClient().listQueryResultsForSubscription(policyTrackedResourcesResource, top, filter, context); return Utils.mapPage(inner, inner1 -> new PolicyTrackedResourceImpl(inner1, this.manager())); } - public PagedIterable listQueryResultsForResourceGroup(String resourceGroupName) { + public PagedIterable listQueryResultsForResourceGroup( + String resourceGroupName, PolicyTrackedResourcesResourceType policyTrackedResourcesResource) { PagedIterable inner = - this.serviceClient().listQueryResultsForResourceGroup(resourceGroupName); + this.serviceClient().listQueryResultsForResourceGroup(resourceGroupName, policyTrackedResourcesResource); return Utils.mapPage(inner, inner1 -> new PolicyTrackedResourceImpl(inner1, this.manager())); } public PagedIterable listQueryResultsForResourceGroup( - String resourceGroupName, Integer top, String filter, Context context) { + String resourceGroupName, + PolicyTrackedResourcesResourceType policyTrackedResourcesResource, + Integer top, + String filter, + Context context) { PagedIterable inner = - this.serviceClient().listQueryResultsForResourceGroup(resourceGroupName, top, filter, context); + this + .serviceClient() + .listQueryResultsForResourceGroup( + resourceGroupName, policyTrackedResourcesResource, top, filter, context); return Utils.mapPage(inner, inner1 -> new PolicyTrackedResourceImpl(inner1, this.manager())); } - public PagedIterable listQueryResultsForResource(String resourceId) { - PagedIterable inner = this.serviceClient().listQueryResultsForResource(resourceId); + public PagedIterable listQueryResultsForResource( + String resourceId, PolicyTrackedResourcesResourceType policyTrackedResourcesResource) { + PagedIterable inner = + this.serviceClient().listQueryResultsForResource(resourceId, policyTrackedResourcesResource); return Utils.mapPage(inner, inner1 -> new PolicyTrackedResourceImpl(inner1, this.manager())); } public PagedIterable listQueryResultsForResource( - String resourceId, Integer top, String filter, Context context) { + String resourceId, + PolicyTrackedResourcesResourceType policyTrackedResourcesResource, + Integer top, + String filter, + Context context) { PagedIterable inner = - this.serviceClient().listQueryResultsForResource(resourceId, top, filter, context); + this + .serviceClient() + .listQueryResultsForResource(resourceId, policyTrackedResourcesResource, top, filter, context); return Utils.mapPage(inner, inner1 -> new PolicyTrackedResourceImpl(inner1, this.manager())); } diff --git a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/implementation/RemediationsClientImpl.java b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/implementation/RemediationsClientImpl.java index ead084752cb6b..0d8359bf25387 100644 --- a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/implementation/RemediationsClientImpl.java +++ b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/implementation/RemediationsClientImpl.java @@ -494,7 +494,8 @@ Mono> listForResourceNext( * @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 all deployments for a remediation at management group scope. + * @return all deployments for a remediation at management group scope along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listDeploymentsAtManagementGroupSinglePageAsync( @@ -551,7 +552,8 @@ private Mono> listDeploymentsAtManagem * @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 all deployments for a remediation at management group scope. + * @return all deployments for a remediation at management group scope along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listDeploymentsAtManagementGroupSinglePageAsync( @@ -604,7 +606,7 @@ private Mono> listDeploymentsAtManagem * @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 all deployments for a remediation at management group scope. + * @return all deployments for a remediation at management group scope as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listDeploymentsAtManagementGroupAsync( @@ -622,7 +624,7 @@ private PagedFlux listDeploymentsAtManagementGroupAs * @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 all deployments for a remediation at management group scope. + * @return all deployments for a remediation at management group scope as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listDeploymentsAtManagementGroupAsync( @@ -643,7 +645,7 @@ private PagedFlux listDeploymentsAtManagementGroupAs * @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 all deployments for a remediation at management group scope. + * @return all deployments for a remediation at management group scope as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listDeploymentsAtManagementGroupAsync( @@ -661,7 +663,8 @@ private PagedFlux listDeploymentsAtManagementGroupAs * @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 all deployments for a remediation at management group scope. + * @return all deployments for a remediation at management group scope as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listDeploymentsAtManagementGroup( @@ -680,7 +683,8 @@ public PagedIterable listDeploymentsAtManagementGrou * @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 all deployments for a remediation at management group scope. + * @return all deployments for a remediation at management group scope as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listDeploymentsAtManagementGroup( @@ -697,7 +701,7 @@ public PagedIterable listDeploymentsAtManagementGrou * @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 remediation definition. + * @return the remediation definition along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> cancelAtManagementGroupWithResponseAsync( @@ -743,7 +747,7 @@ private Mono> cancelAtManagementGroupWithResponseAsyn * @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 remediation definition. + * @return the remediation definition along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> cancelAtManagementGroupWithResponseAsync( @@ -785,7 +789,7 @@ private Mono> cancelAtManagementGroupWithResponseAsyn * @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 remediation definition. + * @return the remediation definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono cancelAtManagementGroupAsync(String managementGroupId, String remediationName) { @@ -824,7 +828,7 @@ public RemediationInner cancelAtManagementGroup(String managementGroupId, String * @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 remediation definition. + * @return the remediation definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response cancelAtManagementGroupWithResponse( @@ -841,7 +845,8 @@ public Response cancelAtManagementGroupWithResponse( * @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 all remediations for the management group. + * @return all remediations for the management group along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listForManagementGroupSinglePageAsync( @@ -894,7 +899,8 @@ private Mono> listForManagementGroupSinglePageAs * @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 all remediations for the management group. + * @return all remediations for the management group along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listForManagementGroupSinglePageAsync( @@ -943,7 +949,7 @@ private Mono> listForManagementGroupSinglePageAs * @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 all remediations for the management group. + * @return all remediations for the management group as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listForManagementGroupAsync( @@ -960,7 +966,7 @@ private PagedFlux listForManagementGroupAsync( * @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 all remediations for the management group. + * @return all remediations for the management group as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listForManagementGroupAsync(String managementGroupId) { @@ -981,7 +987,7 @@ private PagedFlux listForManagementGroupAsync(String managemen * @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 all remediations for the management group. + * @return all remediations for the management group as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listForManagementGroupAsync( @@ -998,7 +1004,7 @@ private PagedFlux listForManagementGroupAsync( * @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 all remediations for the management group. + * @return all remediations for the management group as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listForManagementGroup(String managementGroupId) { @@ -1017,7 +1023,7 @@ public PagedIterable listForManagementGroup(String managementG * @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 all remediations for the management group. + * @return all remediations for the management group as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listForManagementGroup( @@ -1034,7 +1040,7 @@ public PagedIterable listForManagementGroup( * @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 remediation definition. + * @return the remediation definition along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createOrUpdateAtManagementGroupWithResponseAsync( @@ -1087,7 +1093,7 @@ private Mono> createOrUpdateAtManagementGroupWithResp * @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 remediation definition. + * @return the remediation definition along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createOrUpdateAtManagementGroupWithResponseAsync( @@ -1136,7 +1142,7 @@ private Mono> createOrUpdateAtManagementGroupWithResp * @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 remediation definition. + * @return the remediation definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAtManagementGroupAsync( @@ -1179,7 +1185,7 @@ public RemediationInner createOrUpdateAtManagementGroup( * @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 remediation definition. + * @return the remediation definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response createOrUpdateAtManagementGroupWithResponse( @@ -1196,7 +1202,8 @@ public Response createOrUpdateAtManagementGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an existing remediation at management group scope. + * @return an existing remediation at management group scope along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getAtManagementGroupWithResponseAsync( @@ -1242,7 +1249,8 @@ private Mono> getAtManagementGroupWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an existing remediation at management group scope. + * @return an existing remediation at management group scope along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getAtManagementGroupWithResponseAsync( @@ -1284,7 +1292,7 @@ private Mono> getAtManagementGroupWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an existing remediation at management group scope. + * @return an existing remediation at management group scope on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAtManagementGroupAsync(String managementGroupId, String remediationName) { @@ -1323,7 +1331,7 @@ public RemediationInner getAtManagementGroup(String managementGroupId, String re * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an existing remediation at management group scope. + * @return an existing remediation at management group scope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getAtManagementGroupWithResponse( @@ -1339,7 +1347,7 @@ public Response getAtManagementGroupWithResponse( * @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 remediation definition. + * @return the remediation definition along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteAtManagementGroupWithResponseAsync( @@ -1385,7 +1393,7 @@ private Mono> deleteAtManagementGroupWithResponseAsyn * @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 remediation definition. + * @return the remediation definition along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteAtManagementGroupWithResponseAsync( @@ -1427,7 +1435,7 @@ private Mono> deleteAtManagementGroupWithResponseAsyn * @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 remediation definition. + * @return the remediation definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAtManagementGroupAsync(String managementGroupId, String remediationName) { @@ -1466,7 +1474,7 @@ public RemediationInner deleteAtManagementGroup(String managementGroupId, String * @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 remediation definition. + * @return the remediation definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response deleteAtManagementGroupWithResponse( @@ -1482,7 +1490,8 @@ public Response deleteAtManagementGroupWithResponse( * @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 all deployments for a remediation at subscription scope. + * @return all deployments for a remediation at subscription scope along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listDeploymentsAtSubscriptionSinglePageAsync( @@ -1538,7 +1547,8 @@ private Mono> listDeploymentsAtSubscri * @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 all deployments for a remediation at subscription scope. + * @return all deployments for a remediation at subscription scope along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listDeploymentsAtSubscriptionSinglePageAsync( @@ -1590,7 +1600,7 @@ private Mono> listDeploymentsAtSubscri * @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 all deployments for a remediation at subscription scope. + * @return all deployments for a remediation at subscription scope as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listDeploymentsAtSubscriptionAsync( @@ -1607,7 +1617,7 @@ private PagedFlux listDeploymentsAtSubscriptionAsync * @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 all deployments for a remediation at subscription scope. + * @return all deployments for a remediation at subscription scope as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listDeploymentsAtSubscriptionAsync(String remediationName) { @@ -1626,7 +1636,7 @@ private PagedFlux listDeploymentsAtSubscriptionAsync * @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 all deployments for a remediation at subscription scope. + * @return all deployments for a remediation at subscription scope as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listDeploymentsAtSubscriptionAsync( @@ -1643,7 +1653,7 @@ private PagedFlux listDeploymentsAtSubscriptionAsync * @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 all deployments for a remediation at subscription scope. + * @return all deployments for a remediation at subscription scope as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listDeploymentsAtSubscription(String remediationName) { @@ -1660,7 +1670,7 @@ public PagedIterable listDeploymentsAtSubscription(S * @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 all deployments for a remediation at subscription scope. + * @return all deployments for a remediation at subscription scope as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listDeploymentsAtSubscription( @@ -1675,7 +1685,7 @@ public PagedIterable listDeploymentsAtSubscription( * @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 remediation definition. + * @return the remediation definition along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> cancelAtSubscriptionWithResponseAsync(String remediationName) { @@ -1719,7 +1729,7 @@ private Mono> cancelAtSubscriptionWithResponseAsync(S * @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 remediation definition. + * @return the remediation definition along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> cancelAtSubscriptionWithResponseAsync( @@ -1760,7 +1770,7 @@ private Mono> cancelAtSubscriptionWithResponseAsync( * @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 remediation definition. + * @return the remediation definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono cancelAtSubscriptionAsync(String remediationName) { @@ -1797,7 +1807,7 @@ public RemediationInner cancelAtSubscription(String remediationName) { * @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 remediation definition. + * @return the remediation definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response cancelAtSubscriptionWithResponse(String remediationName, Context context) { @@ -1812,7 +1822,8 @@ public Response cancelAtSubscriptionWithResponse(String remedi * @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 all remediations for the subscription. + * @return all remediations for the subscription along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Integer top, String filter) { @@ -1863,7 +1874,8 @@ private Mono> listSinglePageAsync(Integer top, S * @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 all remediations for the subscription. + * @return all remediations for the subscription along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Integer top, String filter, Context context) { @@ -1903,7 +1915,7 @@ private Mono> listSinglePageAsync(Integer top, S * @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 all remediations for the subscription. + * @return all remediations for the subscription as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Integer top, String filter) { @@ -1916,7 +1928,7 @@ private PagedFlux listAsync(Integer top, String filter) { * * @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 all remediations for the subscription. + * @return all remediations for the subscription as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { @@ -1935,7 +1947,7 @@ private PagedFlux listAsync() { * @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 all remediations for the subscription. + * @return all remediations for the subscription as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Integer top, String filter, Context context) { @@ -1949,7 +1961,7 @@ private PagedFlux listAsync(Integer top, String filter, Contex * * @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 all remediations for the subscription. + * @return all remediations for the subscription as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { @@ -1967,7 +1979,7 @@ public PagedIterable list() { * @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 all remediations for the subscription. + * @return all remediations for the subscription as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Integer top, String filter, Context context) { @@ -1982,7 +1994,7 @@ public PagedIterable list(Integer top, String filter, 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 remediation definition. + * @return the remediation definition along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createOrUpdateAtSubscriptionWithResponseAsync( @@ -2034,7 +2046,7 @@ private Mono> createOrUpdateAtSubscriptionWithRespons * @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 remediation definition. + * @return the remediation definition along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createOrUpdateAtSubscriptionWithResponseAsync( @@ -2082,7 +2094,7 @@ private Mono> createOrUpdateAtSubscriptionWithRespons * @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 remediation definition. + * @return the remediation definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAtSubscriptionAsync( @@ -2122,7 +2134,7 @@ public RemediationInner createOrUpdateAtSubscription(String remediationName, Rem * @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 remediation definition. + * @return the remediation definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response createOrUpdateAtSubscriptionWithResponse( @@ -2137,7 +2149,8 @@ public Response createOrUpdateAtSubscriptionWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an existing remediation at subscription scope. + * @return an existing remediation at subscription scope along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getAtSubscriptionWithResponseAsync(String remediationName) { @@ -2181,7 +2194,8 @@ private Mono> getAtSubscriptionWithResponseAsync(Stri * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an existing remediation at subscription scope. + * @return an existing remediation at subscription scope along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getAtSubscriptionWithResponseAsync( @@ -2222,7 +2236,7 @@ private Mono> getAtSubscriptionWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an existing remediation at subscription scope. + * @return an existing remediation at subscription scope on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAtSubscriptionAsync(String remediationName) { @@ -2259,7 +2273,7 @@ public RemediationInner getAtSubscription(String remediationName) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an existing remediation at subscription scope. + * @return an existing remediation at subscription scope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getAtSubscriptionWithResponse(String remediationName, Context context) { @@ -2273,7 +2287,7 @@ public Response getAtSubscriptionWithResponse(String remediati * @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 remediation definition. + * @return the remediation definition along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteAtSubscriptionWithResponseAsync(String remediationName) { @@ -2317,7 +2331,7 @@ private Mono> deleteAtSubscriptionWithResponseAsync(S * @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 remediation definition. + * @return the remediation definition along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteAtSubscriptionWithResponseAsync( @@ -2358,7 +2372,7 @@ private Mono> deleteAtSubscriptionWithResponseAsync( * @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 remediation definition. + * @return the remediation definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAtSubscriptionAsync(String remediationName) { @@ -2395,7 +2409,7 @@ public RemediationInner deleteAtSubscription(String remediationName) { * @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 remediation definition. + * @return the remediation definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response deleteAtSubscriptionWithResponse(String remediationName, Context context) { @@ -2411,7 +2425,8 @@ public Response deleteAtSubscriptionWithResponse(String remedi * @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 all deployments for a remediation at resource group scope. + * @return all deployments for a remediation at resource group scope along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listDeploymentsAtResourceGroupSinglePageAsync( @@ -2473,7 +2488,8 @@ private Mono> listDeploymentsAtResourc * @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 all deployments for a remediation at resource group scope. + * @return all deployments for a remediation at resource group scope along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listDeploymentsAtResourceGroupSinglePageAsync( @@ -2531,7 +2547,7 @@ private Mono> listDeploymentsAtResourc * @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 all deployments for a remediation at resource group scope. + * @return all deployments for a remediation at resource group scope as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listDeploymentsAtResourceGroupAsync( @@ -2549,7 +2565,7 @@ private PagedFlux listDeploymentsAtResourceGroupAsyn * @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 all deployments for a remediation at resource group scope. + * @return all deployments for a remediation at resource group scope as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listDeploymentsAtResourceGroupAsync( @@ -2570,7 +2586,7 @@ private PagedFlux listDeploymentsAtResourceGroupAsyn * @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 all deployments for a remediation at resource group scope. + * @return all deployments for a remediation at resource group scope as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listDeploymentsAtResourceGroupAsync( @@ -2588,7 +2604,8 @@ private PagedFlux listDeploymentsAtResourceGroupAsyn * @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 all deployments for a remediation at resource group scope. + * @return all deployments for a remediation at resource group scope as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listDeploymentsAtResourceGroup( @@ -2607,7 +2624,8 @@ public PagedIterable listDeploymentsAtResourceGroup( * @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 all deployments for a remediation at resource group scope. + * @return all deployments for a remediation at resource group scope as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listDeploymentsAtResourceGroup( @@ -2624,7 +2642,7 @@ public PagedIterable listDeploymentsAtResourceGroup( * @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 remediation definition. + * @return the remediation definition along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> cancelAtResourceGroupWithResponseAsync( @@ -2675,7 +2693,7 @@ private Mono> cancelAtResourceGroupWithResponseAsync( * @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 remediation definition. + * @return the remediation definition along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> cancelAtResourceGroupWithResponseAsync( @@ -2722,7 +2740,7 @@ private Mono> cancelAtResourceGroupWithResponseAsync( * @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 remediation definition. + * @return the remediation definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono cancelAtResourceGroupAsync(String resourceGroupName, String remediationName) { @@ -2761,7 +2779,7 @@ public RemediationInner cancelAtResourceGroup(String resourceGroupName, String r * @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 remediation definition. + * @return the remediation definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response cancelAtResourceGroupWithResponse( @@ -2778,7 +2796,8 @@ public Response cancelAtResourceGroupWithResponse( * @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 all remediations for the subscription. + * @return all remediations for the subscription along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync( @@ -2836,7 +2855,8 @@ private Mono> listByResourceGroupSinglePageAsync * @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 all remediations for the subscription. + * @return all remediations for the subscription along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync( @@ -2890,7 +2910,7 @@ private Mono> listByResourceGroupSinglePageAsync * @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 all remediations for the subscription. + * @return all remediations for the subscription as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName, Integer top, String filter) { @@ -2906,7 +2926,7 @@ private PagedFlux listByResourceGroupAsync(String resourceGrou * @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 all remediations for the subscription. + * @return all remediations for the subscription as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName) { @@ -2927,7 +2947,7 @@ private PagedFlux listByResourceGroupAsync(String resourceGrou * @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 all remediations for the subscription. + * @return all remediations for the subscription as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync( @@ -2944,7 +2964,7 @@ private PagedFlux listByResourceGroupAsync( * @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 all remediations for the subscription. + * @return all remediations for the subscription as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName) { @@ -2963,7 +2983,7 @@ public PagedIterable listByResourceGroup(String resourceGroupN * @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 all remediations for the subscription. + * @return all remediations for the subscription as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup( @@ -2980,7 +3000,7 @@ public PagedIterable listByResourceGroup( * @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 remediation definition. + * @return the remediation definition along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createOrUpdateAtResourceGroupWithResponseAsync( @@ -3038,7 +3058,7 @@ private Mono> createOrUpdateAtResourceGroupWithRespon * @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 remediation definition. + * @return the remediation definition along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createOrUpdateAtResourceGroupWithResponseAsync( @@ -3092,7 +3112,7 @@ private Mono> createOrUpdateAtResourceGroupWithRespon * @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 remediation definition. + * @return the remediation definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAtResourceGroupAsync( @@ -3135,7 +3155,7 @@ public RemediationInner createOrUpdateAtResourceGroup( * @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 remediation definition. + * @return the remediation definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response createOrUpdateAtResourceGroupWithResponse( @@ -3152,7 +3172,8 @@ public Response createOrUpdateAtResourceGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an existing remediation at resource group scope. + * @return an existing remediation at resource group scope along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByResourceGroupWithResponseAsync( @@ -3203,7 +3224,8 @@ private Mono> getByResourceGroupWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an existing remediation at resource group scope. + * @return an existing remediation at resource group scope along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByResourceGroupWithResponseAsync( @@ -3250,7 +3272,7 @@ private Mono> getByResourceGroupWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an existing remediation at resource group scope. + * @return an existing remediation at resource group scope on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getByResourceGroupAsync(String resourceGroupName, String remediationName) { @@ -3289,7 +3311,7 @@ public RemediationInner getByResourceGroup(String resourceGroupName, String reme * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an existing remediation at resource group scope. + * @return an existing remediation at resource group scope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getByResourceGroupWithResponse( @@ -3305,7 +3327,7 @@ public Response getByResourceGroupWithResponse( * @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 remediation definition. + * @return the remediation definition along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteWithResponseAsync(String resourceGroupName, String remediationName) { @@ -3355,7 +3377,7 @@ private Mono> deleteWithResponseAsync(String 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 the remediation definition. + * @return the remediation definition along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteWithResponseAsync( @@ -3402,7 +3424,7 @@ private Mono> deleteWithResponseAsync( * @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 remediation definition. + * @return the remediation definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String remediationName) { @@ -3441,7 +3463,7 @@ public RemediationInner delete(String resourceGroupName, String remediationName) * @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 remediation definition. + * @return the remediation definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response deleteWithResponse( @@ -3458,7 +3480,8 @@ public Response deleteWithResponse( * @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 all deployments for a remediation at resource scope. + * @return all deployments for a remediation at resource scope along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listDeploymentsAtResourceSinglePageAsync( @@ -3506,7 +3529,8 @@ private Mono> listDeploymentsAtResourc * @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 all deployments for a remediation at resource scope. + * @return all deployments for a remediation at resource scope along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listDeploymentsAtResourceSinglePageAsync( @@ -3550,7 +3574,7 @@ private Mono> listDeploymentsAtResourc * @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 all deployments for a remediation at resource scope. + * @return all deployments for a remediation at resource scope as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listDeploymentsAtResourceAsync( @@ -3568,7 +3592,7 @@ private PagedFlux listDeploymentsAtResourceAsync( * @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 all deployments for a remediation at resource scope. + * @return all deployments for a remediation at resource scope as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listDeploymentsAtResourceAsync( @@ -3589,7 +3613,7 @@ private PagedFlux listDeploymentsAtResourceAsync( * @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 all deployments for a remediation at resource scope. + * @return all deployments for a remediation at resource scope as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listDeploymentsAtResourceAsync( @@ -3607,7 +3631,7 @@ private PagedFlux listDeploymentsAtResourceAsync( * @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 all deployments for a remediation at resource scope. + * @return all deployments for a remediation at resource scope as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listDeploymentsAtResource( @@ -3626,7 +3650,7 @@ public PagedIterable listDeploymentsAtResource( * @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 all deployments for a remediation at resource scope. + * @return all deployments for a remediation at resource scope as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listDeploymentsAtResource( @@ -3642,7 +3666,7 @@ public PagedIterable listDeploymentsAtResource( * @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 remediation definition. + * @return the remediation definition along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> cancelAtResourceWithResponseAsync( @@ -3680,7 +3704,7 @@ private Mono> cancelAtResourceWithResponseAsync( * @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 remediation definition. + * @return the remediation definition along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> cancelAtResourceWithResponseAsync( @@ -3713,7 +3737,7 @@ private Mono> cancelAtResourceWithResponseAsync( * @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 remediation definition. + * @return the remediation definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono cancelAtResourceAsync(String resourceId, String remediationName) { @@ -3752,7 +3776,7 @@ public RemediationInner cancelAtResource(String resourceId, String remediationNa * @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 remediation definition. + * @return the remediation definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response cancelAtResourceWithResponse( @@ -3769,7 +3793,8 @@ public Response cancelAtResourceWithResponse( * @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 all remediations for a resource. + * @return all remediations for a resource along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listForResourceSinglePageAsync( @@ -3813,7 +3838,8 @@ private Mono> listForResourceSinglePageAsync( * @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 all remediations for a resource. + * @return all remediations for a resource along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listForResourceSinglePageAsync( @@ -3852,7 +3878,7 @@ private Mono> listForResourceSinglePageAsync( * @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 all remediations for a resource. + * @return all remediations for a resource as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listForResourceAsync(String resourceId, Integer top, String filter) { @@ -3868,7 +3894,7 @@ private PagedFlux listForResourceAsync(String resourceId, Inte * @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 all remediations for a resource. + * @return all remediations for a resource as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listForResourceAsync(String resourceId) { @@ -3889,7 +3915,7 @@ private PagedFlux listForResourceAsync(String resourceId) { * @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 all remediations for a resource. + * @return all remediations for a resource as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listForResourceAsync( @@ -3906,7 +3932,7 @@ private PagedFlux listForResourceAsync( * @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 all remediations for a resource. + * @return all remediations for a resource as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listForResource(String resourceId) { @@ -3925,7 +3951,7 @@ public PagedIterable listForResource(String resourceId) { * @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 all remediations for a resource. + * @return all remediations for a resource as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listForResource( @@ -3942,7 +3968,7 @@ public PagedIterable listForResource( * @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 remediation definition. + * @return the remediation definition along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createOrUpdateAtResourceWithResponseAsync( @@ -3992,7 +4018,7 @@ private Mono> createOrUpdateAtResourceWithResponseAsy * @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 remediation definition. + * @return the remediation definition along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createOrUpdateAtResourceWithResponseAsync( @@ -4032,7 +4058,7 @@ private Mono> createOrUpdateAtResourceWithResponseAsy * @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 remediation definition. + * @return the remediation definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAtResourceAsync( @@ -4075,7 +4101,7 @@ public RemediationInner createOrUpdateAtResource( * @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 remediation definition. + * @return the remediation definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response createOrUpdateAtResourceWithResponse( @@ -4091,7 +4117,8 @@ public Response createOrUpdateAtResourceWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an existing remediation at resource scope. + * @return an existing remediation at resource scope along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getAtResourceWithResponseAsync(String resourceId, String remediationName) { @@ -4128,7 +4155,8 @@ private Mono> getAtResourceWithResponseAsync(String r * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an existing remediation at resource scope. + * @return an existing remediation at resource scope along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getAtResourceWithResponseAsync( @@ -4161,7 +4189,7 @@ private Mono> getAtResourceWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an existing remediation at resource scope. + * @return an existing remediation at resource scope on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAtResourceAsync(String resourceId, String remediationName) { @@ -4200,7 +4228,7 @@ public RemediationInner getAtResource(String resourceId, String remediationName) * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an existing remediation at resource scope. + * @return an existing remediation at resource scope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getAtResourceWithResponse( @@ -4216,7 +4244,7 @@ public Response getAtResourceWithResponse( * @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 remediation definition. + * @return the remediation definition along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteAtResourceWithResponseAsync( @@ -4254,7 +4282,7 @@ private Mono> deleteAtResourceWithResponseAsync( * @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 remediation definition. + * @return the remediation definition along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteAtResourceWithResponseAsync( @@ -4287,7 +4315,7 @@ private Mono> deleteAtResourceWithResponseAsync( * @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 remediation definition. + * @return the remediation definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAtResourceAsync(String resourceId, String remediationName) { @@ -4326,7 +4354,7 @@ public RemediationInner deleteAtResource(String resourceId, String remediationNa * @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 remediation definition. + * @return the remediation definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response deleteAtResourceWithResponse( @@ -4341,7 +4369,8 @@ public Response deleteAtResourceWithResponse( * @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 list of deployments for a remediation. + * @return list of deployments for a remediation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listDeploymentsAtManagementGroupNextSinglePageAsync( @@ -4380,7 +4409,8 @@ private Mono> listDeploymentsAtManagem * @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 list of deployments for a remediation. + * @return list of deployments for a remediation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listDeploymentsAtManagementGroupNextSinglePageAsync( @@ -4416,7 +4446,7 @@ private Mono> listDeploymentsAtManagem * @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 list of remediations. + * @return list of remediations along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listForManagementGroupNextSinglePageAsync(String nextLink) { @@ -4453,7 +4483,7 @@ private Mono> listForManagementGroupNextSinglePa * @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 list of remediations. + * @return list of remediations along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listForManagementGroupNextSinglePageAsync( @@ -4489,7 +4519,8 @@ private Mono> listForManagementGroupNextSinglePa * @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 list of deployments for a remediation. + * @return list of deployments for a remediation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listDeploymentsAtSubscriptionNextSinglePageAsync( @@ -4528,7 +4559,8 @@ private Mono> listDeploymentsAtSubscri * @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 list of deployments for a remediation. + * @return list of deployments for a remediation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listDeploymentsAtSubscriptionNextSinglePageAsync( @@ -4564,7 +4596,7 @@ private Mono> listDeploymentsAtSubscri * @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 list of remediations. + * @return list of remediations along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listForSubscriptionNextSinglePageAsync(String nextLink) { @@ -4601,7 +4633,7 @@ private Mono> listForSubscriptionNextSinglePageA * @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 list of remediations. + * @return list of remediations along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listForSubscriptionNextSinglePageAsync( @@ -4637,7 +4669,8 @@ private Mono> listForSubscriptionNextSinglePageA * @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 list of deployments for a remediation. + * @return list of deployments for a remediation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listDeploymentsAtResourceGroupNextSinglePageAsync( @@ -4676,7 +4709,8 @@ private Mono> listDeploymentsAtResourc * @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 list of deployments for a remediation. + * @return list of deployments for a remediation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listDeploymentsAtResourceGroupNextSinglePageAsync( @@ -4712,7 +4746,7 @@ private Mono> listDeploymentsAtResourc * @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 list of remediations. + * @return list of remediations along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listForResourceGroupNextSinglePageAsync(String nextLink) { @@ -4749,7 +4783,7 @@ private Mono> listForResourceGroupNextSinglePage * @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 list of remediations. + * @return list of remediations along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listForResourceGroupNextSinglePageAsync( @@ -4785,7 +4819,8 @@ private Mono> listForResourceGroupNextSinglePage * @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 list of deployments for a remediation. + * @return list of deployments for a remediation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listDeploymentsAtResourceNextSinglePageAsync( @@ -4823,7 +4858,8 @@ private Mono> listDeploymentsAtResourc * @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 list of deployments for a remediation. + * @return list of deployments for a remediation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listDeploymentsAtResourceNextSinglePageAsync( @@ -4859,7 +4895,7 @@ private Mono> listDeploymentsAtResourc * @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 list of remediations. + * @return list of remediations along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listForResourceNextSinglePageAsync(String nextLink) { @@ -4895,7 +4931,7 @@ private Mono> listForResourceNextSinglePageAsync * @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 list of remediations. + * @return list of remediations along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listForResourceNextSinglePageAsync(String nextLink, Context context) { diff --git a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/models/Attestations.java b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/models/Attestations.java index 669dfadfb8456..75968a5af538e 100644 --- a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/models/Attestations.java +++ b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/models/Attestations.java @@ -16,7 +16,7 @@ public interface Attestations { * * @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 all attestations for the subscription. + * @return all attestations for the subscription as paginated response with {@link PagedIterable}. */ PagedIterable list(); @@ -29,7 +29,7 @@ public interface Attestations { * @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 all attestations for the subscription. + * @return all attestations for the subscription as paginated response with {@link PagedIterable}. */ PagedIterable list(Integer top, String filter, Context context); @@ -77,7 +77,7 @@ public interface Attestations { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an existing attestation at subscription scope. + * @return an existing attestation at subscription scope along with {@link Response}. */ Response getAtSubscriptionWithResponse(String attestationName, Context context); @@ -99,7 +99,7 @@ public interface Attestations { * @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 {@link Response}. */ Response deleteAtSubscriptionWithResponse(String attestationName, Context context); @@ -110,7 +110,7 @@ public interface Attestations { * @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 all attestations for the resource group. + * @return all attestations for the resource group as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName); @@ -124,7 +124,7 @@ public interface Attestations { * @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 all attestations for the resource group. + * @return all attestations for the resource group as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup( String resourceGroupName, Integer top, String filter, Context context); @@ -150,7 +150,7 @@ PagedIterable listByResourceGroup( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an existing attestation at resource group scope. + * @return an existing attestation at resource group scope along with {@link Response}. */ Response getByResourceGroupWithResponse( String resourceGroupName, String attestationName, Context context); @@ -175,7 +175,7 @@ Response getByResourceGroupWithResponse( * @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 {@link Response}. */ Response deleteWithResponse(String resourceGroupName, String attestationName, Context context); @@ -186,7 +186,7 @@ Response getByResourceGroupWithResponse( * @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 all attestations for a resource. + * @return all attestations for a resource as paginated response with {@link PagedIterable}. */ PagedIterable listForResource(String resourceId); @@ -200,7 +200,7 @@ Response getByResourceGroupWithResponse( * @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 all attestations for a resource. + * @return all attestations for a resource as paginated response with {@link PagedIterable}. */ PagedIterable listForResource(String resourceId, Integer top, String filter, Context context); @@ -253,7 +253,7 @@ Attestation createOrUpdateAtResource( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an existing attestation at resource scope. + * @return an existing attestation at resource scope along with {@link Response}. */ Response getAtResourceWithResponse(String resourceId, String attestationName, Context context); @@ -277,7 +277,7 @@ Attestation createOrUpdateAtResource( * @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 {@link Response}. */ Response deleteAtResourceWithResponse(String resourceId, String attestationName, Context context); @@ -288,7 +288,7 @@ Attestation createOrUpdateAtResource( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an existing attestation at resource group scope. + * @return an existing attestation at resource group scope along with {@link Response}. */ Attestation getById(String id); @@ -300,7 +300,7 @@ Attestation createOrUpdateAtResource( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an existing attestation at resource group scope. + * @return an existing attestation at resource group scope along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); @@ -322,7 +322,7 @@ Attestation createOrUpdateAtResource( * @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 {@link Response}. */ Response deleteByIdWithResponse(String id, Context context); diff --git a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/models/Operations.java b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/models/Operations.java index 858697fb3c5d5..e0571a096d0a2 100644 --- a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/models/Operations.java +++ b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/models/Operations.java @@ -25,7 +25,7 @@ public interface Operations { * @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 list of available operations. + * @return list of available operations along with {@link Response}. */ Response listWithResponse(Context context); } diff --git a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/models/PolicyEvents.java b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/models/PolicyEvents.java index f2e70aacd4574..8afe284b70296 100644 --- a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/models/PolicyEvents.java +++ b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/models/PolicyEvents.java @@ -13,17 +13,22 @@ public interface PolicyEvents { /** * Queries policy events for the resources under the management group. * + * @param policyEventsResource The name of the virtual resource under PolicyEvents resource type; only "default" is + * allowed. * @param managementGroupName Management group name. * @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 query results. + * @return query results as paginated response with {@link PagedIterable}. */ - PagedIterable listQueryResultsForManagementGroup(String managementGroupName); + PagedIterable listQueryResultsForManagementGroup( + PolicyEventsResourceType policyEventsResource, String managementGroupName); /** * Queries policy events for the resources under the management group. * + * @param policyEventsResource The name of the virtual resource under PolicyEvents resource type; only "default" is + * allowed. * @param managementGroupName Management group name. * @param top Maximum number of records to return. * @param orderBy Ordering expression using OData notation. One or more comma-separated column names with an @@ -42,9 +47,10 @@ public interface PolicyEvents { * @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 query results. + * @return query results as paginated response with {@link PagedIterable}. */ PagedIterable listQueryResultsForManagementGroup( + PolicyEventsResourceType policyEventsResource, String managementGroupName, Integer top, String orderBy, @@ -59,17 +65,22 @@ PagedIterable listQueryResultsForManagementGroup( /** * Queries policy events for the resources under the subscription. * + * @param policyEventsResource The name of the virtual resource under PolicyEvents resource type; only "default" is + * allowed. * @param subscriptionId Microsoft Azure subscription ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return query results. + * @return query results as paginated response with {@link PagedIterable}. */ - PagedIterable listQueryResultsForSubscription(String subscriptionId); + PagedIterable listQueryResultsForSubscription( + PolicyEventsResourceType policyEventsResource, String subscriptionId); /** * Queries policy events for the resources under the subscription. * + * @param policyEventsResource The name of the virtual resource under PolicyEvents resource type; only "default" is + * allowed. * @param subscriptionId Microsoft Azure subscription ID. * @param top Maximum number of records to return. * @param orderBy Ordering expression using OData notation. One or more comma-separated column names with an @@ -88,9 +99,10 @@ PagedIterable listQueryResultsForManagementGroup( * @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 query results. + * @return query results as paginated response with {@link PagedIterable}. */ PagedIterable listQueryResultsForSubscription( + PolicyEventsResourceType policyEventsResource, String subscriptionId, Integer top, String orderBy, @@ -105,18 +117,23 @@ PagedIterable listQueryResultsForSubscription( /** * Queries policy events for the resources under the resource group. * + * @param policyEventsResource The name of the virtual resource under PolicyEvents resource type; only "default" is + * allowed. * @param subscriptionId Microsoft Azure subscription ID. * @param resourceGroupName Resource group name. * @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 query results. + * @return query results as paginated response with {@link PagedIterable}. */ - PagedIterable listQueryResultsForResourceGroup(String subscriptionId, String resourceGroupName); + PagedIterable listQueryResultsForResourceGroup( + PolicyEventsResourceType policyEventsResource, String subscriptionId, String resourceGroupName); /** * Queries policy events for the resources under the resource group. * + * @param policyEventsResource The name of the virtual resource under PolicyEvents resource type; only "default" is + * allowed. * @param subscriptionId Microsoft Azure subscription ID. * @param resourceGroupName Resource group name. * @param top Maximum number of records to return. @@ -136,9 +153,10 @@ PagedIterable listQueryResultsForSubscription( * @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 query results. + * @return query results as paginated response with {@link PagedIterable}. */ PagedIterable listQueryResultsForResourceGroup( + PolicyEventsResourceType policyEventsResource, String subscriptionId, String resourceGroupName, Integer top, @@ -154,17 +172,22 @@ PagedIterable listQueryResultsForResourceGroup( /** * Queries policy events for the resource. * + * @param policyEventsResource The name of the virtual resource under PolicyEvents resource type; only "default" is + * allowed. * @param resourceId Resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return query results. + * @return query results as paginated response with {@link PagedIterable}. */ - PagedIterable listQueryResultsForResource(String resourceId); + PagedIterable listQueryResultsForResource( + PolicyEventsResourceType policyEventsResource, String resourceId); /** * Queries policy events for the resource. * + * @param policyEventsResource The name of the virtual resource under PolicyEvents resource type; only "default" is + * allowed. * @param resourceId Resource ID. * @param top Maximum number of records to return. * @param orderBy Ordering expression using OData notation. One or more comma-separated column names with an @@ -184,9 +207,10 @@ PagedIterable listQueryResultsForResourceGroup( * @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 query results. + * @return query results as paginated response with {@link PagedIterable}. */ PagedIterable listQueryResultsForResource( + PolicyEventsResourceType policyEventsResource, String resourceId, Integer top, String orderBy, @@ -202,19 +226,23 @@ PagedIterable listQueryResultsForResource( /** * Queries policy events for the subscription level policy set definition. * + * @param policyEventsResource The name of the virtual resource under PolicyEvents resource type; only "default" is + * allowed. * @param subscriptionId Microsoft Azure subscription ID. * @param policySetDefinitionName Policy set definition name. * @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 query results. + * @return query results as paginated response with {@link PagedIterable}. */ PagedIterable listQueryResultsForPolicySetDefinition( - String subscriptionId, String policySetDefinitionName); + PolicyEventsResourceType policyEventsResource, String subscriptionId, String policySetDefinitionName); /** * Queries policy events for the subscription level policy set definition. * + * @param policyEventsResource The name of the virtual resource under PolicyEvents resource type; only "default" is + * allowed. * @param subscriptionId Microsoft Azure subscription ID. * @param policySetDefinitionName Policy set definition name. * @param top Maximum number of records to return. @@ -234,9 +262,10 @@ PagedIterable listQueryResultsForPolicySetDefinition( * @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 query results. + * @return query results as paginated response with {@link PagedIterable}. */ PagedIterable listQueryResultsForPolicySetDefinition( + PolicyEventsResourceType policyEventsResource, String subscriptionId, String policySetDefinitionName, Integer top, @@ -252,18 +281,23 @@ PagedIterable listQueryResultsForPolicySetDefinition( /** * Queries policy events for the subscription level policy definition. * + * @param policyEventsResource The name of the virtual resource under PolicyEvents resource type; only "default" is + * allowed. * @param subscriptionId Microsoft Azure subscription ID. * @param policyDefinitionName Policy definition name. * @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 query results. + * @return query results as paginated response with {@link PagedIterable}. */ - PagedIterable listQueryResultsForPolicyDefinition(String subscriptionId, String policyDefinitionName); + PagedIterable listQueryResultsForPolicyDefinition( + PolicyEventsResourceType policyEventsResource, String subscriptionId, String policyDefinitionName); /** * Queries policy events for the subscription level policy definition. * + * @param policyEventsResource The name of the virtual resource under PolicyEvents resource type; only "default" is + * allowed. * @param subscriptionId Microsoft Azure subscription ID. * @param policyDefinitionName Policy definition name. * @param top Maximum number of records to return. @@ -283,9 +317,10 @@ PagedIterable listQueryResultsForPolicySetDefinition( * @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 query results. + * @return query results as paginated response with {@link PagedIterable}. */ PagedIterable listQueryResultsForPolicyDefinition( + PolicyEventsResourceType policyEventsResource, String subscriptionId, String policyDefinitionName, Integer top, @@ -301,19 +336,23 @@ PagedIterable listQueryResultsForPolicyDefinition( /** * Queries policy events for the subscription level policy assignment. * + * @param policyEventsResource The name of the virtual resource under PolicyEvents resource type; only "default" is + * allowed. * @param subscriptionId Microsoft Azure subscription ID. * @param policyAssignmentName Policy assignment name. * @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 query results. + * @return query results as paginated response with {@link PagedIterable}. */ PagedIterable listQueryResultsForSubscriptionLevelPolicyAssignment( - String subscriptionId, String policyAssignmentName); + PolicyEventsResourceType policyEventsResource, String subscriptionId, String policyAssignmentName); /** * Queries policy events for the subscription level policy assignment. * + * @param policyEventsResource The name of the virtual resource under PolicyEvents resource type; only "default" is + * allowed. * @param subscriptionId Microsoft Azure subscription ID. * @param policyAssignmentName Policy assignment name. * @param top Maximum number of records to return. @@ -333,9 +372,10 @@ PagedIterable listQueryResultsForSubscriptionLevelPolicyAssignment( * @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 query results. + * @return query results as paginated response with {@link PagedIterable}. */ PagedIterable listQueryResultsForSubscriptionLevelPolicyAssignment( + PolicyEventsResourceType policyEventsResource, String subscriptionId, String policyAssignmentName, Integer top, @@ -351,20 +391,27 @@ PagedIterable listQueryResultsForSubscriptionLevelPolicyAssignment( /** * Queries policy events for the resource group level policy assignment. * + * @param policyEventsResource The name of the virtual resource under PolicyEvents resource type; only "default" is + * allowed. * @param subscriptionId Microsoft Azure subscription ID. * @param resourceGroupName Resource group name. * @param policyAssignmentName Policy assignment name. * @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 query results. + * @return query results as paginated response with {@link PagedIterable}. */ PagedIterable listQueryResultsForResourceGroupLevelPolicyAssignment( - String subscriptionId, String resourceGroupName, String policyAssignmentName); + PolicyEventsResourceType policyEventsResource, + String subscriptionId, + String resourceGroupName, + String policyAssignmentName); /** * Queries policy events for the resource group level policy assignment. * + * @param policyEventsResource The name of the virtual resource under PolicyEvents resource type; only "default" is + * allowed. * @param subscriptionId Microsoft Azure subscription ID. * @param resourceGroupName Resource group name. * @param policyAssignmentName Policy assignment name. @@ -385,9 +432,10 @@ PagedIterable listQueryResultsForResourceGroupLevelPolicyAssignment * @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 query results. + * @return query results as paginated response with {@link PagedIterable}. */ PagedIterable listQueryResultsForResourceGroupLevelPolicyAssignment( + PolicyEventsResourceType policyEventsResource, String subscriptionId, String resourceGroupName, String policyAssignmentName, diff --git a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/models/PolicyEventsResourceType.java b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/models/PolicyEventsResourceType.java new file mode 100644 index 0000000000000..2dc990586f7cf --- /dev/null +++ b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/models/PolicyEventsResourceType.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.policyinsights.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for PolicyEventsResourceType. */ +public final class PolicyEventsResourceType extends ExpandableStringEnum { + /** Static value default for PolicyEventsResourceType. */ + public static final PolicyEventsResourceType DEFAULT = fromString("default"); + + /** + * Creates or finds a PolicyEventsResourceType from its string representation. + * + * @param name a name to look for. + * @return the corresponding PolicyEventsResourceType. + */ + @JsonCreator + public static PolicyEventsResourceType fromString(String name) { + return fromString(name, PolicyEventsResourceType.class); + } + + /** @return known PolicyEventsResourceType values. */ + public static Collection values() { + return values(PolicyEventsResourceType.class); + } +} diff --git a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/models/PolicyMetadatas.java b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/models/PolicyMetadatas.java index 760da5118a602..36e65a944a749 100644 --- a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/models/PolicyMetadatas.java +++ b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/models/PolicyMetadatas.java @@ -29,7 +29,7 @@ public interface PolicyMetadatas { * @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 policy metadata resource. + * @return policy metadata resource along with {@link Response}. */ Response getResourceWithResponse(String resourceName, Context context); @@ -38,7 +38,7 @@ public interface PolicyMetadatas { * * @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 the policy metadata resources. + * @return a list of the policy metadata resources as paginated response with {@link PagedIterable}. */ PagedIterable list(); @@ -50,7 +50,7 @@ public interface PolicyMetadatas { * @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 the policy metadata resources. + * @return a list of the policy metadata resources as paginated response with {@link PagedIterable}. */ PagedIterable list(Integer top, Context context); } diff --git a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/models/PolicyRestrictions.java b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/models/PolicyRestrictions.java index f60fe42049678..ae56492eef5ba 100644 --- a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/models/PolicyRestrictions.java +++ b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/models/PolicyRestrictions.java @@ -28,7 +28,7 @@ public interface PolicyRestrictions { * @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 result of a check policy restrictions evaluation on a resource. + * @return the result of a check policy restrictions evaluation on a resource along with {@link Response}. */ Response checkAtSubscriptionScopeWithResponse( CheckRestrictionsRequest parameters, Context context); @@ -56,7 +56,7 @@ Response checkAtSubscriptionScopeWithResponse( * @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 result of a check policy restrictions evaluation on a resource. + * @return the result of a check policy restrictions evaluation on a resource along with {@link Response}. */ Response checkAtResourceGroupScopeWithResponse( String resourceGroupName, CheckRestrictionsRequest parameters, Context context); diff --git a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/models/PolicyStates.java b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/models/PolicyStates.java index 6e62e30e007b9..f0456b6fcbe23 100644 --- a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/models/PolicyStates.java +++ b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/models/PolicyStates.java @@ -20,7 +20,7 @@ public interface PolicyStates { * @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 query results. + * @return query results as paginated response with {@link PagedIterable}. */ PagedIterable listQueryResultsForManagementGroup( PolicyStatesResource policyStatesResource, String managementGroupName); @@ -48,7 +48,7 @@ PagedIterable listQueryResultsForManagementGroup( * @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 query results. + * @return query results as paginated response with {@link PagedIterable}. */ PagedIterable listQueryResultsForManagementGroup( PolicyStatesResource policyStatesResource, @@ -66,17 +66,22 @@ PagedIterable listQueryResultsForManagementGroup( /** * Summarizes policy states for the resources under the management group. * + * @param policyStatesSummaryResource The virtual resource under PolicyStates resource type for summarize action. In + * a given time range, 'latest' represents the latest policy state(s) and is the only allowed value. * @param managementGroupName Management group name. * @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 summarize action results. */ - SummarizeResults summarizeForManagementGroup(String managementGroupName); + SummarizeResults summarizeForManagementGroup( + PolicyStatesSummaryResourceType policyStatesSummaryResource, String managementGroupName); /** * Summarizes policy states for the resources under the management group. * + * @param policyStatesSummaryResource The virtual resource under PolicyStates resource type for summarize action. In + * a given time range, 'latest' represents the latest policy state(s) and is the only allowed value. * @param managementGroupName Management group name. * @param top Maximum number of records to return. * @param from ISO 8601 formatted timestamp specifying the start time of the interval to query. When not specified, @@ -88,9 +93,10 @@ PagedIterable listQueryResultsForManagementGroup( * @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 summarize action results. + * @return summarize action results along with {@link Response}. */ Response summarizeForManagementGroupWithResponse( + PolicyStatesSummaryResourceType policyStatesSummaryResource, String managementGroupName, Integer top, OffsetDateTime from, @@ -107,7 +113,7 @@ Response summarizeForManagementGroupWithResponse( * @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 query results. + * @return query results as paginated response with {@link PagedIterable}. */ PagedIterable listQueryResultsForSubscription( PolicyStatesResource policyStatesResource, String subscriptionId); @@ -135,7 +141,7 @@ PagedIterable listQueryResultsForSubscription( * @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 query results. + * @return query results as paginated response with {@link PagedIterable}. */ PagedIterable listQueryResultsForSubscription( PolicyStatesResource policyStatesResource, @@ -153,17 +159,22 @@ PagedIterable listQueryResultsForSubscription( /** * Summarizes policy states for the resources under the subscription. * + * @param policyStatesSummaryResource The virtual resource under PolicyStates resource type for summarize action. In + * a given time range, 'latest' represents the latest policy state(s) and is the only allowed value. * @param subscriptionId Microsoft Azure subscription ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return summarize action results. */ - SummarizeResults summarizeForSubscription(String subscriptionId); + SummarizeResults summarizeForSubscription( + PolicyStatesSummaryResourceType policyStatesSummaryResource, String subscriptionId); /** * Summarizes policy states for the resources under the subscription. * + * @param policyStatesSummaryResource The virtual resource under PolicyStates resource type for summarize action. In + * a given time range, 'latest' represents the latest policy state(s) and is the only allowed value. * @param subscriptionId Microsoft Azure subscription ID. * @param top Maximum number of records to return. * @param from ISO 8601 formatted timestamp specifying the start time of the interval to query. When not specified, @@ -175,10 +186,16 @@ PagedIterable listQueryResultsForSubscription( * @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 summarize action results. + * @return summarize action results along with {@link Response}. */ Response summarizeForSubscriptionWithResponse( - String subscriptionId, Integer top, OffsetDateTime from, OffsetDateTime to, String filter, Context context); + PolicyStatesSummaryResourceType policyStatesSummaryResource, + String subscriptionId, + Integer top, + OffsetDateTime from, + OffsetDateTime to, + String filter, + Context context); /** * Queries policy states for the resources under the resource group. @@ -190,7 +207,7 @@ Response summarizeForSubscriptionWithResponse( * @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 query results. + * @return query results as paginated response with {@link PagedIterable}. */ PagedIterable listQueryResultsForResourceGroup( PolicyStatesResource policyStatesResource, String subscriptionId, String resourceGroupName); @@ -219,7 +236,7 @@ PagedIterable listQueryResultsForResourceGroup( * @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 query results. + * @return query results as paginated response with {@link PagedIterable}. */ PagedIterable listQueryResultsForResourceGroup( PolicyStatesResource policyStatesResource, @@ -238,6 +255,8 @@ PagedIterable listQueryResultsForResourceGroup( /** * Summarizes policy states for the resources under the resource group. * + * @param policyStatesSummaryResource The virtual resource under PolicyStates resource type for summarize action. In + * a given time range, 'latest' represents the latest policy state(s) and is the only allowed value. * @param subscriptionId Microsoft Azure subscription ID. * @param resourceGroupName Resource group name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -245,11 +264,14 @@ PagedIterable listQueryResultsForResourceGroup( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return summarize action results. */ - SummarizeResults summarizeForResourceGroup(String subscriptionId, String resourceGroupName); + SummarizeResults summarizeForResourceGroup( + PolicyStatesSummaryResourceType policyStatesSummaryResource, String subscriptionId, String resourceGroupName); /** * Summarizes policy states for the resources under the resource group. * + * @param policyStatesSummaryResource The virtual resource under PolicyStates resource type for summarize action. In + * a given time range, 'latest' represents the latest policy state(s) and is the only allowed value. * @param subscriptionId Microsoft Azure subscription ID. * @param resourceGroupName Resource group name. * @param top Maximum number of records to return. @@ -262,9 +284,10 @@ PagedIterable listQueryResultsForResourceGroup( * @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 summarize action results. + * @return summarize action results along with {@link Response}. */ Response summarizeForResourceGroupWithResponse( + PolicyStatesSummaryResourceType policyStatesSummaryResource, String subscriptionId, String resourceGroupName, Integer top, @@ -282,7 +305,7 @@ Response summarizeForResourceGroupWithResponse( * @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 query results. + * @return query results as paginated response with {@link PagedIterable}. */ PagedIterable listQueryResultsForResource( PolicyStatesResource policyStatesResource, String resourceId); @@ -311,7 +334,7 @@ PagedIterable listQueryResultsForResource( * @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 query results. + * @return query results as paginated response with {@link PagedIterable}. */ PagedIterable listQueryResultsForResource( PolicyStatesResource policyStatesResource, @@ -330,17 +353,22 @@ PagedIterable listQueryResultsForResource( /** * Summarizes policy states for the resource. * + * @param policyStatesSummaryResource The virtual resource under PolicyStates resource type for summarize action. In + * a given time range, 'latest' represents the latest policy state(s) and is the only allowed value. * @param resourceId Resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return summarize action results. */ - SummarizeResults summarizeForResource(String resourceId); + SummarizeResults summarizeForResource( + PolicyStatesSummaryResourceType policyStatesSummaryResource, String resourceId); /** * Summarizes policy states for the resource. * + * @param policyStatesSummaryResource The virtual resource under PolicyStates resource type for summarize action. In + * a given time range, 'latest' represents the latest policy state(s) and is the only allowed value. * @param resourceId Resource ID. * @param top Maximum number of records to return. * @param from ISO 8601 formatted timestamp specifying the start time of the interval to query. When not specified, @@ -352,10 +380,16 @@ PagedIterable listQueryResultsForResource( * @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 summarize action results. + * @return summarize action results along with {@link Response}. */ Response summarizeForResourceWithResponse( - String resourceId, Integer top, OffsetDateTime from, OffsetDateTime to, String filter, Context context); + PolicyStatesSummaryResourceType policyStatesSummaryResource, + String resourceId, + Integer top, + OffsetDateTime from, + OffsetDateTime to, + String filter, + Context context); /** * Triggers a policy evaluation scan for all the resources under the subscription. @@ -411,7 +445,7 @@ Response summarizeForResourceWithResponse( * @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 query results. + * @return query results as paginated response with {@link PagedIterable}. */ PagedIterable listQueryResultsForPolicySetDefinition( PolicyStatesResource policyStatesResource, String subscriptionId, String policySetDefinitionName); @@ -440,7 +474,7 @@ PagedIterable listQueryResultsForPolicySetDefinition( * @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 query results. + * @return query results as paginated response with {@link PagedIterable}. */ PagedIterable listQueryResultsForPolicySetDefinition( PolicyStatesResource policyStatesResource, @@ -459,6 +493,8 @@ PagedIterable listQueryResultsForPolicySetDefinition( /** * Summarizes policy states for the subscription level policy set definition. * + * @param policyStatesSummaryResource The virtual resource under PolicyStates resource type for summarize action. In + * a given time range, 'latest' represents the latest policy state(s) and is the only allowed value. * @param subscriptionId Microsoft Azure subscription ID. * @param policySetDefinitionName Policy set definition name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -466,11 +502,16 @@ PagedIterable listQueryResultsForPolicySetDefinition( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return summarize action results. */ - SummarizeResults summarizeForPolicySetDefinition(String subscriptionId, String policySetDefinitionName); + SummarizeResults summarizeForPolicySetDefinition( + PolicyStatesSummaryResourceType policyStatesSummaryResource, + String subscriptionId, + String policySetDefinitionName); /** * Summarizes policy states for the subscription level policy set definition. * + * @param policyStatesSummaryResource The virtual resource under PolicyStates resource type for summarize action. In + * a given time range, 'latest' represents the latest policy state(s) and is the only allowed value. * @param subscriptionId Microsoft Azure subscription ID. * @param policySetDefinitionName Policy set definition name. * @param top Maximum number of records to return. @@ -483,9 +524,10 @@ PagedIterable listQueryResultsForPolicySetDefinition( * @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 summarize action results. + * @return summarize action results along with {@link Response}. */ Response summarizeForPolicySetDefinitionWithResponse( + PolicyStatesSummaryResourceType policyStatesSummaryResource, String subscriptionId, String policySetDefinitionName, Integer top, @@ -504,7 +546,7 @@ Response summarizeForPolicySetDefinitionWithResponse( * @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 query results. + * @return query results as paginated response with {@link PagedIterable}. */ PagedIterable listQueryResultsForPolicyDefinition( PolicyStatesResource policyStatesResource, String subscriptionId, String policyDefinitionName); @@ -533,7 +575,7 @@ PagedIterable listQueryResultsForPolicyDefinition( * @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 query results. + * @return query results as paginated response with {@link PagedIterable}. */ PagedIterable listQueryResultsForPolicyDefinition( PolicyStatesResource policyStatesResource, @@ -552,6 +594,8 @@ PagedIterable listQueryResultsForPolicyDefinition( /** * Summarizes policy states for the subscription level policy definition. * + * @param policyStatesSummaryResource The virtual resource under PolicyStates resource type for summarize action. In + * a given time range, 'latest' represents the latest policy state(s) and is the only allowed value. * @param subscriptionId Microsoft Azure subscription ID. * @param policyDefinitionName Policy definition name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -559,11 +603,16 @@ PagedIterable listQueryResultsForPolicyDefinition( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return summarize action results. */ - SummarizeResults summarizeForPolicyDefinition(String subscriptionId, String policyDefinitionName); + SummarizeResults summarizeForPolicyDefinition( + PolicyStatesSummaryResourceType policyStatesSummaryResource, + String subscriptionId, + String policyDefinitionName); /** * Summarizes policy states for the subscription level policy definition. * + * @param policyStatesSummaryResource The virtual resource under PolicyStates resource type for summarize action. In + * a given time range, 'latest' represents the latest policy state(s) and is the only allowed value. * @param subscriptionId Microsoft Azure subscription ID. * @param policyDefinitionName Policy definition name. * @param top Maximum number of records to return. @@ -576,9 +625,10 @@ PagedIterable listQueryResultsForPolicyDefinition( * @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 summarize action results. + * @return summarize action results along with {@link Response}. */ Response summarizeForPolicyDefinitionWithResponse( + PolicyStatesSummaryResourceType policyStatesSummaryResource, String subscriptionId, String policyDefinitionName, Integer top, @@ -597,7 +647,7 @@ Response summarizeForPolicyDefinitionWithResponse( * @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 query results. + * @return query results as paginated response with {@link PagedIterable}. */ PagedIterable listQueryResultsForSubscriptionLevelPolicyAssignment( PolicyStatesResource policyStatesResource, String subscriptionId, String policyAssignmentName); @@ -626,7 +676,7 @@ PagedIterable listQueryResultsForSubscriptionLevelPolicyAssignment( * @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 query results. + * @return query results as paginated response with {@link PagedIterable}. */ PagedIterable listQueryResultsForSubscriptionLevelPolicyAssignment( PolicyStatesResource policyStatesResource, @@ -645,6 +695,8 @@ PagedIterable listQueryResultsForSubscriptionLevelPolicyAssignment( /** * Summarizes policy states for the subscription level policy assignment. * + * @param policyStatesSummaryResource The virtual resource under PolicyStates resource type for summarize action. In + * a given time range, 'latest' represents the latest policy state(s) and is the only allowed value. * @param subscriptionId Microsoft Azure subscription ID. * @param policyAssignmentName Policy assignment name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -652,11 +704,16 @@ PagedIterable listQueryResultsForSubscriptionLevelPolicyAssignment( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return summarize action results. */ - SummarizeResults summarizeForSubscriptionLevelPolicyAssignment(String subscriptionId, String policyAssignmentName); + SummarizeResults summarizeForSubscriptionLevelPolicyAssignment( + PolicyStatesSummaryResourceType policyStatesSummaryResource, + String subscriptionId, + String policyAssignmentName); /** * Summarizes policy states for the subscription level policy assignment. * + * @param policyStatesSummaryResource The virtual resource under PolicyStates resource type for summarize action. In + * a given time range, 'latest' represents the latest policy state(s) and is the only allowed value. * @param subscriptionId Microsoft Azure subscription ID. * @param policyAssignmentName Policy assignment name. * @param top Maximum number of records to return. @@ -669,9 +726,10 @@ PagedIterable listQueryResultsForSubscriptionLevelPolicyAssignment( * @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 summarize action results. + * @return summarize action results along with {@link Response}. */ Response summarizeForSubscriptionLevelPolicyAssignmentWithResponse( + PolicyStatesSummaryResourceType policyStatesSummaryResource, String subscriptionId, String policyAssignmentName, Integer top, @@ -691,7 +749,7 @@ Response summarizeForSubscriptionLevelPolicyAssignmentWithResp * @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 query results. + * @return query results as paginated response with {@link PagedIterable}. */ PagedIterable listQueryResultsForResourceGroupLevelPolicyAssignment( PolicyStatesResource policyStatesResource, @@ -724,7 +782,7 @@ PagedIterable listQueryResultsForResourceGroupLevelPolicyAssignment * @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 query results. + * @return query results as paginated response with {@link PagedIterable}. */ PagedIterable listQueryResultsForResourceGroupLevelPolicyAssignment( PolicyStatesResource policyStatesResource, @@ -744,6 +802,8 @@ PagedIterable listQueryResultsForResourceGroupLevelPolicyAssignment /** * Summarizes policy states for the resource group level policy assignment. * + * @param policyStatesSummaryResource The virtual resource under PolicyStates resource type for summarize action. In + * a given time range, 'latest' represents the latest policy state(s) and is the only allowed value. * @param subscriptionId Microsoft Azure subscription ID. * @param resourceGroupName Resource group name. * @param policyAssignmentName Policy assignment name. @@ -753,11 +813,16 @@ PagedIterable listQueryResultsForResourceGroupLevelPolicyAssignment * @return summarize action results. */ SummarizeResults summarizeForResourceGroupLevelPolicyAssignment( - String subscriptionId, String resourceGroupName, String policyAssignmentName); + PolicyStatesSummaryResourceType policyStatesSummaryResource, + String subscriptionId, + String resourceGroupName, + String policyAssignmentName); /** * Summarizes policy states for the resource group level policy assignment. * + * @param policyStatesSummaryResource The virtual resource under PolicyStates resource type for summarize action. In + * a given time range, 'latest' represents the latest policy state(s) and is the only allowed value. * @param subscriptionId Microsoft Azure subscription ID. * @param resourceGroupName Resource group name. * @param policyAssignmentName Policy assignment name. @@ -771,9 +836,10 @@ SummarizeResults summarizeForResourceGroupLevelPolicyAssignment( * @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 summarize action results. + * @return summarize action results along with {@link Response}. */ Response summarizeForResourceGroupLevelPolicyAssignmentWithResponse( + PolicyStatesSummaryResourceType policyStatesSummaryResource, String subscriptionId, String resourceGroupName, String policyAssignmentName, diff --git a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/models/PolicyStatesSummaryResourceType.java b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/models/PolicyStatesSummaryResourceType.java new file mode 100644 index 0000000000000..f1dd70883d998 --- /dev/null +++ b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/models/PolicyStatesSummaryResourceType.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.policyinsights.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for PolicyStatesSummaryResourceType. */ +public final class PolicyStatesSummaryResourceType extends ExpandableStringEnum { + /** Static value latest for PolicyStatesSummaryResourceType. */ + public static final PolicyStatesSummaryResourceType LATEST = fromString("latest"); + + /** + * Creates or finds a PolicyStatesSummaryResourceType from its string representation. + * + * @param name a name to look for. + * @return the corresponding PolicyStatesSummaryResourceType. + */ + @JsonCreator + public static PolicyStatesSummaryResourceType fromString(String name) { + return fromString(name, PolicyStatesSummaryResourceType.class); + } + + /** @return known PolicyStatesSummaryResourceType values. */ + public static Collection values() { + return values(PolicyStatesSummaryResourceType.class); + } +} diff --git a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/models/PolicyTrackedResources.java b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/models/PolicyTrackedResources.java index 0740c8cea4e46..982903f5f461c 100644 --- a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/models/PolicyTrackedResources.java +++ b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/models/PolicyTrackedResources.java @@ -13,99 +13,133 @@ public interface PolicyTrackedResources { * Queries policy tracked resources under the management group. * * @param managementGroupName Management group name. + * @param policyTrackedResourcesResource The name of the virtual resource under PolicyTrackedResources resource + * type; only "default" is allowed. * @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 query results. + * @return query results as paginated response with {@link PagedIterable}. */ - PagedIterable listQueryResultsForManagementGroup(String managementGroupName); + PagedIterable listQueryResultsForManagementGroup( + String managementGroupName, PolicyTrackedResourcesResourceType policyTrackedResourcesResource); /** * Queries policy tracked resources under the management group. * * @param managementGroupName Management group name. + * @param policyTrackedResourcesResource The name of the virtual resource under PolicyTrackedResources resource + * type; only "default" is allowed. * @param top Maximum number of records to return. * @param filter OData filter expression. * @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 query results. + * @return query results as paginated response with {@link PagedIterable}. */ PagedIterable listQueryResultsForManagementGroup( - String managementGroupName, Integer top, String filter, Context context); + String managementGroupName, + PolicyTrackedResourcesResourceType policyTrackedResourcesResource, + Integer top, + String filter, + Context context); /** * Queries policy tracked resources under the subscription. * + * @param policyTrackedResourcesResource The name of the virtual resource under PolicyTrackedResources resource + * type; only "default" is allowed. + * @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 query results. + * @return query results as paginated response with {@link PagedIterable}. */ - PagedIterable listQueryResultsForSubscription(); + PagedIterable listQueryResultsForSubscription( + PolicyTrackedResourcesResourceType policyTrackedResourcesResource); /** * Queries policy tracked resources under the subscription. * + * @param policyTrackedResourcesResource The name of the virtual resource under PolicyTrackedResources resource + * type; only "default" is allowed. * @param top Maximum number of records to return. * @param filter OData filter expression. * @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 query results. + * @return query results as paginated response with {@link PagedIterable}. */ - PagedIterable listQueryResultsForSubscription(Integer top, String filter, Context context); + PagedIterable listQueryResultsForSubscription( + PolicyTrackedResourcesResourceType policyTrackedResourcesResource, Integer top, String filter, Context context); /** * Queries policy tracked resources under the resource group. * * @param resourceGroupName Resource group name. + * @param policyTrackedResourcesResource The name of the virtual resource under PolicyTrackedResources resource + * type; only "default" is allowed. * @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 query results. + * @return query results as paginated response with {@link PagedIterable}. */ - PagedIterable listQueryResultsForResourceGroup(String resourceGroupName); + PagedIterable listQueryResultsForResourceGroup( + String resourceGroupName, PolicyTrackedResourcesResourceType policyTrackedResourcesResource); /** * Queries policy tracked resources under the resource group. * * @param resourceGroupName Resource group name. + * @param policyTrackedResourcesResource The name of the virtual resource under PolicyTrackedResources resource + * type; only "default" is allowed. * @param top Maximum number of records to return. * @param filter OData filter expression. * @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 query results. + * @return query results as paginated response with {@link PagedIterable}. */ PagedIterable listQueryResultsForResourceGroup( - String resourceGroupName, Integer top, String filter, Context context); + String resourceGroupName, + PolicyTrackedResourcesResourceType policyTrackedResourcesResource, + Integer top, + String filter, + Context context); /** * Queries policy tracked resources under the resource. * * @param resourceId Resource ID. + * @param policyTrackedResourcesResource The name of the virtual resource under PolicyTrackedResources resource + * type; only "default" is allowed. * @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 query results. + * @return query results as paginated response with {@link PagedIterable}. */ - PagedIterable listQueryResultsForResource(String resourceId); + PagedIterable listQueryResultsForResource( + String resourceId, PolicyTrackedResourcesResourceType policyTrackedResourcesResource); /** * Queries policy tracked resources under the resource. * * @param resourceId Resource ID. + * @param policyTrackedResourcesResource The name of the virtual resource under PolicyTrackedResources resource + * type; only "default" is allowed. * @param top Maximum number of records to return. * @param filter OData filter expression. * @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 query results. + * @return query results as paginated response with {@link PagedIterable}. */ PagedIterable listQueryResultsForResource( - String resourceId, Integer top, String filter, Context context); + String resourceId, + PolicyTrackedResourcesResourceType policyTrackedResourcesResource, + Integer top, + String filter, + Context context); } diff --git a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/models/PolicyTrackedResourcesResourceType.java b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/models/PolicyTrackedResourcesResourceType.java new file mode 100644 index 0000000000000..fb672f1d15747 --- /dev/null +++ b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/models/PolicyTrackedResourcesResourceType.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.policyinsights.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for PolicyTrackedResourcesResourceType. */ +public final class PolicyTrackedResourcesResourceType extends ExpandableStringEnum { + /** Static value default for PolicyTrackedResourcesResourceType. */ + public static final PolicyTrackedResourcesResourceType DEFAULT = fromString("default"); + + /** + * Creates or finds a PolicyTrackedResourcesResourceType from its string representation. + * + * @param name a name to look for. + * @return the corresponding PolicyTrackedResourcesResourceType. + */ + @JsonCreator + public static PolicyTrackedResourcesResourceType fromString(String name) { + return fromString(name, PolicyTrackedResourcesResourceType.class); + } + + /** @return known PolicyTrackedResourcesResourceType values. */ + public static Collection values() { + return values(PolicyTrackedResourcesResourceType.class); + } +} diff --git a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/models/Remediation.java b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/models/Remediation.java index 14ea6273b82f0..f8bd1a36183b9 100644 --- a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/models/Remediation.java +++ b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/models/Remediation.java @@ -415,7 +415,8 @@ interface WithFailureThreshold { * * @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 all deployments for a remediation at resource group scope. + * @return all deployments for a remediation at resource group scope as paginated response with {@link + * PagedIterable}. */ PagedIterable listDeploymentsAtResourceGroup(); @@ -427,7 +428,8 @@ interface WithFailureThreshold { * @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 all deployments for a remediation at resource group scope. + * @return all deployments for a remediation at resource group scope as paginated response with {@link + * PagedIterable}. */ PagedIterable listDeploymentsAtResourceGroup(Integer top, Context context); @@ -447,7 +449,7 @@ interface WithFailureThreshold { * @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 remediation definition. + * @return the remediation definition along with {@link Response}. */ Response cancelAtResourceGroupWithResponse(Context context); } diff --git a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/models/Remediations.java b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/models/Remediations.java index 5054e4f5312b2..1ce65706bf3d1 100644 --- a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/models/Remediations.java +++ b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/models/Remediations.java @@ -19,7 +19,8 @@ public interface Remediations { * @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 all deployments for a remediation at management group scope. + * @return all deployments for a remediation at management group scope as paginated response with {@link + * PagedIterable}. */ PagedIterable listDeploymentsAtManagementGroup( String managementGroupId, String remediationName); @@ -34,7 +35,8 @@ PagedIterable listDeploymentsAtManagementGroup( * @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 all deployments for a remediation at management group scope. + * @return all deployments for a remediation at management group scope as paginated response with {@link + * PagedIterable}. */ PagedIterable listDeploymentsAtManagementGroup( String managementGroupId, String remediationName, Integer top, Context context); @@ -60,7 +62,7 @@ PagedIterable listDeploymentsAtManagementGroup( * @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 remediation definition. + * @return the remediation definition along with {@link Response}. */ Response cancelAtManagementGroupWithResponse( String managementGroupId, String remediationName, Context context); @@ -72,7 +74,7 @@ Response cancelAtManagementGroupWithResponse( * @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 all remediations for the management group. + * @return all remediations for the management group as paginated response with {@link PagedIterable}. */ PagedIterable listForManagementGroup(String managementGroupId); @@ -86,7 +88,7 @@ Response cancelAtManagementGroupWithResponse( * @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 all remediations for the management group. + * @return all remediations for the management group as paginated response with {@link PagedIterable}. */ PagedIterable listForManagementGroup( String managementGroupId, Integer top, String filter, Context context); @@ -115,7 +117,7 @@ Remediation createOrUpdateAtManagementGroup( * @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 remediation definition. + * @return the remediation definition along with {@link Response}. */ Response createOrUpdateAtManagementGroupWithResponse( String managementGroupId, String remediationName, RemediationInner parameters, Context context); @@ -141,7 +143,7 @@ Response createOrUpdateAtManagementGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an existing remediation at management group scope. + * @return an existing remediation at management group scope along with {@link Response}. */ Response getAtManagementGroupWithResponse( String managementGroupId, String remediationName, Context context); @@ -167,7 +169,7 @@ Response getAtManagementGroupWithResponse( * @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 remediation definition. + * @return the remediation definition along with {@link Response}. */ Response deleteAtManagementGroupWithResponse( String managementGroupId, String remediationName, Context context); @@ -179,7 +181,7 @@ Response deleteAtManagementGroupWithResponse( * @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 all deployments for a remediation at subscription scope. + * @return all deployments for a remediation at subscription scope as paginated response with {@link PagedIterable}. */ PagedIterable listDeploymentsAtSubscription(String remediationName); @@ -192,7 +194,7 @@ Response deleteAtManagementGroupWithResponse( * @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 all deployments for a remediation at subscription scope. + * @return all deployments for a remediation at subscription scope as paginated response with {@link PagedIterable}. */ PagedIterable listDeploymentsAtSubscription( String remediationName, Integer top, Context context); @@ -216,7 +218,7 @@ PagedIterable listDeploymentsAtSubscription( * @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 remediation definition. + * @return the remediation definition along with {@link Response}. */ Response cancelAtSubscriptionWithResponse(String remediationName, Context context); @@ -225,7 +227,7 @@ PagedIterable listDeploymentsAtSubscription( * * @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 all remediations for the subscription. + * @return all remediations for the subscription as paginated response with {@link PagedIterable}. */ PagedIterable list(); @@ -238,7 +240,7 @@ PagedIterable listDeploymentsAtSubscription( * @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 all remediations for the subscription. + * @return all remediations for the subscription as paginated response with {@link PagedIterable}. */ PagedIterable list(Integer top, String filter, Context context); @@ -263,7 +265,7 @@ PagedIterable listDeploymentsAtSubscription( * @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 remediation definition. + * @return the remediation definition along with {@link Response}. */ Response createOrUpdateAtSubscriptionWithResponse( String remediationName, RemediationInner parameters, Context context); @@ -287,7 +289,7 @@ Response createOrUpdateAtSubscriptionWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an existing remediation at subscription scope. + * @return an existing remediation at subscription scope along with {@link Response}. */ Response getAtSubscriptionWithResponse(String remediationName, Context context); @@ -310,7 +312,7 @@ Response createOrUpdateAtSubscriptionWithResponse( * @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 remediation definition. + * @return the remediation definition along with {@link Response}. */ Response deleteAtSubscriptionWithResponse(String remediationName, Context context); @@ -322,7 +324,8 @@ Response createOrUpdateAtSubscriptionWithResponse( * @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 all deployments for a remediation at resource group scope. + * @return all deployments for a remediation at resource group scope as paginated response with {@link + * PagedIterable}. */ PagedIterable listDeploymentsAtResourceGroup( String resourceGroupName, String remediationName); @@ -337,7 +340,8 @@ PagedIterable listDeploymentsAtResourceGroup( * @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 all deployments for a remediation at resource group scope. + * @return all deployments for a remediation at resource group scope as paginated response with {@link + * PagedIterable}. */ PagedIterable listDeploymentsAtResourceGroup( String resourceGroupName, String remediationName, Integer top, Context context); @@ -363,7 +367,7 @@ PagedIterable listDeploymentsAtResourceGroup( * @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 remediation definition. + * @return the remediation definition along with {@link Response}. */ Response cancelAtResourceGroupWithResponse( String resourceGroupName, String remediationName, Context context); @@ -375,7 +379,7 @@ Response cancelAtResourceGroupWithResponse( * @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 all remediations for the subscription. + * @return all remediations for the subscription as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName); @@ -389,7 +393,7 @@ Response cancelAtResourceGroupWithResponse( * @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 all remediations for the subscription. + * @return all remediations for the subscription as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup( String resourceGroupName, Integer top, String filter, Context context); @@ -415,7 +419,7 @@ PagedIterable listByResourceGroup( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an existing remediation at resource group scope. + * @return an existing remediation at resource group scope along with {@link Response}. */ Response getByResourceGroupWithResponse( String resourceGroupName, String remediationName, Context context); @@ -441,7 +445,7 @@ Response getByResourceGroupWithResponse( * @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 remediation definition. + * @return the remediation definition along with {@link Response}. */ Response deleteWithResponse(String resourceGroupName, String remediationName, Context context); @@ -453,7 +457,7 @@ Response getByResourceGroupWithResponse( * @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 all deployments for a remediation at resource scope. + * @return all deployments for a remediation at resource scope as paginated response with {@link PagedIterable}. */ PagedIterable listDeploymentsAtResource(String resourceId, String remediationName); @@ -467,7 +471,7 @@ Response getByResourceGroupWithResponse( * @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 all deployments for a remediation at resource scope. + * @return all deployments for a remediation at resource scope as paginated response with {@link PagedIterable}. */ PagedIterable listDeploymentsAtResource( String resourceId, String remediationName, Integer top, Context context); @@ -493,7 +497,7 @@ PagedIterable listDeploymentsAtResource( * @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 remediation definition. + * @return the remediation definition along with {@link Response}. */ Response cancelAtResourceWithResponse(String resourceId, String remediationName, Context context); @@ -504,7 +508,7 @@ PagedIterable listDeploymentsAtResource( * @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 all remediations for a resource. + * @return all remediations for a resource as paginated response with {@link PagedIterable}. */ PagedIterable listForResource(String resourceId); @@ -518,7 +522,7 @@ PagedIterable listDeploymentsAtResource( * @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 all remediations for a resource. + * @return all remediations for a resource as paginated response with {@link PagedIterable}. */ PagedIterable listForResource(String resourceId, Integer top, String filter, Context context); @@ -545,7 +549,7 @@ PagedIterable listDeploymentsAtResource( * @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 remediation definition. + * @return the remediation definition along with {@link Response}. */ Response createOrUpdateAtResourceWithResponse( String resourceId, String remediationName, RemediationInner parameters, Context context); @@ -571,7 +575,7 @@ Response createOrUpdateAtResourceWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an existing remediation at resource scope. + * @return an existing remediation at resource scope along with {@link Response}. */ Response getAtResourceWithResponse(String resourceId, String remediationName, Context context); @@ -596,7 +600,7 @@ Response createOrUpdateAtResourceWithResponse( * @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 remediation definition. + * @return the remediation definition along with {@link Response}. */ Response deleteAtResourceWithResponse(String resourceId, String remediationName, Context context); @@ -607,7 +611,7 @@ Response createOrUpdateAtResourceWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an existing remediation at resource group scope. + * @return an existing remediation at resource group scope along with {@link Response}. */ Remediation getById(String id); @@ -619,7 +623,7 @@ Response createOrUpdateAtResourceWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an existing remediation at resource group scope. + * @return an existing remediation at resource group scope along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); @@ -630,7 +634,7 @@ Response createOrUpdateAtResourceWithResponse( * @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 remediation definition. + * @return the remediation definition along with {@link Response}. */ Remediation deleteById(String id); @@ -642,7 +646,7 @@ Response createOrUpdateAtResourceWithResponse( * @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 remediation definition. + * @return the remediation definition along with {@link Response}. */ Response deleteByIdWithResponse(String id, Context context); diff --git a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/samples/java/com/azure/resourcemanager/policyinsights/generated/PolicyEventsListQueryResultsForManagementGroupSamples.java b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/samples/java/com/azure/resourcemanager/policyinsights/generated/PolicyEventsListQueryResultsForManagementGroupSamples.java index 830851bce11a0..389d6482fb911 100644 --- a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/samples/java/com/azure/resourcemanager/policyinsights/generated/PolicyEventsListQueryResultsForManagementGroupSamples.java +++ b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/samples/java/com/azure/resourcemanager/policyinsights/generated/PolicyEventsListQueryResultsForManagementGroupSamples.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.policyinsights.generated; import com.azure.core.util.Context; +import com.azure.resourcemanager.policyinsights.models.PolicyEventsResourceType; /** Samples for PolicyEvents ListQueryResultsForManagementGroup. */ public final class PolicyEventsListQueryResultsForManagementGroupSamples { @@ -21,7 +22,17 @@ public static void queryAtManagementGroupScopeWithNextLink( manager .policyEvents() .listQueryResultsForManagementGroup( - "myManagementGroup", null, null, null, null, null, null, null, "WpmWfBSvPhkAK6QD", Context.NONE); + PolicyEventsResourceType.DEFAULT, + "myManagementGroup", + null, + null, + null, + null, + null, + null, + null, + "WpmWfBSvPhkAK6QD", + Context.NONE); } /* @@ -37,6 +48,16 @@ public static void queryAtManagementGroupScope( manager .policyEvents() .listQueryResultsForManagementGroup( - "myManagementGroup", null, null, null, null, null, null, null, null, Context.NONE); + PolicyEventsResourceType.DEFAULT, + "myManagementGroup", + null, + null, + null, + null, + null, + null, + null, + null, + Context.NONE); } } diff --git a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/samples/java/com/azure/resourcemanager/policyinsights/generated/PolicyEventsListQueryResultsForPolicyDefinitionSamples.java b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/samples/java/com/azure/resourcemanager/policyinsights/generated/PolicyEventsListQueryResultsForPolicyDefinitionSamples.java index eea88259465ae..fbfccd233a4a3 100644 --- a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/samples/java/com/azure/resourcemanager/policyinsights/generated/PolicyEventsListQueryResultsForPolicyDefinitionSamples.java +++ b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/samples/java/com/azure/resourcemanager/policyinsights/generated/PolicyEventsListQueryResultsForPolicyDefinitionSamples.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.policyinsights.generated; import com.azure.core.util.Context; +import com.azure.resourcemanager.policyinsights.models.PolicyEventsResourceType; /** Samples for PolicyEvents ListQueryResultsForPolicyDefinition. */ public final class PolicyEventsListQueryResultsForPolicyDefinitionSamples { @@ -21,6 +22,7 @@ public static void queryAtSubscriptionLevelPolicyDefinitionScope( manager .policyEvents() .listQueryResultsForPolicyDefinition( + PolicyEventsResourceType.DEFAULT, "fffedd8f-ffff-fffd-fffd-fffed2f84852", "24813039-7534-408a-9842-eb99f45721b1", null, @@ -47,6 +49,7 @@ public static void queryAtSubscriptionLevelPolicyDefinitionScopeWithNextLink( manager .policyEvents() .listQueryResultsForPolicyDefinition( + PolicyEventsResourceType.DEFAULT, "fffedd8f-ffff-fffd-fffd-fffed2f84852", "24813039-7534-408a-9842-eb99f45721b1", null, diff --git a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/samples/java/com/azure/resourcemanager/policyinsights/generated/PolicyEventsListQueryResultsForPolicySetDefinitionSamples.java b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/samples/java/com/azure/resourcemanager/policyinsights/generated/PolicyEventsListQueryResultsForPolicySetDefinitionSamples.java index 276529e421f8d..9c517f246ae4e 100644 --- a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/samples/java/com/azure/resourcemanager/policyinsights/generated/PolicyEventsListQueryResultsForPolicySetDefinitionSamples.java +++ b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/samples/java/com/azure/resourcemanager/policyinsights/generated/PolicyEventsListQueryResultsForPolicySetDefinitionSamples.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.policyinsights.generated; import com.azure.core.util.Context; +import com.azure.resourcemanager.policyinsights.models.PolicyEventsResourceType; /** Samples for PolicyEvents ListQueryResultsForPolicySetDefinition. */ public final class PolicyEventsListQueryResultsForPolicySetDefinitionSamples { @@ -21,6 +22,7 @@ public static void queryAtSubscriptionLevelPolicySetDefinitionScope( manager .policyEvents() .listQueryResultsForPolicySetDefinition( + PolicyEventsResourceType.DEFAULT, "fffedd8f-ffff-fffd-fffd-fffed2f84852", "3e3807c1-65c9-49e0-a406-82d8ae3e338c", null, @@ -47,6 +49,7 @@ public static void queryAtSubscriptionLevelPolicySetDefinitionScopeWithNextLink( manager .policyEvents() .listQueryResultsForPolicySetDefinition( + PolicyEventsResourceType.DEFAULT, "fffedd8f-ffff-fffd-fffd-fffed2f84852", "3e3807c1-65c9-49e0-a406-82d8ae3e338c", null, diff --git a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/samples/java/com/azure/resourcemanager/policyinsights/generated/PolicyEventsListQueryResultsForResourceGroupLevelPolicyAssignmentSamples.java b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/samples/java/com/azure/resourcemanager/policyinsights/generated/PolicyEventsListQueryResultsForResourceGroupLevelPolicyAssignmentSamples.java index 8a164439b529e..a639f4253e2cd 100644 --- a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/samples/java/com/azure/resourcemanager/policyinsights/generated/PolicyEventsListQueryResultsForResourceGroupLevelPolicyAssignmentSamples.java +++ b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/samples/java/com/azure/resourcemanager/policyinsights/generated/PolicyEventsListQueryResultsForResourceGroupLevelPolicyAssignmentSamples.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.policyinsights.generated; import com.azure.core.util.Context; +import com.azure.resourcemanager.policyinsights.models.PolicyEventsResourceType; /** Samples for PolicyEvents ListQueryResultsForResourceGroupLevelPolicyAssignment. */ public final class PolicyEventsListQueryResultsForResourceGroupLevelPolicyAssignmentSamples { @@ -21,6 +22,7 @@ public static void queryAtResourceGroupLevelPolicyAssignmentScope( manager .policyEvents() .listQueryResultsForResourceGroupLevelPolicyAssignment( + PolicyEventsResourceType.DEFAULT, "fffedd8f-ffff-fffd-fffd-fffed2f84852", "myResourceGroup", "myPolicyAssignment", @@ -48,6 +50,7 @@ public static void queryAtResourceGroupLevelPolicyAssignmentScopeWithNextLink( manager .policyEvents() .listQueryResultsForResourceGroupLevelPolicyAssignment( + PolicyEventsResourceType.DEFAULT, "fffedd8f-ffff-fffd-fffd-fffed2f84852", "myResourceGroup", "myPolicyAssignment", diff --git a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/samples/java/com/azure/resourcemanager/policyinsights/generated/PolicyEventsListQueryResultsForResourceGroupSamples.java b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/samples/java/com/azure/resourcemanager/policyinsights/generated/PolicyEventsListQueryResultsForResourceGroupSamples.java index e501d26d55a33..05125bde73a07 100644 --- a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/samples/java/com/azure/resourcemanager/policyinsights/generated/PolicyEventsListQueryResultsForResourceGroupSamples.java +++ b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/samples/java/com/azure/resourcemanager/policyinsights/generated/PolicyEventsListQueryResultsForResourceGroupSamples.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.policyinsights.generated; import com.azure.core.util.Context; +import com.azure.resourcemanager.policyinsights.models.PolicyEventsResourceType; /** Samples for PolicyEvents ListQueryResultsForResourceGroup. */ public final class PolicyEventsListQueryResultsForResourceGroupSamples { @@ -21,6 +22,7 @@ public static void queryAtResourceGroupScope( manager .policyEvents() .listQueryResultsForResourceGroup( + PolicyEventsResourceType.DEFAULT, "fffedd8f-ffff-fffd-fffd-fffed2f84852", "myResourceGroup", null, @@ -47,6 +49,7 @@ public static void queryAtResourceGroupScopeWithNextLink( manager .policyEvents() .listQueryResultsForResourceGroup( + PolicyEventsResourceType.DEFAULT, "fffedd8f-ffff-fffd-fffd-fffed2f84852", "myResourceGroup", null, diff --git a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/samples/java/com/azure/resourcemanager/policyinsights/generated/PolicyEventsListQueryResultsForResourceSamples.java b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/samples/java/com/azure/resourcemanager/policyinsights/generated/PolicyEventsListQueryResultsForResourceSamples.java index d24c61f0cd5db..bbaa245756348 100644 --- a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/samples/java/com/azure/resourcemanager/policyinsights/generated/PolicyEventsListQueryResultsForResourceSamples.java +++ b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/samples/java/com/azure/resourcemanager/policyinsights/generated/PolicyEventsListQueryResultsForResourceSamples.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.policyinsights.generated; import com.azure.core.util.Context; +import com.azure.resourcemanager.policyinsights.models.PolicyEventsResourceType; /** Samples for PolicyEvents ListQueryResultsForResource. */ public final class PolicyEventsListQueryResultsForResourceSamples { @@ -21,6 +22,7 @@ public static void queryAtSubscriptionLevelResourceScope( manager .policyEvents() .listQueryResultsForResource( + PolicyEventsResourceType.DEFAULT, "subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResourceName", null, null, @@ -47,6 +49,7 @@ public static void queryAtNestedResourceScope( manager .policyEvents() .listQueryResultsForResource( + PolicyEventsResourceType.DEFAULT, "subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.ServiceFabric/clusters/myCluster/applications/myApplication", null, null, @@ -73,6 +76,7 @@ public static void queryAtSubscriptionLevelNestedResourceScope( manager .policyEvents() .listQueryResultsForResource( + PolicyEventsResourceType.DEFAULT, "subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResource/someNestedResourceType/someNestedResource", null, null, @@ -98,6 +102,7 @@ public static void queryAtResourceScope(com.azure.resourcemanager.policyinsights manager .policyEvents() .listQueryResultsForResource( + PolicyEventsResourceType.DEFAULT, "subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.ClassicCompute/domainNames/myDomainName", null, null, @@ -124,6 +129,7 @@ public static void queryComponentsPolicyEventsForResourceScopeFilteredByGivenAss manager .policyEvents() .listQueryResultsForResource( + PolicyEventsResourceType.DEFAULT, "subscriptions/e78961ba-36fe-4739-9212-e3031b4c8db7/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/Vaults/myKVName", null, null, @@ -153,6 +159,7 @@ public static void queryComponentsPolicyEventsForResourceScopeFilteredByGivenAss manager .policyEvents() .listQueryResultsForResource( + PolicyEventsResourceType.DEFAULT, "subscriptions/e78961ba-36fe-4739-9212-e3031b4c8db7/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/Vaults/myKVName", null, null, @@ -181,6 +188,7 @@ public static void queryAtResourceScopeWithNextLink( manager .policyEvents() .listQueryResultsForResource( + PolicyEventsResourceType.DEFAULT, "subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.ClassicCompute/domainNames/myDomainName", null, null, diff --git a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/samples/java/com/azure/resourcemanager/policyinsights/generated/PolicyEventsListQueryResultsForSubscriptionLevelPolicyAssignmentSamples.java b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/samples/java/com/azure/resourcemanager/policyinsights/generated/PolicyEventsListQueryResultsForSubscriptionLevelPolicyAssignmentSamples.java index b41f3ba299ff1..8e34ed1ba8803 100644 --- a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/samples/java/com/azure/resourcemanager/policyinsights/generated/PolicyEventsListQueryResultsForSubscriptionLevelPolicyAssignmentSamples.java +++ b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/samples/java/com/azure/resourcemanager/policyinsights/generated/PolicyEventsListQueryResultsForSubscriptionLevelPolicyAssignmentSamples.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.policyinsights.generated; import com.azure.core.util.Context; +import com.azure.resourcemanager.policyinsights.models.PolicyEventsResourceType; /** Samples for PolicyEvents ListQueryResultsForSubscriptionLevelPolicyAssignment. */ public final class PolicyEventsListQueryResultsForSubscriptionLevelPolicyAssignmentSamples { @@ -21,6 +22,7 @@ public static void queryAtSubscriptionLevelPolicyAssignmentScope( manager .policyEvents() .listQueryResultsForSubscriptionLevelPolicyAssignment( + PolicyEventsResourceType.DEFAULT, "fffedd8f-ffff-fffd-fffd-fffed2f84852", "ec8f9645-8ecb-4abb-9c0b-5292f19d4003", null, @@ -47,6 +49,7 @@ public static void queryAtSubscriptionLevelPolicyAssignmentScopeWithNextLink( manager .policyEvents() .listQueryResultsForSubscriptionLevelPolicyAssignment( + PolicyEventsResourceType.DEFAULT, "fffedd8f-ffff-fffd-fffd-fffed2f84852", "ec8f9645-8ecb-4abb-9c0b-5292f19d4003", null, diff --git a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/samples/java/com/azure/resourcemanager/policyinsights/generated/PolicyEventsListQueryResultsForSubscriptionSamples.java b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/samples/java/com/azure/resourcemanager/policyinsights/generated/PolicyEventsListQueryResultsForSubscriptionSamples.java index 0991c33e17d75..96bb9005a0757 100644 --- a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/samples/java/com/azure/resourcemanager/policyinsights/generated/PolicyEventsListQueryResultsForSubscriptionSamples.java +++ b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/samples/java/com/azure/resourcemanager/policyinsights/generated/PolicyEventsListQueryResultsForSubscriptionSamples.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.policyinsights.generated; import com.azure.core.util.Context; +import com.azure.resourcemanager.policyinsights.models.PolicyEventsResourceType; import java.time.OffsetDateTime; /** Samples for PolicyEvents ListQueryResultsForSubscription. */ @@ -22,6 +23,7 @@ public static void timeRangeSortSelectAndLimit( manager .policyEvents() .listQueryResultsForSubscription( + PolicyEventsResourceType.DEFAULT, "fffedd8f-ffff-fffd-fffd-fffed2f84852", 2, "Timestamp desc, PolicyAssignmentId asc, SubscriptionId asc, ResourceGroup asc, ResourceId", @@ -46,6 +48,7 @@ public static void filterAndAggregateOnly(com.azure.resourcemanager.policyinsigh manager .policyEvents() .listQueryResultsForSubscription( + PolicyEventsResourceType.DEFAULT, "fffedd8f-ffff-fffd-fffd-fffed2f84852", null, null, @@ -71,6 +74,7 @@ public static void filterAndGroupWithoutAggregate( manager .policyEvents() .listQueryResultsForSubscription( + PolicyEventsResourceType.DEFAULT, "fffedd8f-ffff-fffd-fffd-fffed2f84852", 2, null, @@ -96,6 +100,7 @@ public static void queryAtSubscriptionScopeWithNextLink( manager .policyEvents() .listQueryResultsForSubscription( + PolicyEventsResourceType.DEFAULT, "fffedd8f-ffff-fffd-fffd-fffed2f84852", null, null, @@ -120,6 +125,7 @@ public static void filterAndMultipleGroups(com.azure.resourcemanager.policyinsig manager .policyEvents() .listQueryResultsForSubscription( + PolicyEventsResourceType.DEFAULT, "fffedd8f-ffff-fffd-fffd-fffed2f84852", 10, "NumDeniedResources desc", @@ -146,6 +152,7 @@ public static void filterAndGroupWithAggregate( manager .policyEvents() .listQueryResultsForSubscription( + PolicyEventsResourceType.DEFAULT, "fffedd8f-ffff-fffd-fffd-fffed2f84852", 2, null, @@ -172,6 +179,16 @@ public static void queryAtSubscriptionScope( manager .policyEvents() .listQueryResultsForSubscription( - "fffedd8f-ffff-fffd-fffd-fffed2f84852", null, null, null, null, null, null, null, null, Context.NONE); + PolicyEventsResourceType.DEFAULT, + "fffedd8f-ffff-fffd-fffd-fffed2f84852", + null, + null, + null, + null, + null, + null, + null, + null, + Context.NONE); } } diff --git a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/samples/java/com/azure/resourcemanager/policyinsights/generated/PolicyStatesSummarizeForManagementGroupSamples.java b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/samples/java/com/azure/resourcemanager/policyinsights/generated/PolicyStatesSummarizeForManagementGroupSamples.java index bcdddffa80046..319dc7280a72c 100644 --- a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/samples/java/com/azure/resourcemanager/policyinsights/generated/PolicyStatesSummarizeForManagementGroupSamples.java +++ b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/samples/java/com/azure/resourcemanager/policyinsights/generated/PolicyStatesSummarizeForManagementGroupSamples.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.policyinsights.generated; import com.azure.core.util.Context; +import com.azure.resourcemanager.policyinsights.models.PolicyStatesSummaryResourceType; import java.time.OffsetDateTime; /** Samples for PolicyStates SummarizeForManagementGroup. */ @@ -22,6 +23,7 @@ public static void summarizeAtManagementGroupScope( manager .policyStates() .summarizeForManagementGroupWithResponse( + PolicyStatesSummaryResourceType.LATEST, "myManagementGroup", 0, OffsetDateTime.parse("2019-10-05T18:00:00Z"), diff --git a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/samples/java/com/azure/resourcemanager/policyinsights/generated/PolicyStatesSummarizeForPolicyDefinitionSamples.java b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/samples/java/com/azure/resourcemanager/policyinsights/generated/PolicyStatesSummarizeForPolicyDefinitionSamples.java index 566d2a128d97b..d1b1fc8e6b6ca 100644 --- a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/samples/java/com/azure/resourcemanager/policyinsights/generated/PolicyStatesSummarizeForPolicyDefinitionSamples.java +++ b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/samples/java/com/azure/resourcemanager/policyinsights/generated/PolicyStatesSummarizeForPolicyDefinitionSamples.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.policyinsights.generated; import com.azure.core.util.Context; +import com.azure.resourcemanager.policyinsights.models.PolicyStatesSummaryResourceType; /** Samples for PolicyStates SummarizeForPolicyDefinition. */ public final class PolicyStatesSummarizeForPolicyDefinitionSamples { @@ -21,6 +22,7 @@ public static void summarizeAtPolicyDefinitionScope( manager .policyStates() .summarizeForPolicyDefinitionWithResponse( + PolicyStatesSummaryResourceType.LATEST, "fffedd8f-ffff-fffd-fffd-fffed2f84852", "24813039-7534-408a-9842-eb99f45721b1", null, diff --git a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/samples/java/com/azure/resourcemanager/policyinsights/generated/PolicyStatesSummarizeForPolicySetDefinitionSamples.java b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/samples/java/com/azure/resourcemanager/policyinsights/generated/PolicyStatesSummarizeForPolicySetDefinitionSamples.java index a8b8afd556579..f33017ea12d44 100644 --- a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/samples/java/com/azure/resourcemanager/policyinsights/generated/PolicyStatesSummarizeForPolicySetDefinitionSamples.java +++ b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/samples/java/com/azure/resourcemanager/policyinsights/generated/PolicyStatesSummarizeForPolicySetDefinitionSamples.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.policyinsights.generated; import com.azure.core.util.Context; +import com.azure.resourcemanager.policyinsights.models.PolicyStatesSummaryResourceType; import java.time.OffsetDateTime; /** Samples for PolicyStates SummarizeForPolicySetDefinition. */ @@ -22,6 +23,7 @@ public static void summarizeAtPolicySetDefinitionScope( manager .policyStates() .summarizeForPolicySetDefinitionWithResponse( + PolicyStatesSummaryResourceType.LATEST, "fffedd8f-ffff-fffd-fffd-fffed2f84852", "3e3807c1-65c9-49e0-a406-82d8ae3e338c", 1, diff --git a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/samples/java/com/azure/resourcemanager/policyinsights/generated/PolicyStatesSummarizeForResourceGroupLevelPolicyAssignmentSamples.java b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/samples/java/com/azure/resourcemanager/policyinsights/generated/PolicyStatesSummarizeForResourceGroupLevelPolicyAssignmentSamples.java index 553478a305a88..b5702096b9008 100644 --- a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/samples/java/com/azure/resourcemanager/policyinsights/generated/PolicyStatesSummarizeForResourceGroupLevelPolicyAssignmentSamples.java +++ b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/samples/java/com/azure/resourcemanager/policyinsights/generated/PolicyStatesSummarizeForResourceGroupLevelPolicyAssignmentSamples.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.policyinsights.generated; import com.azure.core.util.Context; +import com.azure.resourcemanager.policyinsights.models.PolicyStatesSummaryResourceType; /** Samples for PolicyStates SummarizeForResourceGroupLevelPolicyAssignment. */ public final class PolicyStatesSummarizeForResourceGroupLevelPolicyAssignmentSamples { @@ -21,6 +22,7 @@ public static void summarizeAtPolicyAssignmentScope( manager .policyStates() .summarizeForResourceGroupLevelPolicyAssignmentWithResponse( + PolicyStatesSummaryResourceType.LATEST, "fffedd8f-ffff-fffd-fffd-fffed2f84852", "myResourceGroup", "b7a1ca2596524e3ab19597f2", diff --git a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/samples/java/com/azure/resourcemanager/policyinsights/generated/PolicyStatesSummarizeForResourceGroupSamples.java b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/samples/java/com/azure/resourcemanager/policyinsights/generated/PolicyStatesSummarizeForResourceGroupSamples.java index b74ca603452d4..f36115a8a2e04 100644 --- a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/samples/java/com/azure/resourcemanager/policyinsights/generated/PolicyStatesSummarizeForResourceGroupSamples.java +++ b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/samples/java/com/azure/resourcemanager/policyinsights/generated/PolicyStatesSummarizeForResourceGroupSamples.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.policyinsights.generated; import com.azure.core.util.Context; +import com.azure.resourcemanager.policyinsights.models.PolicyStatesSummaryResourceType; /** Samples for PolicyStates SummarizeForResourceGroup. */ public final class PolicyStatesSummarizeForResourceGroupSamples { @@ -21,6 +22,13 @@ public static void summarizeAtResourceGroupScope( manager .policyStates() .summarizeForResourceGroupWithResponse( - "fffedd8f-ffff-fffd-fffd-fffed2f84852", "myResourceGroup", null, null, null, null, Context.NONE); + PolicyStatesSummaryResourceType.LATEST, + "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "myResourceGroup", + null, + null, + null, + null, + Context.NONE); } } diff --git a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/samples/java/com/azure/resourcemanager/policyinsights/generated/PolicyStatesSummarizeForResourceSamples.java b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/samples/java/com/azure/resourcemanager/policyinsights/generated/PolicyStatesSummarizeForResourceSamples.java index 7dd78ad261146..4579de1867429 100644 --- a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/samples/java/com/azure/resourcemanager/policyinsights/generated/PolicyStatesSummarizeForResourceSamples.java +++ b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/samples/java/com/azure/resourcemanager/policyinsights/generated/PolicyStatesSummarizeForResourceSamples.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.policyinsights.generated; import com.azure.core.util.Context; +import com.azure.resourcemanager.policyinsights.models.PolicyStatesSummaryResourceType; /** Samples for PolicyStates SummarizeForResource. */ public final class PolicyStatesSummarizeForResourceSamples { @@ -21,6 +22,7 @@ public static void summarizeAtResourceScope( manager .policyStates() .summarizeForResourceWithResponse( + PolicyStatesSummaryResourceType.LATEST, "subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault", 2, null, diff --git a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/samples/java/com/azure/resourcemanager/policyinsights/generated/PolicyStatesSummarizeForSubscriptionLevelPolicyAssignmentSamples.java b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/samples/java/com/azure/resourcemanager/policyinsights/generated/PolicyStatesSummarizeForSubscriptionLevelPolicyAssignmentSamples.java index 76bbb54c9372d..957a00eb18706 100644 --- a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/samples/java/com/azure/resourcemanager/policyinsights/generated/PolicyStatesSummarizeForSubscriptionLevelPolicyAssignmentSamples.java +++ b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/samples/java/com/azure/resourcemanager/policyinsights/generated/PolicyStatesSummarizeForSubscriptionLevelPolicyAssignmentSamples.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.policyinsights.generated; import com.azure.core.util.Context; +import com.azure.resourcemanager.policyinsights.models.PolicyStatesSummaryResourceType; /** Samples for PolicyStates SummarizeForSubscriptionLevelPolicyAssignment. */ public final class PolicyStatesSummarizeForSubscriptionLevelPolicyAssignmentSamples { @@ -21,6 +22,7 @@ public static void summarizeAtPolicyAssignmentScope( manager .policyStates() .summarizeForSubscriptionLevelPolicyAssignmentWithResponse( + PolicyStatesSummaryResourceType.LATEST, "fffedd8f-ffff-fffd-fffd-fffed2f84852", "ec8f9645-8ecb-4abb-9c0b-5292f19d4003", null, diff --git a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/samples/java/com/azure/resourcemanager/policyinsights/generated/PolicyStatesSummarizeForSubscriptionSamples.java b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/samples/java/com/azure/resourcemanager/policyinsights/generated/PolicyStatesSummarizeForSubscriptionSamples.java index 4a08f761f79dd..4ced13172e707 100644 --- a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/samples/java/com/azure/resourcemanager/policyinsights/generated/PolicyStatesSummarizeForSubscriptionSamples.java +++ b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/samples/java/com/azure/resourcemanager/policyinsights/generated/PolicyStatesSummarizeForSubscriptionSamples.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.policyinsights.generated; import com.azure.core.util.Context; +import com.azure.resourcemanager.policyinsights.models.PolicyStatesSummaryResourceType; /** Samples for PolicyStates SummarizeForSubscription. */ public final class PolicyStatesSummarizeForSubscriptionSamples { @@ -21,6 +22,7 @@ public static void summarizeAtSubscriptionScopeForAPolicyDefinitionGroup( manager .policyStates() .summarizeForSubscriptionWithResponse( + PolicyStatesSummaryResourceType.LATEST, "fffedd8f-ffff-fffd-fffd-fffed2f84852", 1, null, @@ -42,6 +44,12 @@ public static void summarizeAtSubscriptionScope( manager .policyStates() .summarizeForSubscriptionWithResponse( - "fffedd8f-ffff-fffd-fffd-fffed2f84852", 5, null, null, null, Context.NONE); + PolicyStatesSummaryResourceType.LATEST, + "fffedd8f-ffff-fffd-fffd-fffed2f84852", + 5, + null, + null, + null, + Context.NONE); } } diff --git a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/samples/java/com/azure/resourcemanager/policyinsights/generated/PolicyTrackedResourcesListQueryResultsForManagementGroupSamples.java b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/samples/java/com/azure/resourcemanager/policyinsights/generated/PolicyTrackedResourcesListQueryResultsForManagementGroupSamples.java index 2298c52af7f3c..92ef8dabae55d 100644 --- a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/samples/java/com/azure/resourcemanager/policyinsights/generated/PolicyTrackedResourcesListQueryResultsForManagementGroupSamples.java +++ b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/samples/java/com/azure/resourcemanager/policyinsights/generated/PolicyTrackedResourcesListQueryResultsForManagementGroupSamples.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.policyinsights.generated; import com.azure.core.util.Context; +import com.azure.resourcemanager.policyinsights.models.PolicyTrackedResourcesResourceType; /** Samples for PolicyTrackedResources ListQueryResultsForManagementGroup. */ public final class PolicyTrackedResourcesListQueryResultsForManagementGroupSamples { @@ -22,6 +23,7 @@ public static void queryAtManagementGroupScopeUsingQueryParameters( .policyTrackedResources() .listQueryResultsForManagementGroup( "myManagementGroup", + PolicyTrackedResourcesResourceType.DEFAULT, 1, "PolicyAssignmentId eq" + " '/subscriptions/fff8dfdb-fff3-fff0-fff4-fffdcbe6b2ef/resourceGroups/myResourceGroup/providers/Microsoft.Authorization/policyAssignments/myPolicyAssignment'" @@ -42,6 +44,7 @@ public static void queryAtManagementGroupScope( com.azure.resourcemanager.policyinsights.PolicyInsightsManager manager) { manager .policyTrackedResources() - .listQueryResultsForManagementGroup("myManagementGroup", null, null, Context.NONE); + .listQueryResultsForManagementGroup( + "myManagementGroup", PolicyTrackedResourcesResourceType.DEFAULT, null, null, Context.NONE); } } diff --git a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/samples/java/com/azure/resourcemanager/policyinsights/generated/PolicyTrackedResourcesListQueryResultsForResourceGroupSamples.java b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/samples/java/com/azure/resourcemanager/policyinsights/generated/PolicyTrackedResourcesListQueryResultsForResourceGroupSamples.java index 3d915eb978b05..9a7a4b77e3b4f 100644 --- a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/samples/java/com/azure/resourcemanager/policyinsights/generated/PolicyTrackedResourcesListQueryResultsForResourceGroupSamples.java +++ b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/samples/java/com/azure/resourcemanager/policyinsights/generated/PolicyTrackedResourcesListQueryResultsForResourceGroupSamples.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.policyinsights.generated; import com.azure.core.util.Context; +import com.azure.resourcemanager.policyinsights.models.PolicyTrackedResourcesResourceType; /** Samples for PolicyTrackedResources ListQueryResultsForResourceGroup. */ public final class PolicyTrackedResourcesListQueryResultsForResourceGroupSamples { @@ -22,6 +23,7 @@ public static void queryAtResourceGroupScopeUsingQueryParameters( .policyTrackedResources() .listQueryResultsForResourceGroup( "myResourceGroup", + PolicyTrackedResourcesResourceType.DEFAULT, 1, "PolicyAssignmentId eq" + " '/subscriptions/fff8dfdb-fff3-fff0-fff4-fffdcbe6b2ef/resourceGroups/myResourceGroup/providers/Microsoft.Authorization/policyAssignments/myPolicyAssignment'" @@ -40,6 +42,9 @@ public static void queryAtResourceGroupScopeUsingQueryParameters( */ public static void queryAtResourceGroupScope( com.azure.resourcemanager.policyinsights.PolicyInsightsManager manager) { - manager.policyTrackedResources().listQueryResultsForResourceGroup("myResourceGroup", null, null, Context.NONE); + manager + .policyTrackedResources() + .listQueryResultsForResourceGroup( + "myResourceGroup", PolicyTrackedResourcesResourceType.DEFAULT, null, null, Context.NONE); } } diff --git a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/samples/java/com/azure/resourcemanager/policyinsights/generated/PolicyTrackedResourcesListQueryResultsForResourceSamples.java b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/samples/java/com/azure/resourcemanager/policyinsights/generated/PolicyTrackedResourcesListQueryResultsForResourceSamples.java index 87aea76d3b91d..42c857ceec6c0 100644 --- a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/samples/java/com/azure/resourcemanager/policyinsights/generated/PolicyTrackedResourcesListQueryResultsForResourceSamples.java +++ b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/samples/java/com/azure/resourcemanager/policyinsights/generated/PolicyTrackedResourcesListQueryResultsForResourceSamples.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.policyinsights.generated; import com.azure.core.util.Context; +import com.azure.resourcemanager.policyinsights.models.PolicyTrackedResourcesResourceType; /** Samples for PolicyTrackedResources ListQueryResultsForResource. */ public final class PolicyTrackedResourcesListQueryResultsForResourceSamples { @@ -22,6 +23,7 @@ public static void queryAtResourceScopeUsingQueryParameters( .policyTrackedResources() .listQueryResultsForResource( "subscriptions/fff8dfdb-fff3-fff0-fff4-fffdcbe6b2ef/resourceGroups/myResourceGroup/providers/Microsoft.Example/exampleResourceType/myResource", + PolicyTrackedResourcesResourceType.DEFAULT, 1, "PolicyAssignmentId eq" + " '/subscriptions/fff8dfdb-fff3-fff0-fff4-fffdcbe6b2ef/resourceGroups/myResourceGroup/providers/Microsoft.Authorization/policyAssignments/myPolicyAssignment'" @@ -43,6 +45,7 @@ public static void queryAtResourceScope(com.azure.resourcemanager.policyinsights .policyTrackedResources() .listQueryResultsForResource( "subscriptions/fff8dfdb-fff3-fff0-fff4-fffdcbe6b2ef/resourceGroups/myResourceGroup/providers/Microsoft.Example/exampleResourceType/myResource", + PolicyTrackedResourcesResourceType.DEFAULT, null, null, Context.NONE); diff --git a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/samples/java/com/azure/resourcemanager/policyinsights/generated/PolicyTrackedResourcesListQueryResultsForSubscriptionSamples.java b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/samples/java/com/azure/resourcemanager/policyinsights/generated/PolicyTrackedResourcesListQueryResultsForSubscriptionSamples.java index 1907604147b39..51f4d174233dd 100644 --- a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/samples/java/com/azure/resourcemanager/policyinsights/generated/PolicyTrackedResourcesListQueryResultsForSubscriptionSamples.java +++ b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/samples/java/com/azure/resourcemanager/policyinsights/generated/PolicyTrackedResourcesListQueryResultsForSubscriptionSamples.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.policyinsights.generated; import com.azure.core.util.Context; +import com.azure.resourcemanager.policyinsights.models.PolicyTrackedResourcesResourceType; /** Samples for PolicyTrackedResources ListQueryResultsForSubscription. */ public final class PolicyTrackedResourcesListQueryResultsForSubscriptionSamples { @@ -21,6 +22,7 @@ public static void queryAtSubscriptionScopeUsingQueryParameters( manager .policyTrackedResources() .listQueryResultsForSubscription( + PolicyTrackedResourcesResourceType.DEFAULT, 1, "PolicyAssignmentId eq" + " '/subscriptions/fff8dfdb-fff3-fff0-fff4-fffdcbe6b2ef/resourceGroups/myResourceGroup/providers/Microsoft.Authorization/policyAssignments/myPolicyAssignment'" @@ -39,6 +41,8 @@ public static void queryAtSubscriptionScopeUsingQueryParameters( */ public static void queryAtSubscriptionScope( com.azure.resourcemanager.policyinsights.PolicyInsightsManager manager) { - manager.policyTrackedResources().listQueryResultsForSubscription(null, null, Context.NONE); + manager + .policyTrackedResources() + .listQueryResultsForSubscription(PolicyTrackedResourcesResourceType.DEFAULT, null, null, Context.NONE); } }